[gmx-developers] proposed change to g_rdf with -nopbc

Yang Ye leafyoung at yahoo.com
Thu May 3 03:21:32 CEST 2007


Hi,

I would like to add a fix to g_rdf with -nopbc. Instead of taking the 
largest distance with PBC, the diagonal length shall be taken as the 
cut-off distance.

inside do_rdf(): ("red" marks the change)

  /* initialize some handy things */
  copy_mat(box,box_pbc);
  if (bXY) {
    check_box_c(box);
    /* Make sure the z-height does not influence the cut-off */
    box_pbc[ZZ][ZZ] = 2*max(box[XX][XX],box[YY][YY]);
  }

   if(bPBC) {
     rmax2   = 0.99*0.99*max_cutoff2(box_pbc);
   } else {
   rmax2   = 
0.99*0.99*(box[XX][XX]*box[XX][XX]+box[YY][YY]*box[YY][YY]+box[ZZ][ZZ]*box[ZZ][ZZ]);
   }

Regards,
Yang Ye




More information about the gromacs.org_gmx-developers mailing list