CAPSChain Assembly and Packing Suite

Theory · 3 methods

Electrostatics

What CAPS computes, as it computes it: the equation, its symbols with CAPS's defaults, when to use the method, the source file, the tests that check it, and any departure from the cited method.

Damped shifted force (DSF)

A pairwise alternative to Ewald sums: the Coulomb interaction is damped by erfc and shifted so that both the energy and the force go to zero at the cut-off. It converges to Ewald results for condensed phases at modest cost.

$$E = q_i q_j\left[\frac{\operatorname{erfc}(\alpha r)}{r} - \frac{\operatorname{erfc}(\alpha r_c)}{r_c} + \left(\frac{\operatorname{erfc}(\alpha r_c)}{r_c^2} + \frac{2\alpha}{\sqrt{\pi}}\,\frac{e^{-\alpha^2 r_c^2}}{r_c}\right)(r - r_c)\right], \qquad r < r_c$$

Fennell & Gezelter 2006

SymbolMeaningIn CAPS
αdamping parameter0.2 Å⁻¹
r_ccut-off, shared with van der Waals10 Å (set per run)
erfccomplementary error functionAbramowitz–Stegun 7.1.26, as LAMMPS

When to use it

The default electrostatics in CAPS: cheap, no grid, fine for neutral bulk polymers. Use smooth PME for ionic systems, interfaces with net dipoles, or when comparing with Ewald-based codes.

Source
core/src/field.cpp
Tested by
Field.ForcesMatchFiniteDifferences · bench/ff/check_data_lammps.py (LAMMPS lj/cut/coul/dsf)
Departure from the reference
bonded partners are treated as LAMMPS coul/dsf does (the damped sum includes them, the excluded part is removed)

References

  1. Fennell, C. J., Gezelter, J. D., "Is the Ewald summation still necessary? Pairwise alternatives to the accepted standard for long-range electrostatics", J. Chem. Phys. 124, 234104 (2006). doi:10.1063/1.2206581

Smooth particle-mesh Ewald (SPME)

The Ewald sum split into a short-ranged real-space part and a smooth reciprocal part evaluated on a grid: charges are spread with B-splines, transformed by FFT, multiplied by the influence function and gathered back as forces.

$$E_\mathrm{rec} = \frac{1}{2\pi V}\sum_{m \ne 0}\frac{\exp(-\pi^2 m^2/\beta^2)}{m^2}\,B(m)\,\left|F(Q)(m)\right|^2, \qquad \operatorname{erfc}(\beta r_c) = \epsilon_\mathrm{rel}$$

Essmann et al. 1995

SymbolMeaningIn CAPS
βEwald coefficientfrom erfc(β r_c) = 10⁻⁵, as GROMACS
pB-spline order5
hlargest grid spacing1.0 Å
Qcharge grid—

When to use it

Charged or strongly polar systems, ionic crystals, interfaces, and whenever results must match Ewald-based codes. Periodic cells only; about 1.5 × the cost of DSF in MD.

Source
core/fortran/caps_kspace.f90 · core/src/kspace.cpp
Tested by
Kspace.PmeMatchesEwaldForForcesEnergyAndVirial · Kspace.MadelungConstantOfRockSalt · Kspace.FftMatchesTheDirectTransform · bench/ff/check_data_lammps.py --pme
Departure from the reference
none

References

  1. Essmann, U., Perera, L., Berkowitz, M. L., Darden, T., Lee, H., Pedersen, L. G., "A smooth particle mesh Ewald method", J. Chem. Phys. 103, 8577–8593 (1995). doi:10.1063/1.470117

Ewald summation (reference)

The plain Ewald sum over reciprocal-lattice vectors. CAPS keeps it as the reference the PME kernel is tested against; runs use PME.

$$E = E_\mathrm{real} + E_\mathrm{rec} + E_\mathrm{self}, \qquad E_\mathrm{self} = -\frac{\beta}{\sqrt{\pi}}\sum_i q_i^2$$

Ewald 1921

SymbolMeaningIn CAPS
βEwald coefficientas PME
k_maxreciprocal vectorsenough for 10⁻⁸ relative accuracy in tests

When to use it

Not offered for runs: its cost grows as N^{3/2}–N². It checks PME forces, energy and virial.

Source
core/fortran/caps_kspace.f90
Tested by
Kspace.PmeMatchesEwaldForForcesEnergyAndVirial
Departure from the reference
reference only

References

  1. Ewald, P. P., "Die Berechnung optischer und elektrostatischer Gitterpotentiale", Ann. Phys. 369, 253–287 (1921). doi:10.1002/andp.19213690304