[gmx-users] g_dist producing inconsistent values

Alan Dodd anoddlad at yahoo.com
Wed Feb 6 14:25:33 CET 2008

I've been using g_dist to plot distances along the normal to my bilayer between groups.  Namely in this case, between the phosphates of opposing leaflets, and the peptide.
I would expect the sum of the distances between the peptide and each leaflet's phosphates to equal the distance between the two sets of phosphates.  But they mysteriously don't.  I'm taking the z-distance to be the final value in each row, as the headers in the .xvg indicate:

@ s0 legend "|d|"
@ s1 legend "d\sx\N"
@ s2 legend "d\sy\N"
@ s3 legend "d\sz\N"
   0.0000000    3.2837145    0.0671294   -0.0351439   -3.2828403

The index groups are definitely correct (doublechecked by using trjconv -n -dump and visualising the groups so selected), so there's no error there, I'm sure.  And these are the numbers I get out for the first frame:
Peptide - leaflet 1 phosphates:    -3.3361144
Peptide - leaflet 2 phosphates:    0.2953452
Leaflet 1 - leaflet 2 phosphates:    -3.2828403
Is there an error in my understanding of how this is working?  I'm pretty certain the first two numbers should sum to the value of the third number.  Alternatively, any idea what could be going wrong?  The files being used are definitely the same, too...


Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

More information about the gromacs.org_gmx-users mailing list