Trouble with .tpr reference stucture for gmx rms

GROMACS version: gmx mdrun, 2020.2-dev-20200430-5e78835-unknown
GROMACS modification: No

I’ve noticed some inconsistencies with certain gmx analysis functions when using a .tpr file as structure file.

This is what I did:

# Generating tpr file based on last .cpt of equilibration and running simulation
gmx grompp -f production.mdp -o production.tpr -c equilibration.gro -t equilibration.cpt -p topol.top -n index_new.ndx
gmx mdrun -deffnm production

# First removing periodic boundry conditions and then doing rot+trans fitting
{ echo protein; echo system; } | gmx trjconv -f production.xtc -s production.tpr -o center_all.xtc -center -pbc mol -ur compact
{ echo protein; echo system; } | gmx trjconv -f center_all.xtc -s production.tpr -o center_all.xtc -fit rot+trans -t0 0

# Splicing only the protein+ligands from the trajectory and dumping the first frame
{ echo Holo_complex; } | gmx trjconv -s production.tpr -f center_all.xtc -n index_analysis.ndx -o center_Holo_complex.xtc
{ echo Holo_complex; } | gmx trjconv -s production.tpr -f center_all.xtc -n index_analysis.ndx -o center_Holo_complex.pdb -dump 0

# Converting original .tpr file using the same index group.
{ echo Holo_complex; } | gmx convert-tpr -s production.tpr -n index_complex.ndx -o center_Holo_complex.tpr

{ echo Holo_complex; echo Holo_complex; } | gmx rms -f center_Holo_complex.xtc -s center_Holo_complex.tpr -n index_complex.ndx -o rmsd_protein_tpr.xvg -tu ns
{ echo Holo_complex; echo Holo_complex; } | gmx rms -f center_Holo_complex.xtc -s center_Holo_complex.pdb -n index_complex.ndx -o rmsd_protein_pdb.xvg -tu ns

I always assumed that the structure in the .tpr file would be identical to the last frame in the .xtc file I supply to gmx grompp. In this case it should be practially identical to the first frame of my production trajectory. Is this correct?

However I’ve noticed that I’m getting vastly different RMSD values from gmx rms and gmx rmsf depending on whether I supply it with the .tpr file or with a .pdb strucuture of the first frame of my trajectory. Using the .tpr file the RMSD values don’t even start at 0.

The only differences between the .tpr structure and the .pdb structure could come from rewrapping the coordinates. But all fitting etc. should only change the origin of the coordinate system and not the relative position of particles. I would have assumed that it makes no difference which stucture I use for RMSD and especially RMSF calculations.
In fact both structure files give the same result with gmx mindist.

I have no idea what’s going on with this. Hope you can help.