I don't think that the output of
gmx dump can be read by VMD: the goal of this command is to provide a human-readable output, not to convert one trajectory format into another.
trj files are NOT the output of
trj files were used in "old" versions of GROMACS to store trajectories (see trj file format documentation of GROMACS 5), and this is what VMD is awaiting, not the output of
gmx dump. This is also why it tells you the header is wrong.
In recent versions of GROMACS
trj files are no longer supported, probably as they were not in a binary format, hence took too much disk space (see Trajectory files formats in GROMACS 2021 documentation). Converting a
.trr in a
.trj was done by
gmx trjconv, but I don't think this is possible anymore (see
gmx trjconv supported trajectory formats in GROMACS 5 vs GROMACS 2021).
Why would you absolutely need
gmx dump output to be read by VMD? The only reason I can see is a handmade script doing modifications to your trajectory. In this case I would recommend to instead look into some molecular dynamics python libraries, like MDAnalysis, PyTraj or MDTraj, which will also allow you to make minute modifications to the trajectory file while still reading it in its original format. You can also look harder into GROMACS tools, as they are quite complete.