# Recenter coordinate from extended simulation

**URL:** <https://gromacs.bioexcel.eu/t/recenter-coordinate-from-extended-simulation/4854>\
**Category:** User discussions\
**Created:** [September 23, 2022, 11:58pm UTC](https://gromacs.bioexcel.eu/t/recenter-coordinate-from-extended-simulation/4854 "2022-09-23T23:58:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jxdlneto](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jxdlneto](https://gromacs.bioexcel.eu/u/jxdlneto)\
**Post date:** [September 23, 2022, 11:58pm UTC](https://gromacs.bioexcel.eu/t/recenter-coordinate-from-extended-simulation/4854/1 "2022-09-23T23:58:02Z")

</div>

GROMACS version: 2021.3  
GROMACS modification: Yes/No

Dear users,  
I performed a 1 ns MD simulation of a protein in water, and used the following commands to increase in 1ns:

> gmx convert-tpr -s md.tpr -extend 1000 -o md\_2ns.tpr  
> gmx mdrun -nt 32 -v -deffnm md\_2ns -cpi md.cpt -noappend

It creates new files named md\_2ns.part0002.\*. As my system was in a “dodecahedral” box, I used the following command to recenter the protein:

> gmx trjconv -s md\_2ns.tpr -f md\_2ns.part0002.xtc -o md\_center.xtc -center -pbc mol -ur compact

When I tried to look for the RMSD, it showed me the 1ns result, not the 2ns. I’ve compared the 1ns with the 2ns RMSD (I thought it was showing only the extended 1ns), but they were the same

> gmx rms -s md\_2ns.tpr -f md\_2ns.part0002.xtc -o rmsd.xvg -tu ns

Could someone show me where I’m mistaken?

---

<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 24, 2022, 1:52am UTC](https://gromacs.bioexcel.eu/t/recenter-coordinate-from-extended-simulation/4854/2 "2022-09-24T01:52:35Z")

</div>

You’re only analyzing the second nanosecond. If you want to analyze the full 2-ns simulation time, you need to first use `trjcat` to write a concatenated trajectory file from `md.xtc` and `md_2ns.part0002.xtc`.

---

<div class="post-metadata">

**Author:** ![jxdlneto](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jxdlneto](https://gromacs.bioexcel.eu/u/jxdlneto)\
**Post date:** [September 24, 2022, 3:03am UTC](https://gromacs.bioexcel.eu/t/recenter-coordinate-from-extended-simulation/4854/3 "2022-09-24T03:03:15Z")

</div>

Thank you @jalemkul  
Is it right?  
I used:

> gmx trjcat -f md.xtc md\_2ns.part0002.xtc -o final2ns.xtc

It creates a new xtc file. After, I used:

> gmx trjconv -f final2ns.xtc -s md.tpr -o md\_center.xtc -pbc mol -center -ur compact

It showed a 2ns RMSD.  
To use the _trjconv_ and _rms_, I included the -s (.tpr file). Should I use the first (md.tpr) or the second (md\_2ns.tpr) file?

---

<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 24, 2022, 3:14am UTC](https://gromacs.bioexcel.eu/t/recenter-coordinate-from-extended-simulation/4854/4 "2022-09-24T03:14:35Z")

</div>

It doesn’t matter. They contain identical information (including the starting coordinates), just a different number of steps for the simulation.

---

<div class="post-metadata">

**Author:** ![jxdlneto](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jxdlneto](https://gromacs.bioexcel.eu/u/jxdlneto)\
**Post date:** [September 24, 2022, 6:12pm UTC](https://gromacs.bioexcel.eu/t/recenter-coordinate-from-extended-simulation/4854/5 "2022-09-24T18:12:42Z")

</div>

ok  
Thanks @jalemkul
