[gmx-developers] possible problem in ewald_util.c?
Mark Abraham
Mark.Abraham at anu.edu.au
Tue Nov 15 14:24:41 CET 2011
On 15/11/2011 11:52 PM, David van der Spoel wrote:
> Hi,
>
> I just stumbled over this piece of code in the ewald correction routine:
>
> rinv = gmx_invsqrt(dr2);
> rinv2 = rinv*rinv;
> dr = 1.0/rinv;
> v = gmx_erf(ewc*dr)*rinv;
> vc = qqL*v;
>
>
> Shouldn't that be an erfc rather than an erf?
No, that bit of code is correcting for atoms that should have been
excluded from the reciprocal-space calculation for this particular atom
because they were excluded from the real-space calculation (i.e. bonded
neighbours). See eq 2.5 of the Essman SPME paper and the comment on the
enclosing loop.
Mark
More information about the gromacs.org_gmx-developers
mailing list