Skip to navigation

Splitting the interaction

View as Markdown

A long-range interaction connects every particle to every other particle and to its periodic images. Splitting makes that calculation practical: evaluate nearby interactions directly and evaluate a smooth, collective contribution in Fourier space.

The discussion below uses the Coulomb kernel u(r)=1/ru(r)=1/r. Charges supply the pair weight qiqjq_iq_j; the Coulomb unit-conversion factor is omitted from the equations and multiplies the resulting energies and forces.

One interaction, two contributions

Choose a long-range function ulru_{\mathrm{lr}} and define its complement:

u(r)=1r=usr(r)+ulr(r),usr(r)=1r−ulr(r).u(r)=\frac{1}{r} =u_{\mathrm{sr}}(r)+u_{\mathrm{lr}}(r), \qquad u_{\mathrm{sr}}(r)=\frac{1}{r}-u_{\mathrm{lr}}(r).

The two parts have different jobs:

ContributionDesired behaviorHow it is evaluated
Short range, usru_{\mathrm{sr}}Contains the singularity at zero separation and becomes zero or negligible beyond a cutoff rcr_c.Direct pair calculations over nearby particles.
Long range, ulru_{\mathrm{lr}}Is finite at the origin, varies smoothly, and carries the far field.A Fourier-space calculation, accelerated with a mesh and FFTs.

This complementary split is an identity. Applying a cutoff or shifting either part can change the interaction it represents. Approximating its evaluation with finite Fourier sums, a mesh, or finite precision introduces further error. Error Analysis distinguishes these contributions.

The long-range part still contributes at short distances. Nearby pairs therefore contribute to both calculations: directly through usru_{\mathrm{sr}} and through the collective long-range calculation for ulru_{\mathrm{lr}}.

An example: Ewald splitting

The classical Ewald choice uses the error function and complementary error function:

usr(r)=erfc⁡(αr)r,ulr(r)=erf⁡(αr)r,α>0.u_{\mathrm{sr}}(r)=\frac{\operatorname{erfc}(\alpha r)}{r}, \qquad u_{\mathrm{lr}}(r)=\frac{\operatorname{erf}(\alpha r)}{r}, \qquad \alpha>0.

Their sum is 1/r1/r because erfc⁡(x)+erf⁡(x)=1\operatorname{erfc}(x)+\operatorname{erf}(x)=1. The inverse length α\alpha controls the split. The long-range function has the finite limit

ulr(0)=2απ.u_{\mathrm{lr}}(0)=\frac{2\alpha}{\sqrt{\pi}}.

For a nonzero angular wavevector k\mathbf{k}, with k=∣k∣k=|\mathbf{k}|, its Fourier kernel is

Klr(k)=4πk2exp⁡ ⁣(−k24α2).K_{\mathrm{lr}}(k)=\frac{4\pi}{k^2} \exp\!\left(-\frac{k^2}{4\alpha^2}\right).

Increasing α\alpha makes the short-range term decay faster, so fewer distant pairs matter. It also makes the Fourier kernel decay more slowly, requiring more reciprocal modes. Decreasing α\alpha reverses the tradeoff. Ewald’s short-range term approaches zero continuously but is not exactly zero at any finite cutoff; discarding its tail introduces a truncation error. See the OpenMM Ewald description for the corresponding energy sums.

cuPotential’s Prolate splitting

The prolate approach to Ewald summation is described by Liang, Lu, Barnett, Greengard, and Jiang in Accelerating molecular dynamics simulations using fast Ewald summation with prolates, Nature Communications 17, 6681 (2026). The paper introduces ESP, which uses prolate spheroidal wave functions for splitting and spreading.

The OpenMM integration selects Prolate by default, using cuPotential’s C2 Prolate splitting.

Inside the cutoff, write the long-range kernel in terms of a dimensionless function ℓ\ell:

