<p>No need to use <code>gmx dump</code>, you can simply load a <code>xtc</code> or <code>trr</code> trajectory in VMD using:</p>
<pre><code>vmd path/to/gro_file.gro other/path/to/trajectory_file.xtc
</code></pre>
<p>As always you can also use the GUI to first open your <code>gro</code> file, then right click on the molecule and select <code>Load data into molecule</code> before selecting your <code>xtc</code> or <code>trr</code> file.</p>
<p>After putting the representations as you see fit, if you want to export this as a movie (GIF, MP4, others...) you can go in Extensions -&gt; Visualization -&gt; Movie Maker. See <a href="http://www.ks.uiuc.edu/Training/Tutorials/vmd/tutorial-html/node3.html" rel="nofollow noreferrer">Trajectories and Movie Making</a> VMD official tutorial for more details.</p>

CC BY-SA 4.0
2021-05-15T14:11:23.953Z
Thank you for your answering! But I want to draw a video using a trj file.There is also a trj file option in the VMD file format. Therefore, I would like to know how to perform this to create a video.
musako
CC BY-SA 4.0
2021-05-11T08:57:33.543Z
2021-05-11T08:57:33.543Z
O.Laprevote
<p>I don't think that the output of <code>gmx dump</code> 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.</p>
<p><code>trj</code> files are <strong>NOT</strong> the output of <code>gmx dump</code>. <code>trj</code> files were used in &quot;old&quot; versions of GROMACS to store trajectories (see <a href="https://manual.gromacs.org/archive/5.0/online/trj.html" rel="nofollow noreferrer">trj file format</a> documentation of GROMACS 5), and this is what VMD is awaiting, not the output of <code>gmx dump</code>. This is also why it tells you the header is wrong.</p>
<p>In recent versions of GROMACS <code>trj</code> files are no longer supported, probably as they were not in a binary format, hence took too much disk space (see <a href="https://manual.gromacs.org/current/reference-manual/file-formats.html#trajectory-files" rel="nofollow noreferrer">Trajectory files formats</a> in GROMACS 2021 documentation). Converting a <code>.trr</code> in a <code>.trj</code> was done by <code>gmx trjconv</code>, but I don't think this is possible anymore (see <code>gmx trjconv</code> supported trajectory formats in <a href="https://manual.gromacs.org/archive/5.0.3/programs/gmx-trjconv.html" rel="nofollow noreferrer">GROMACS 5</a> vs <a href="https://manual.gromacs.org/current/onlinehelp/gmx-trjconv.html?highlight=trjconv#options" rel="nofollow noreferrer">GROMACS 2021</a>).</p>
<p>Why would you absolutely need <code>gmx dump</code> 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 <a href="https://www.mdanalysis.org/" rel="nofollow noreferrer">MDAnalysis</a>, <a href="http://amber-md.github.io/pytraj/latest/index.html" rel="nofollow noreferrer">PyTraj</a> or <a href="https://mdtraj.org/1.9.4/index.html" rel="nofollow noreferrer">MDTraj</a>, 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.</p>

CC BY-SA 4.0
2021-05-30T18:26:35.473Z
2021-05-30T18:26:35.473Z
O.Laprevote
<p>I did <code>gmx trjconv</code> on GROMACS <code>trr</code> file to generate a <code>.xtc</code> file, and then used <code>gmx dump</code> and saved its standard output in a file. Then I tried to make a movie with VMD using the file. As a result, it does not work properly. The error in the terminal is as follows.</p>
<pre><code>gromacsplugin) Cannot read header fromm '/Users/kondouakira/mount/Lab/1ns_sim/md_0_1_noPBC3.trj', no error
</code></pre>
<p>I use following command.</p>
<pre><code>gmx trjconv -s md.tpr -f md.trr -o md_0.trr -pbc mol -ur compact -b 1 -force
gmx dump -f md_0.trr &gt; md_0.trj
</code></pre>

<gromacs><molecular-dynamics>
How to make a video of a gromacs gmx dump standard output with VMD
# How to make a video of a gromacs gmx dump standard output with VMD

(Asked by: username_0 on 2021-05-07)

I did gmx trjconv on GROMACS trr file to generate a .xtc file, and then used gmx dump and saved its standard output in a file. Then I tried to make a movie with VMD using the file. As a result, it does not work properly. The error in the terminal is as follows.
gromacsplugin) Cannot read header fromm '/Users/kondouakira/mount/Lab/1ns_sim/md_0_1_noPBC3.trj', no error

I use following command.
gmx trjconv -s md.tpr -f md.trr -o md_0.trr -pbc mol -ur compact -b 1 -force
gmx dump -f md_0.trr > md_0.trj

**Tags:** gromacs, molecular-dynamics

---

## 2 answers

### Answer by username_1 on 2021-05-11. Score: 2

No need to use gmx dump, you can simply load a xtc or trr trajectory in VMD using:
vmd path/to/gro_file.gro other/path/to/trajectory_file.xtc

As always you can also use the GUI to first open your gro file, then right click on the molecule and select Load data into molecule before selecting your xtc or trr file.
After putting the representations as you see fit, if you want to export this as a movie (GIF, MP4, others...) you can go in Extensions -> Visualization -> Movie Maker. See Trajectories and Movie Making VMD official tutorial for more details.

> **Comments:**
> **username_0**: Thank you for your answering! But I want to draw a video using a trj file.There is also a trj file option in the VMD file format. Therefore, I would like to know how to perform this to create a video.  

---

### Answer by username_1 on 2021-05-30. Score: 0

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 `gmx dump`. `trj` files were used in "old" versions of GROMACS to store trajectories (see [trj file format](https://manual.gromacs.org/archive/5.0/online/trj.html) 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](https://manual.gromacs.org/current/reference-manual/file-formats.html#trajectory-files) 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](https://manual.gromacs.org/archive/5.0.3/programs/gmx-trjconv.html) vs [GROMACS 2021](https://manual.gromacs.org/current/onlinehelp/gmx-trjconv.html?highlight=trjconv#options)).

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](https://www.mdanalysis.org/), [PyTraj](http://amber-md.github.io/pytraj/latest/index.html) or [MDTraj](https://mdtraj.org/1.9.4/index.html), 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.


---

