spoel at xray.bmc.uu.se
Sat Jun 7 12:32:57 CEST 2003
On Sat, 2003-06-07 at 16:59, Daniele Bemporad wrote:
> Thanks for this, things begin to be clearer. Now, what is the criterion
> according to which, for instance, "f_i" must be added to the virial in
> box "t1", "f_j" to the "CENTRAL" box, "f_k" to "t2", and so on ? I
> mean, how are the values of "t1", "t2" and "t3" chosen ? If the
> answer is in appendix B (single sum virial), then I suppose I need to
> understand what "[...] pick one of the grey atoms (atom j) and give it
> the correct periodicity w.r.t. any of its black neighbours [...]" means.
> Is it correct if I say that it means "pick atom j and consider the
> distance of its nearest image from i" ? So, assuming the central box is
> number 13, why sometimes do I get either "t1" or "t2" or "t3" different
> from 13 even when in the last line of my .gro file I set the box
> dimensions ~200 times larger than x_minimum, x_maximus, y_minimum,
> y_maximus, z_minimum, z_maximus of my molecule, thus expecting the
> nearest distance always being in the central box ?
For nonbonded forces it is easy. j is in the central box, i may be
outside. The reason for this is that we loop over j atoms for a given i
atom, and we then do not have to compute PBC in the inner loop (but we
do in the outer loop).
For bondeds we define a relative shift. We start with the first atom I
in a molecule and put it in the central box. Then we follow all the
bonds from I (recursively) and make sure that those atoms have a shift
consistent with that of atom I. That means that if I is in the central
box, and the atom bonded to it should be in an image box in order to get
correct bond lengths, we adjust the shift on J to move it there.
This way, we don't have to do PBC tests in the bonded routines either.
Together these optimization yield almost a factor of two in performance
even without assembly.
> Thanks again
> Daniele Bemporad
> On 6 Jun 2003, David wrote:
> > On Fri, 2003-06-06 at 20:30, Daniele Bemporad wrote:
> > > Hi all, hi David
> > > In the previous e-mail I forgot to also ask about "fshift[is3]" in
> > > innerc.c and its arguments is3, is3+1, is3+2.
> > > The problem is that if I change the calculation of the force and I update
> > > the variable "f [atom number] [x, y or z axis]" , I get NO effect on the
> > > atomic positions, unless I also update this (still mysterious to me)
> > > variable "fshift". What is this about ? Can please anybody tell me what
> > > exactly the 2 elements of the array are in bonded and non-bonded
> > > interactions: fr->fshift[1st_element][2nd_element] ?
> > This is the total force exerted on each of the 27 copies of the unit
> > cell. This force is only used for computing the virial.
> > It is an array of 27 vectors with X,Y,Z component.
> > If your modification has no effect, then you may be using another
> > routine than you think you are (there are > 70 different innerloop
> > routines). Bonded forces are somewhat more straightforward.
> > > Thanks a lot
> > > Daniele Bemporad
> > >
> > > On 6 Jun 2003, David wrote:
> > >
> > > > On Fri, 2003-06-06 at 19:47, Daniele Bemporad wrote:
> > > > > Hi all
> > > > > Can anybody please explain me or tell me where I can find an explanation
> > > > > for the variable "fr->fshift[*]" (with *=t1,t2,t3,CENTRAL) in subroutines
> > > > > "do_dih_fup" and "angles" in file bondfree.c ? And an explanation for its
> > > > > arguments t1,t2,t3,CENTRAL ?
> > > > there's a bit of an explanation in the appendix of the manual.
> gmx-developers mailing list
> gmx-developers at gromacs.org
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-developers-request at gromacs.org.
Dr. David van der Spoel, Dept. of Cell and Molecular Biology
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-developers