[gmx-users] Shift Electrostatic Summation
Mark.Abraham at anu.edu.au
Tue Apr 14 08:46:25 CEST 2009
Shuangxing Dai wrote:
> Hi, all,
> I was wondering to modify Shift electrostatic summation to a new
> one. The origin Shift form in Gromacs is like 1/r-1/Rc (Rc is cut-off),
> I need to modify to erfc(alpha*r)/r-erfc(alpha*Rc)/Rc, and the original
> long-range correction of Shift in code shift_util.c is q^2/(2*Rc) (
> something like that ), I need to
> q^2*(erfc(alpha*Rc)/(2*Rc)+alpha/sqrt(pi)). So question is:
> How the force to Shift was calculated? Gromacs use the differentiation
> to energy, got the force formula, then calculated the force? Or just use
> the numerical differentiation to the energy and got it? If is the latter
> one, I do not need to modify the force calculation.
GROMACS uses exclusively analytic rather than numerical forces. Probably
table lookups as used for PME are the technique you will want to
implement. You won't need to change any code if your functions are
suitably continuous functions of r and constant parameters. See the
tabulated potentials section in the manual.
> And also, the alpha for Ewald summation, is there an option or
> parameters to adjust this value?
Yes - see the Ewald section of the manual. Also search the mailing list,
as this has been discussed several times.
> Hi, Mark and Berk, if I want do modify shift electrostatic summation as
> I want, what other files or place do I need to modify, except
> shift_util.c and force.c?
Don't - use table lookups.
More information about the gromacs.org_gmx-users