# Fit Gromacs trajectory to a "broken" pdb file (transmembrane protein RMSF)

**URL:** <https://gromacs.bioexcel.eu/t/fit-gromacs-trajectory-to-a-broken-pdb-file-transmembrane-protein-rmsf/3603>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [February 4, 2022, 12:05pm UTC](https://gromacs.bioexcel.eu/t/fit-gromacs-trajectory-to-a-broken-pdb-file-transmembrane-protein-rmsf/3603 "2022-02-04T12:05:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cfr](https://avatars.discourse-cdn.com/v4/letter/c/90ced4/32.png) [@cfr](https://gromacs.bioexcel.eu/u/cfr)\
**Post date:** [February 4, 2022, 12:05pm UTC](https://gromacs.bioexcel.eu/t/fit-gromacs-trajectory-to-a-broken-pdb-file-transmembrane-protein-rmsf/3603/1 "2022-02-04T12:05:51Z")

</div>

GROMACS version: 2020.6  
GROMACS modification: No

Dear all,  
I did a MD simulation of a transmembrane protein in a membrane. I want to calculate the RMSF for the protein, which has a very stable structure in the membrane, but very fast-moving parts in the periplasmic region. So, I wanted to use as a reference for the RMSD only the less-moving parts.  
I am therefore trying to fit the gromacs trajectory to a “broken” pdb file (containing only the amino-acids of the protein part inside the membrane). Can this be done? If yes, how?

---

<div class="post-metadata">

**Author:** ![Anna13](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@Anna13](https://gromacs.bioexcel.eu/u/Anna13)\
**Post date:** [February 4, 2022, 1:10pm UTC](https://gromacs.bioexcel.eu/t/fit-gromacs-trajectory-to-a-broken-pdb-file-transmembrane-protein-rmsf/3603/2 "2022-02-04T13:10:59Z")

</div>

Hi,  
if I understood your point I would suggest you to create a index file containing the atoms you want to use as reference (the less-moving ones) and than feed this index to gmx rms:

gmx rms -f .xtc -s .gro/.tpr -n index.ndx -fit rot+trans

you will be asked to select a group for least squares fit (less-moving atoms) and a group for RMSD calculation

Hope it helps!

---

<div class="post-metadata">

**Author:** ![cfr](https://avatars.discourse-cdn.com/v4/letter/c/90ced4/32.png) [@cfr](https://gromacs.bioexcel.eu/u/cfr)\
**Post date:** [February 7, 2022, 1:31pm UTC](https://gromacs.bioexcel.eu/t/fit-gromacs-trajectory-to-a-broken-pdb-file-transmembrane-protein-rmsf/3603/3 "2022-02-07T13:31:09Z")

</div>

Hi, thank you a lot, I will try this way!

---

<div class="post-metadata">

**Author:** ![rkhayat](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@rkhayat](https://gromacs.bioexcel.eu/u/rkhayat)\
**Post date:** [May 12, 2022, 1:47am UTC](https://gromacs.bioexcel.eu/t/fit-gromacs-trajectory-to-a-broken-pdb-file-transmembrane-protein-rmsf/3603/4 "2022-05-12T01:47:24Z")

</div>

Hi,  
Unfortunately, version 2022.1b does not allow for different fitting and calculation groups. Consequently, both fitting and calculations are performed on the same group despite two groups being present in the index file. Is this something that was removed in the latter version of Gromacs? If so, why? Is there an issue with the code/approach?
