# How to fix RMSD analysis results?

**URL:** <https://gromacs.bioexcel.eu/t/how-to-fix-rmsd-analysis-results/7504>\
**Category:** User discussions\
**Tags:** gmx-trjconv\
**Created:** [October 30, 2023, 9:59am UTC](https://gromacs.bioexcel.eu/t/how-to-fix-rmsd-analysis-results/7504 "2023-10-30T09:59:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nhina](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@nhina](https://gromacs.bioexcel.eu/u/nhina)\
**Post date:** [October 30, 2023, 9:59am UTC](https://gromacs.bioexcel.eu/t/how-to-fix-rmsd-analysis-results/7504/1 "2023-10-30T09:59:13Z")

</div>

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

I’m analyzing RMSD results for free energy perturbation (FEP). I execute a command below, corresponding to 2 loops but the graph results do not match each other (chart below), how can I fix it?

gmx trjconv -f md\_0.xtc -s md\_0.tpr -ur compact -pbc mol -center -o traj\_0.xtc -n Pro\_MOL\_noH.ndx  
gmx rms -f md\_0.xtc -s md\_0.tpr -o rmsd\_noH\_0.xvg -tu ns -n Pro\_MOL\_noH.ndx

 ![dsfd](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/a/a9b4d9142d4b4bafe0470a675258691bedd05aa5.png)

---

<div class="post-metadata">

**Author:** ![FarzaneJP](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/farzanejp/32/1211_2.png) [@FarzaneJP](https://gromacs.bioexcel.eu/u/FarzaneJP)\
**Post date:** [October 31, 2023, 9:52am UTC](https://gromacs.bioexcel.eu/t/how-to-fix-rmsd-analysis-results/7504/2 "2023-10-31T09:52:57Z")

</div>

Based on the results you have provided, the initial guess might be the PBC issue. I recommend visually inspecting your system using VMD to get a better understanding. If it is PBC issue you can fix it by [GROMACS 3-step workflow](http://manual.gromacs.org/current/user-guide/terminology.html#suggested-workflow).

---

<div class="post-metadata">

**Author:** ![nhina](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@nhina](https://gromacs.bioexcel.eu/u/nhina)\
**Post date:** [November 1, 2023, 8:19am UTC](https://gromacs.bioexcel.eu/t/how-to-fix-rmsd-analysis-results/7504/3 "2023-11-01T08:19:21Z")

</div>

I have changed the command like:

gmx trjconv -f md\_0.xtc -s md\_0.tpr -ur compact -pbc nojump -center -o traj\_0.xtc -n Pro\_MOL\_noH.ndx  
gmx rms -f md\_0.xtc -s md\_0.tpr -o rmsd\_noH\_0.xvg -tu ns -n Pro\_MOL\_noH.ndx

yet, i still got two different graph for RMSD.

Please correct me if i am wrong.

---

<div class="post-metadata">

**Author:** ![AKA](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@AKA](https://gromacs.bioexcel.eu/u/AKA)\
**Post date:** [November 5, 2023, 1:42am UTC](https://gromacs.bioexcel.eu/t/how-to-fix-rmsd-analysis-results/7504/4 "2023-11-05T01:42:49Z")

</div>

Your xtc file may be corrupted. You may have to rerun the simulation

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [November 5, 2023, 12:15pm UTC](https://gromacs.bioexcel.eu/t/how-to-fix-rmsd-analysis-results/7504/5 "2023-11-05T12:15:33Z")

</div>

It is almost certainly a PBC issue and not a problem with the xtc file.

With your `gmx trjconv` command you have generated a new trajectory, called `traj_0.xtc`. You need to use that as input to the `gmx rms` command:  
`gmx rms -f traj_0.xtc -s md_0.tpr -o rmsd_noH_0.xvg -tu ns -n Pro_MOL_noH.ndx`

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [November 5, 2023, 12:45pm UTC](https://gromacs.bioexcel.eu/t/how-to-fix-rmsd-analysis-results/7504/6 "2023-11-05T12:45:50Z")

</div>

I would also avoid using the `-ur compact` option when you want to avoid PBC effects. Try:  
`gmx trjconv -f md_0.xtc -s md_0.tpr -pbc nojump -o traj_0.xtc -n Pro_MOL_noH.ndx`  
`gmx rms -f traj_0.xtc -s md_0.tpr -o rmsd_noH_0.xvg -tu ns -n Pro_MOL_noH.ndx`

---

<div class="post-metadata">

**Author:** ![nhina](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@nhina](https://gromacs.bioexcel.eu/u/nhina)\
**Post date:** [November 5, 2023, 2:13pm UTC](https://gromacs.bioexcel.eu/t/how-to-fix-rmsd-analysis-results/7504/7 "2023-11-05T14:13:31Z")

</div>

Thank you for you reply.  
I have tried your suggested command but when i used  
gmx rms command with new traj\_0.xtc as input, my program error (like picture).

I have tried to make a matching run input file with gmx convert-tpr but it is still wrong

Please correct me.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/7/7525c2645d690f6d6ff6a40a3001005e847f430d.png)

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [November 5, 2023, 4:42pm UTC](https://gromacs.bioexcel.eu/t/how-to-fix-rmsd-analysis-results/7504/8 "2023-11-05T16:42:53Z")

</div>

I would recommend to output the whole system when you do `gmx trjconv`. Otherwise you will have to make a new tpr file with only the molecules that you have written to the xtc file. You should be able to do that with convert-tpr, but I think it’s making things more complex than necessary.
