[gmx-users] about rdf

Justin A. Lemkul jalemkul at vt.edu
Tue Sep 7 02:33:08 CEST 2010

Moeed wrote:
> Hello,
> 1- In the manual I see rdf plot for Oxygen-Oxygen of SPC-water.  I think 
> this shows the average O-O density between all water molecules. I read a 
> post saying that rdf is calculating C_C distances for each C on chain 1 
> for instance and all other C on the chain and other chains..
> http://lists.gromacs.org/pipermail/gmx-users/2006-November/024831.html

I don't see how you drew that conclusion from that post.  g_rdf calculates 
probabilities based on all atomic pairs in the index group selection, unless 
-com is invoked, in which case the center of mass of the reference group is used.

> Now I am trying to do the same thing to get rdf for C-C or C-H for 
> polymer chains. I looked into default index groups and I guess  
> Protein-H, BAckbone and Mainchain groups for my system should give only 
> carbon atoms (I have only polyethylene chains), and Non-Protein should 
> give only H. but I do not know how I can use them since System is the 
> only default group I see.

Do you have protein molecules?  If not, then you won't have default groups like 
Protein, Protein-H...

> 2- What doesy axis show? the average number density? ( I am calculating 

Please use Google to answer this question.

> rdf between chains 1 and 2 for instance. y-axis is in the range of 0-300 
> ?! and x-axis varies between 0-15 nm?!. normally g(r) is in the range of 
> 1 to 5 ..). and also I noticed it takes much time for the program to 

Normally?  Based on what assessment?  Unless you have exceptionally good 
sampling, your RDF plot probably won't converge very well for large molecules, 
especially if you are analyzing all possible atomic pairs.

> read all frames when I issue the command below even for only 2 chains 
> having 60 ethylene units. Am I doing something wrong?

No, but g_rdf is doing something on the order of 362*362 calculations, so you 
can count on that taking a lot of time (and memory).


> g_rdf -f *.trr -s *.tpr -o rdf -n *.ndx
> Group     0 (      System) has  2896 elements
> Group     1 (      PE60-1) has   362 elements
> Group     2 (      PE60-2) has   362 elements
> Group     3 (      PE60-3) has   362 elements
> Group     4 (      PE60-4) has   362 elements
> Group     5 (      PE60-5) has   362 elements
> Group     6 (      PE60-6) has   362 elements
> Group     7 (      PE60-7) has   362 elements
> Group     8 (      PE60-8) has   362 elements
> groups 1 to 8 each contain all C and H atoms in the molecule.
> Thanks,


Justin A. Lemkul
Ph.D. Candidate
ICTAS Doctoral Scholar
Department of Biochemistry
Virginia Tech
Blacksburg, VA
jalemkul[at]vt.edu | (540) 231-9080


More information about the gromacs.org_gmx-users mailing list