[gmx-users] Force Calculation
Mark Abraham
Mark.Abraham at anu.edu.au
Thu Jun 29 04:28:26 CEST 2006
Justin M. Shorb wrote:
> Greetings!
>
> I have managed to hack through all the Gromacs code and at the bottom of
> it all are machine-run look up tables. Does anyone know of where I can
> find the organization of these tables and the way they are called
> through the program? Or possibly, if anybody has written their own code
> to extract data from the look-up tables on the fly? Luckily, Gromacs has
> already sorted out the different contributions to the forces so I think
> I can pull out the data I need, but I'm afraid I don't even know what
> sort of files (or code) the table functions are written in.
cd $GROMACS/src; grep table */*.[ch] | grep make
> Where I've gotten is to: /src/gmxlib/nonbonded/nonbonded.c which calls
> the machine specific kernels. I am more than willing to work through
> this myself, but can anybody point me to a good book/site that explains
> what is actually going on when Gromacs looks up these forces?
Try reading src/gmxlib/nonbonded/nb_kernel/nb_kernel310_c.c This is
auto-generated code, so it isn't commented, but it illustrates the table
lookups in non-optimized code.
> Sorry for the imprecise language! Basically I just need to extract the
> SR electrostatic force from the look-up tables on the fly, and can't
> find any references out there that explain what goes on in nonbonded.c
The look-up tables are computed at the start of the runs for nonbonded
interactions that have requested them. There's nothing magical about the
mathematical functions that fill them - they're documented in the manual.
It's very unclear what you want SR electrostatic force between - pairs
of atoms? Groups? Is computing them yourself an easier way to get the
forces you want?
Mark
More information about the gromacs.org_gmx-users
mailing list