[gmx-users] -com switch in g_rdf

Thomas Schlesier schlesi at uni-mainz.de
Tue Apr 24 14:06:10 CEST 2012

Using the option '-com' results in a RDF were the reference group is the 
center of mass (COM) of the first group.
-> In a system with pure benzene and using the whole system as a group, 
this reference point would be somewhere in the middle of the box. And 
choosing this group twice, would result in a RDF of the distances of 
every benzene atom to the reference point (somewhere in the middle of 
the box).

What you are looking is the option: -rdf:
-rdf         enum   atom    RDF type: atom, mol_com, mol_cog, res_com or
whereas 'atom' is the standard option (calculating RDF between every 
atom of both groups)
For calculating the benzene COM-COM RDF you would need the option '-rdf 
mol_com' and choosing the index-group which consists of all benzene 
atoms twice.

Hope this helps



If you have time, I have a somewhat embarrassing question to ask.  It is
embarrassing because I feel like I should be able to understand or search
for the answer, but I have not had success.  So I apologize if this is a
silly question (and it probably is).

On the mailing list, I have read this post from several years ago:


The poster asks if one can use the -com option in g_rdf to calculate the
(benzene center-of-mass)-(benzene center-of-mass) radial distribution
function.  Dr. van der Spoel responds and says that the -com option "only
computes COM of the central group. What you want is not implemented."

My question is, what is the "central group"?

g_rdf asks the user to select two entries for computing the RDF.  Typically
I have been doing atom-atom RDFs.  This is straightforward; if I have a
system of water with atoms OW and HW, and I want to compute the OW-HW RDF, I
just need to make two index file entries: one with all of the OW atoms, and
one with all of the HW atoms.

But what happens if I have a system of benzene and I want to compute the
(benzene center-of-mass)-(benzene center-of-mass).  This is not possible in
the current implementation, I guess, because the index file does not "know"
about molecules (only about atoms).  My question is, what if I selected all
of the atoms in my pure benzene system, and used this selection for both
selections as prompted by g_rdf.  What would this compute if I used the -com
switch?  Since the index file does not know about molecules, it wouldn't
compute the center mass of each benzene molecule.  But my question is, of
what would it compute the center of mass?

Thank you!

Andrew DeYoung
Carnegie Mellon University

More information about the gromacs.org_gmx-users mailing list