[gmx-users] water insertion in hbond analysis

Lydia aether2006 at gmail.com
Fri Feb 24 20:55:05 CET 2006


Dear all,

    I'm doing hbond analysis with the option -ins in gromacs 3.3 to find the
water mediated hydrogen bonds.  In the output file, I found no list of
bridging water in the files (insert.dat and hbond.ndx).  Then I look at the
source code src/tools/gmx_hbond.c , I notice that the output command lines
about bridging water are commented out. For example, around line 1986 in
gmx_hbond.c:
----------------------------------------------------------------------------------------------------------------------
                       if (ins_d && ins_a && ihb) {
                          /* add to hbond index if not already there */
                          add_hbond(hb,ins_d_k,ins_a_k,h,grI,ogrp,
                                    nframes,TRUE,bMerge,ihb);


                          /* print insertion info to file */
                          /*fprintf(fpins,
                            "%4g: %4u:%3.3s%4d%3.3s -> "
                            "%4u:%3.3s%4d%3.3s (%4.2f,%2.0f) - "
                            "%4u:%3.3s%4d%3.3s (%4.2f,%2.0f)\n",t,
                            a[grIA][ins_d_k]+1,
                            *top.atoms.resname[top.atoms.atom
[a[grIA][ins_d_k]].resnr],
                            top.atoms.atom[a[grIA][ins_d_k]].resnr+1,
                            *top.atoms.atomname[a[grIA][ins_d_k]],
                            a[grp+grD][i]+1,
                            *top.atoms.resname[top.atoms.atom
[a[grp+grD][i]].resnr],
                            top.atoms.atom[a[grp+grD][i]].resnr+1,
                            *top.atoms.atomname[a[grp+grD][i]],
                            ins_d_dist,ins_d_ang*RAD2DEG,
                            a[ogrp+grA][j]+1,
                            *top.atoms.resname[top.atoms.atom
[a[ogrp+grA][j]].resnr],
                            top.atoms.atom[a[ogrp+grA][j]].resnr+1,
                            *top.atoms.atomname[a[ogrp+grA][j]],
                            ins_a_dist,ins_a_ang*RAD2DEG);*/
                        }
---------------------------------------------------------------------------------------------------------------------

      Then I notice around line 1506, there are another part of the printout
being commented out.
-------------------------------------------------------------------------------------------------------------------------------
  if (bInsert) {
    if (bTwo)
      fprintf(fp,"[ insert_%s->%s-%s ]",
              grpnames[2],grpnames[0],grpnames[1]);
    else
      fprintf(fp,"[ insert_%s->%s ]",grpnames[2],grpnames[0]);
    j=0;


    /*  for(i=0; (i<hb->nrhb); i++) {
        if (hb->hb[i].bInsert) {
        fprintf(fp,(j%15)?" ":"\n");
        fprintf(fp,"%4d",i+1);
        j++;
        }
        }*/
    fprintf(fp,"\n");
  }
-------------------------------------------------------------------------------------------------------------------------------
      Is there a reason for commenting out the printout function?  Can I
uncomment it  and recompile to see the list of inserted water correctly? Any
help and suggestions are greatly appreciated.
Sincerely
Jianping
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20060224/2b0393e6/attachment.html>


More information about the gromacs.org_gmx-users mailing list