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

David van der Spoel spoel at xray.bmc.uu.se
Thu May 3 08:05:20 CEST 2007


Yang Ye wrote:
> 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]); 
> 
>   }
> 
I don't understand... The purpose of this fix was not to have PBC at all.
If the simulation is with PBC than distance will be less than one 
box-diagonal anyway. However if you don't have pbc (infinite system) you 
still would like to be able to handle that in some way.
-- 
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://folding.bmc.uu.se
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



More information about the gromacs.org_gmx-developers mailing list