[gmx-users] Does gmx distance correct for broken molecules from pbc?

Ramon Crehuet ramon.crehuet at iqac.csic.es
Fri Aug 4 09:46:42 CEST 2017

Dear all, 

I have a system composed of a trimeric protein and a double stranded DNA. I would like to calculate the distance between the center of mass (com) of the protein and the com of the DNA (I am working with the NVT equilibration trajectory as an example). I tried: 

gmx distance -f nvt.trr -s nvt.tpr -select 'com of group Protein plus cog of group DNA' -xvg none -oall -rmpbc 

This gave distances that seem too long. Then I created a trajectory removing the PBC: 

gmx trjconv -f em.gro -s em.tpr -o whole.pdb -pbc nojump 
gmx trjconv -f nvt.trr -o whole.xtc -s whole.pdb -pbc nojump 

And calculated the distances again: 

gmx distance -f whole.xtc -s whole.pdb -select 'com of group Protein plus cog of group DNA' -xvg none -oall -rmpbc 

This gives reasonable results, different from the previous call to gmx distance. In an attempt to avoid calculating the whole.xtc trajectory I gave a pdb file that doesn't have broken molecules: 

gmx distance -f nvt.trr -s whole.pdb -select 'com of group Protein plus cog of group DNA' -xvg none -oall -rmpbc 

But this still gives the wrong result. I thought the flag -rmpbc would make molecules whole, but apparently it doesn't in my case. Is there a way to calculate the distance directly from the original trajectory? 

Thanks in advance, 



Ramon Crehuet 

Cientific Titular (Assistant Professor) 

Institute of Advanced Chemistry of Catalonia IQAC - CSIC 


Tel. +34 934006116 
Jordi Girona 18-26 
08034 Barcelona (Spain)

More information about the gromacs.org_gmx-users mailing list