[gmx-developers] Extracting i-j forces from nb_generic.c

Erik Lindahl erik.lindahl at scilifelab.se
Sun Feb 2 20:51:37 CET 2014


On 02 Feb 2014, at 20:11, Mark Abraham <mark.j.abraham at gmail.com> wrote:
> Do take care - components of fscal are not actually the scalar force, but the negative of it (because mostly it saves a flop).

For the record, it can be even worse than this. In many (most) places we need to multply the force with the interparticle vector to get the vectorial force. However, it would be expensive (and stupid) computationall to normalize this vector when we already have 1/r available. Thus, fscal is often the scalar force *divided by r*, so we can then multiply it by the non-normalized interparticle vector.



More information about the gromacs.org_gmx-developers mailing list