Analytical derivatives from the Tersoff pair_style

Hi all,

This is probably a very trivial question… why, in pair_tersoff.cpp, are the analytical derivatives of the different parts of the potential divided by r?

eg:
l562
fforce = -param->biga * tmp_exp * (tmp_fc_d - tmp_fc*param->lam1) / r;

or
l600
fforce = 0.5bijfa_d / r;

Thanks,
John

It’s so that the components of force can be just something
like fx = delx * fforce, instead of fx = delx/r * force. I.e.
the 1/r is pulled into fforce. E.g. in pair_lj_cut.cpp:

fpair = factor_ljforceljr2inv;
f[i][0] += delxfpair;
f[i][1] += dely
fpair;
f[i][2] += delz*fpair;

So fpair is not really the force, but force/r.

Steve