Ewald summation (source code)

= Ewald summation
{c}

<Ewald summation> evaluates long-range interactions in a periodically repeated system by separating rapidly convergent real-space and reciprocal-space contributions. For a Coulomb interaction, the identity $1/r=\operatorname{erfc}(\alpha r)/r+\operatorname{erf}(\alpha r)/r$ splits a short-range term from a smooth long-range term.

The complementary-error-function term decays rapidly and is summed over nearby images. The smooth term is efficiently summed through <Fourier modes>, with a self-interaction correction removing the artificial screening contribution at each particle. The splitting parameter $\alpha$ changes computational work rather than the converged physical answer. Net charge, the zero mode and the boundary convention must be handled explicitly; an arbitrary unqualified infinite Coulomb sum need not converge uniquely.<Die Berechnung optischer und elektrostatischer Gitterpotentiale by Paul Peter Ewald>[Original lattice-potential construction]{ref}