How to calculate trajectory RMSD for N individual residues/atoms?

GROMACS version: 2019.4
GROMACS modification: No

Hi, everyone. I was hoping to see if there’s a way to calculate RMSD for every residue specified (e.g. with an index.ndx file input) in a trajectory (e.g. .xtc file). In gmx rms, you can calculate the RMSD for the entire trajectory, but it seems to take the entire specified structure and calculate the RMSD from it. Is there another way to calculate RMSD that outputs a matrix with the RMSD over time/trajectory for every residue. For example…

I might want RMSD for the “core” of the protein, which is residue 1, 3, 8, 9, …

How do I get an output with something like:

Res Time
1 … 0.5, 0.55
3 … 0.3, 0.33
8 … 0.6, 0.67
9 … 0.3, 0.32

Instead of something like the following with my current .xvg file:

Time RMSD (of entire selection)
1 … 0
2 … 0.1
3 … 0.2
4 … 0.25


As far as I know there is not tools that gives exactly the output you want.
But you can generate an index file having a group for each residue and then run gmx rms for each case (keeping the reference structure the same - option -s - to get comparable results)

Or if you are interested only in the averaged values you can use

Best regards