Calculating distance between centroid of aromatic rings using center of geometry

GROMACS version: 2019
GROMACS modification: No
Here post your question

I want to calculate distance between centroids of Tyr and Trp. Can I use center of geometry for this? I don’t know how exactly GROMACS describes COG and if it would be appropriate for residues like TRP.

using the selection synthax, you can tune how you want to define your COG.
My suggestion will be to use the ring atoms. But it is only a suggestion.
best regards

Hello Alevilla,

Thanks for your reply. I have read the syntax and able to get the results but data doesn’t seem right. I have used following command:
gmx_mpi distance -f file.xtc -s file.tpr -n cog.ndx -oav distancecentroid.xvg

854 852 850 849 857 859

981 979 977 976 984 986

where A is ring 1 and B is ring 2. I made the file manually.

gmx distance is not the appropriate tools to use. gmx pairdist may be more appropriate. See this post for the difference


Hi Alessandra,

As you explained in this post that the difference between gmx pairdist and gmx mindist that pairdist has min as well as max values while mindist only has min value. Both seems equally appropriate to me as far my problem is concerned. However, mindist is also not giving me intuitive values.


I though you were interested in the cog distance. gmx mindist does not have any option to set it, while gmx pairdist has the option to define cog for the ref and select groups.
Best regards