[gmx-users] water insertion in hbond analysis
David van der Spoel
spoel at xray.bmc.uu.se
Fri Feb 24 20:57:40 CET 2006
Lydia wrote:
> 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.
It won't work I'm afraid. This code is rather complex and it has been
changed quite recently to fix bugs and add features. There is a
bugzilla about g_hbond, so it will eventually get fixed.
> Sincerely
> Jianping
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gmx-users mailing list gmx-users at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-users
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-request at gromacs.org.
> Can't post? Read http://www.gromacs.org/mailing_lists/users.php
--
David.
________________________________________________________________________
David van der Spoel, PhD, Assoc. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596, 75124 Uppsala, Sweden
phone: 46 18 471 4205 fax: 46 18 511 755
spoel at xray.bmc.uu.se spoel at gromacs.org http://xray.bmc.uu.se/~spoel
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
More information about the gromacs.org_gmx-users
mailing list