# Error in recentering and rewrapping coordinates

**URL:** <https://gromacs.bioexcel.eu/t/error-in-recentering-and-rewrapping-coordinates/7252>\
**Category:** User discussions\
**Tags:** gmx-trjconv\
**Created:** [September 23, 2023, 6:48am UTC](https://gromacs.bioexcel.eu/t/error-in-recentering-and-rewrapping-coordinates/7252 "2023-09-23T06:48:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nishant](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@Nishant](https://gromacs.bioexcel.eu/u/Nishant)\
**Post date:** [September 23, 2023, 6:48am UTC](https://gromacs.bioexcel.eu/t/error-in-recentering-and-rewrapping-coordinates/7252/1 "2023-09-23T06:48:24Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question

Hi everyone,  
Im facing error while executing the second command of Recentering and rewrapping coordinates tutorial of Gromacs.  
Kindly help me in resolving this error. Im attaching the command i used as well as the error i faced.

COMMAND USED: mx trjconv -s md\_1\_50.tpr -f md\_1\_50\_center.xtc -o start.pdb -dump 0

ERROR: Index[2614] 2615 is larger than the number of atoms in the  
trajectory file (2614). There is a mismatch in the contents  
of your -f, -s and/or -n files.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [September 23, 2023, 6:40pm UTC](https://gromacs.bioexcel.eu/t/error-in-recentering-and-rewrapping-coordinates/7252/2 "2023-09-23T18:40:21Z")

</div>

This error occurs when you did not save all the coordinates during the simulation (via `compressed-x-grps`). You need to create a corresponding `.tpr` file that has the same contents as the `.xtc` file. This can be done with `gmx convert-tpr` and a matching index group.

---

<div class="post-metadata">

**Author:** ![Nishant](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@Nishant](https://gromacs.bioexcel.eu/u/Nishant)\
**Post date:** [September 24, 2023, 12:31pm UTC](https://gromacs.bioexcel.eu/t/error-in-recentering-and-rewrapping-coordinates/7252/3 "2023-09-24T12:31:14Z")

</div>

Thankyou so much for your suggestions.

---

<div class="post-metadata">

**Author:** ![Nishant](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@Nishant](https://gromacs.bioexcel.eu/u/Nishant)\
**Post date:** [September 25, 2023, 9:08am UTC](https://gromacs.bioexcel.eu/t/error-in-recentering-and-rewrapping-coordinates/7252/4 "2023-09-25T09:08:59Z")

</div>

As i’m new to GROMACS, i dont have much idea to perform different steps.  
Can you please elaborate the above mentioned solution.