ulr(r)={rc−1ℓ(r/rc),0≤r<rc,r−1,r≥rc.u_{\mathrm{lr}}(r)= \begin{cases} r_c^{-1}\ell(r/r_c), & 0\leq r<r_c,\\ r^{-1}, & r\geq r_c. \end{cases}

The function is finite and even at the origin. At the cutoff, it matches the Coulomb kernel through two derivatives:

ℓ(1)=1,ℓ′(1)=−1,ℓ′′(1)=2.\ell(1)=1,\qquad \ell'(1)=-1,\qquad \ell''(1)=2.

Consequently, the short-range part satisfies

usr(r)=0(r≥rc),usr(rc)=usr′(rc)=usr′′(rc)=0.u_{\mathrm{sr}}(r)=0\quad(r\geq r_c), \qquad u_{\mathrm{sr}}(r_c)=u'_{\mathrm{sr}}(r_c) =u''_{\mathrm{sr}}(r_c)=0.

Matching at the cutoff reduces high-frequency Fourier content. The prolate construction concentrates the reciprocal contribution at low frequencies while making the short-range contribution compact. Its Fourier kernel has a nonzero, oscillatory tail, so truncating reciprocal modes still introduces error.

Fourier and periodic conventions

Let Ω\Omega be one periodic cell of volume VV, and let k\mathbf{k} range over its reciprocal lattice. For a cubic cell of side LL, k=2πm/L\mathbf{k}=2\pi\mathbf{m}/L with integer vector m\mathbf{m}. These guides use cell-integral Fourier coefficients:

f^(k)=∫Ωf(r)e−ik⋅r dr,f(r)=1V∑kf^(k)eik⋅r.\widehat f(\mathbf{k}) =\int_\Omega f(\mathbf{r})e^{-i\mathbf{k}\cdot\mathbf{r}}\,d\mathbf{r}, \qquad f(\mathbf{r})=\frac{1}{V}\sum_{\mathbf{k}} \widehat f(\mathbf{k})e^{i\mathbf{k}\cdot\mathbf{r}}.

The point-charge density and its transform, called the structure factor, are

ρ(r)=∑jqjδper(r−rj),S(k)=ρ^(k)=∑jqje−ik⋅rj.\rho(\mathbf{r})=\sum_j q_j\delta_{\mathrm{per}}(\mathbf{r}-\mathbf{r}_j), \qquad S(\mathbf{k})=\widehat\rho(\mathbf{k}) =\sum_j q_j e^{-i\mathbf{k}\cdot\mathbf{r}_j}.

Here δper\delta_{\mathrm{per}} is the periodic delta distribution. In Fourier formulas, Klr=u^lrK_{\mathrm{lr}}=\widehat u_{\mathrm{lr}} refers to the periodic long-range kernel under the boundary convention below. For Coulomb interactions, periodization is understood in the Ewald sense; an unregularized sum of positive 1/r1/r image kernels is not a convergent definition.

Self energy and the zero mode

For a neutral Coulomb system with conducting, or tin-foil, boundaries, the uncorrected long-range energy is

Elrraw=12V∑k≠0Klr(k)∣S(k)∣2.E_{\mathrm{lr}}^{\mathrm{raw}}=\frac{1}{2V}\sum_{\mathbf{k}\ne\mathbf{0}} K_{\mathrm{lr}}(k)|S(\mathbf{k})|^2.

The factor 1/21/2 prevents counting pairs twice. This smooth sum includes each particle interacting with its own finite long-range contribution at zero separation. Remove that central self interaction with

Eself=−ulr(0)2∑iqi2.E_{\mathrm{self}}=-\frac{u_{\mathrm{lr}}(0)}{2}\sum_i q_i^2.

For the Ewald example, this becomes Eself=−α∑iqi2/πE_{\mathrm{self}}=-\alpha\sum_iq_i^2/\sqrt{\pi}. Interactions with a particle’s periodic images remain part of the energy.

The Coulomb kernel is singular at k=0\mathbf{k}=\mathbf{0}, so that mode is omitted rather than evaluated. This also fixes the potential’s arbitrary constant. A non-neutral cell requires a matching uniform neutralizing background and its split-dependent energy correction; omitting the zero mode alone does not supply that correction. cuPotential’s Coulomb splitting plan provides both the self and net-charge corrections. Direct, reciprocal, self, background, and any exclusion corrections must use the same split.

Continue with Spreading for the mesh calculation. The convergence plots show how numerical errors change as the calculation is refined.