[gmx-users] export hydrogen bond indices per timestep

YOLANDA SMALL yas102 at psu.edu
Mon Jul 10 01:17:11 CEST 2006


Does anyone know which lines need to be changed in the gmx_hbond.c code to
determine which donor-hydrogen-acceptor indices exist at each timestep?

In other words, I would like to export lines 1483 to 1505 (see below) for every
timeslice where a hydrogen bond is located (lines 2069 to 2073):

------begin line 1483----------
 if (bTwo)
    fprintf(fp,"[ hbonds_%s-%s ]\n",grpnames[0],grpnames[1]);
    fprintf(fp,"[ hbonds_%s ]\n",grpnames[0]);

  for(i=0; (i<hb->d.nrd); i++) {
    ddd = hb->d.don[i];
    for(k=0; (k<hb->a.nra); k++) {
      aaa = hb->a.acc[k];
      for(m=0; (m<hb->d.nhydro[i]); m++) {
        if (hb->hbmap[i][k] && ISHB(hb->hbmap[i][k]->history[m])) {
          hhh = hb->d.hydro[i][m];

          fprintf(fp,"%6u %6u %6u\n",ddd+1,hhh+1,aaa+1);
          if (fplog)
            fprintf(fplog,"%12s  %12s  %12s\n",ds,hs,as);
--------end line 1505------------

--------begin line 2069----------
  for(i=0; (i<nframes); i++) {
    fprintf(fp,"%10g  %10d  %10d\n",hb->time[i],hb->nhb[i],hb->ndist[i]);
    aver_nhb  += hb->nhb[i];
    aver_dist += hb->ndist[i];
--------end line 2073------------

Thanks in advance for your help,

More information about the gromacs.org_gmx-users mailing list