# Is it possible to extract coordinates from a .cpt file?

**URL:** <https://gromacs.bioexcel.eu/t/is-it-possible-to-extract-coordinates-from-a-cpt-file/13018>\
**Category:** User discussions\
**Created:** [December 5, 2025, 6:48pm UTC](https://gromacs.bioexcel.eu/t/is-it-possible-to-extract-coordinates-from-a-cpt-file/13018 "2025-12-05T18:48:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyfi](https://avatars.discourse-cdn.com/v4/letter/k/db5fbb/32.png) [@kyfi](https://gromacs.bioexcel.eu/u/kyfi)\
**Post date:** [December 5, 2025, 6:48pm UTC](https://gromacs.bioexcel.eu/t/is-it-possible-to-extract-coordinates-from-a-cpt-file/13018/1 "2025-12-05T18:48:22Z")

</div>

GROMACS version: 2022.4  
GROMACS modification: No  
Hi all,

I want to visualize coordinates of the output of some simulations of which I only have the checkpoint file, .itp files, topol.top, and a .ndx file I made to detail some subgroups. Other files were removed by automated cleaning performed by our computing cluster. Is it possible?

Thanks

---

<div class="post-metadata">

**Author:** ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)\
**Post date:** [December 5, 2025, 6:52pm UTC](https://gromacs.bioexcel.eu/t/is-it-possible-to-extract-coordinates-from-a-cpt-file/13018/2 "2025-12-05T18:52:18Z")

</div>

Hi @kyfi

If you have the `tpr` file then inside there is the first snapshot of the simulation saved. Same if you have any `gro` or `pdb` files, you can have access to a single frame usually. In terms of trajectory, if you do not have an `xtc` or `trr` then there is no way to retrieve the trajectory. The only choice is to run the simulation again, and even in that case the result will no be identical.

---

<div class="post-metadata">

**Author:** ![kyfi](https://avatars.discourse-cdn.com/v4/letter/k/db5fbb/32.png) [@kyfi](https://gromacs.bioexcel.eu/u/kyfi)\
**Post date:** [December 5, 2025, 7:00pm UTC](https://gromacs.bioexcel.eu/t/is-it-possible-to-extract-coordinates-from-a-cpt-file/13018/3 "2025-12-05T19:00:23Z")

</div>

I’m afraid I don’t have the tpr file. I appreciate the response though!

---

<div class="post-metadata">

**Author:** ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)\
**Post date:** [December 5, 2025, 11:57pm UTC](https://gromacs.bioexcel.eu/t/is-it-possible-to-extract-coordinates-from-a-cpt-file/13018/4 "2025-12-05T23:57:39Z")

</div>

From the `cpt` file you can get the coordinates, but they are not reported in the “normal” way, i.e., as part of some kind of structural file that you can visualize, but as a long vector. You can give it a look, just dump the cpt with `gmx dump -cp your_cpt_file.cpt > output.txt` and then read the text file. In principle if you have the full topological information you should be able to rebuild the frame from these coordinates, but it is going to be a lot of work.

Now that I think about it, maybe if you have the exact topology (so same molecules in same order and number) you can try to build a new box with the same components without caring about the coordinates, and then you compile with `grompp` a new `tpr` file passing the new structure with `-c` and the old checkpoint file as `-t`. In fact the manual for `grompp` reports that

> Starting coordinates can be read from trajectory with -t. The last frame with coordinates and velocities will be read, unless the -time option is used. Only if this information is absent will the coordinates in the -c file be used. Note that these velocities will not be used when gen\_vel = yes in your .mdp file.

So, I think this new `tpr` will have the the coordinates of the checkpoint file, and then you can get them as structure file with something like `gmx editconf -f new.tpr -o structure.pdb`. Anyway, this is still only a frame, the information about the trajectory is still not there, but in case you need to retrieve the status it should work.

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [December 15, 2025, 2:53pm UTC](https://gromacs.bioexcel.eu/t/is-it-possible-to-extract-coordinates-from-a-cpt-file/13018/5 "2025-12-15T14:53:17Z")

</div>

gmx trjconv can take a cpt file as input and write coordinates in any format supported by GROMACS.
