[gmx-users] Calculate individual force between each atom pair
Mark Abraham
Mark.Abraham at anu.edu.au
Fri May 18 01:14:22 CEST 2007
WU Yanbin wrote:
> Hi, Everyone,
> The force given by .trr file is the total force acted on each atom.
> Now I would like to modify codes to calculate individaul force between
> each atom pair. Is it possible in gromacs? (Because I remember some part
> of gromacs is writen in Fortran and already compiled).
Err, no, not Fortran. The inner loops for calculating energies and
forces are written in assembly for some common architectures, and there
are fall-back routines in C. It would not be too hard to modify these C
routines to write the nonbonded force between pairs of atoms in the
inner loops. Writing that to output is likely to be unreasonably slow,
and generate an unreasonably large data size (it's effectively a
trajectory of size N^2 now). Depending on your application you might not
need to write the numbers to a file, but you haven't told us what you
want here.
In any case, think very carefully about what you want to do, and then be
prepared to understand the whole structure of mdrun, and lots of fine
detail inside do_force()
Mark
More information about the gromacs.org_gmx-users
mailing list