RMSD trouble

29 views
Skip to first unread message

joan.c...@gmail.com

unread,
Jun 18, 2025, 7:11:01 AMJun 18
to PLUMED users
Hi all

Having trouble with RMSD, with both driver and patched gmx mdrun, I try and calculate the rmsd by using the first frame of the trajectory/simulation as a reference. The first value should be 0 since the coordinates are the same, but I get 1.821371 (not sure if it's A or nm).

here's what I am doing:
gmx trjconv -s prod.tpr -f prod.xtc -b 0 -e 0 -o ref_ca.pdb
plumed driver --mf_xtc prod.xtc --plumed rmsd.dat

where rmsd.dat contains the following:
rmsd: RMSD REFERENCE=ref_ca.pdb TYPE=OPTIMAL
PRINT ARG=rmsd FILE=RMSD STRIDE=1

if I wrap the PBC before generating the reference file (gmx trjconv [...] -pbc mol -ur compact), I still get 1.763235. 

If I use the NOPBC flag, I still get values around 1.8 for the first frame. 

Is there anything obvious that I'm doing wrong? 

Thanks

joan.c...@gmail.com

unread,
Jun 18, 2025, 11:02:46 AMJun 18
to PLUMED users
**[SOLVED]**

Turns out that trjconv resets the atom numbers so that they start at 1 and are consecutive, which I guess messes with the atom pairing when calculating RMSD.

The new approach, if somebody is having similar problems, is the following:
gmx trjconv -s prod.tpr -f prod.xtc -b 0 -e 0 -o first_frame.pdb # or use the gro file you used to generate your tpr
grep CA first_frame.pdb > ref_ca.pdb # or process it in whichever way you need

With this, the RMSD in the first frame is of the order of 1e-5, which I assume corresponds to the difference between pdb and xtc accuracies.

Cheers
Reply all
Reply to author
Forward
0 new messages