[gmx-developers] Re: NMR refinement
Bogdan Costescu
bcostescu at gmail.com
Tue Jan 15 11:56:56 CET 2013
On Sun, Jan 13, 2013 at 5:54 PM, santhosh <mesanthu at gmail.com> wrote:
> I want a handle on the code which does the following steps :
> 1). Before the actual integration, I want to call a custom code which does
> its job and returns a force vector.
Is this really one vector for the whole molecular system or for a
group ? This looks suspiciously like the pull code...
> 2). This force vector could be added to the existing force from the
> forcefield.
That's quite a vague description...
Per atom forces are calculated using the current coordinates of the
atoms and constants from the force field and accumulated into a
variable called "f", declared as "rvec f[]". Atoms are numbered from
0, so f[0] allows access to the (vector) force corresponding to atom
0. Operations on vectors are defined in include/vec.h.
> 3). And integration proceeds to the next step and we repeat these three
> steps.
You probably need to look into do_md() in src/kernel/md.c.
> But I am not sure, since there is partitioning.
If you really want to add a single force vector, you could easily
distribute it to all DD cells via a broadcast operation.
Cheers,
Bogdan
More information about the gromacs.org_gmx-developers
mailing list