[gmx-developers] proposed change to g_rdf with -nopbc
Yang Ye
leafyoung at yahoo.com
Thu May 3 12:39:48 CEST 2007
My system has an extensible rod-like structure which may elongate more
than half the diagonal distance. It is then desirable for g_rdf to count
this distance with -nopbc. I believer that g_rdf actually get this
distance but because it is out of the cut-off distance, it doesn't get
counted. To be consistent, -nopbc shall have a (possible) longest
cut-off distance for RDF calculation. Because max_cutoff2() doesn't
return such long distance, I add the code to get the diagonal length.
On 5/3/2007 2:05 PM, David van der Spoel wrote:
> 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.
More information about the gromacs.org_gmx-developers
mailing list