[gmx-developers] Changes in g_hbond

Erik Marklund erikm at xray.bmc.uu.se
Thu Jun 15 14:17:15 CEST 2006


I just submitted my changes to g_hbond. The following was fixed/changed:

* Fixed the -contact option, so that it works properly with -life, -ac,
-hbn, -hbm.

* Fixed previously undiscovered bug that caused the program to miss the
last frame of a particular hbond/contact. This is especially important
when using large timesteps compared to the simulation time, or when
analyzing rare interactions. The cause was the slightly non-intuitive
use of the structure member t_hbond->nframes. The cure was to simply
replace an < with an <=. This was a bug that appeared in many parts of
the code, and affected the output and calculations when using -life, -
ac, -hbn, -hbm and perhaps a few more options. Hopefully I managed to
find and fix them all.

* Moved the merging up a few lines, before the call to dump_hbmap, so
that the -hbm-output now matches the -hbn-output. In other words: the
entries in index-file now matches the lines of the existence matrix.

* Made minor changes to stdout-output to better match use of the -
contact flag.

* Added legend to the -ac xvg-output

* Changed the arguments in *mk_hbdata() from
  (bool bHBmap,bool bDAnr,bool bMerge)
into
  (bool bHBmap,bool bDAnr,bool oneHB),
which is mostly cosmetic, but it better reflects the fact that -contact
should entail that only one interaction is possible between a pair of
atoms is possible. The call to *mk_hbdata() was changed accordingly.

* Added comments wherever I made the above changes.

########## Additional change #############

Changed

  resdist=abs(top.atoms.atom[id].resnr-top.atoms.atom[ia].resnr);

into

  resdist=abs(top.atoms.atom[i].resnr-top.atoms.atom[j].resnr);

As suggested by Marie-Pierre Durrieu on the gmx-user mailing list June
15. 2006

/Erik Marklund, June 15 2006



-- 
Erik Marklund, PhD Student, Molecular Biopcysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,          75124 Uppsala, Sweden
phone:  46 18 471 4537          fax: 46 18 511 755
erikm at xray.bmc.uu.se




More information about the gromacs.org_gmx-developers mailing list