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.
Fennell & Gezelter 2006
| Symbol | Meaning | In CAPS |
|---|---|---|
| α | damping parameter | 0.2 Å⁻¹ |
| r_c | cut-off, shared with van der Waals | 10 Å (set per run) |
| erfc | complementary error function | Abramowitz–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
- 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.
Essmann et al. 1995
| Symbol | Meaning | In CAPS |
|---|---|---|
| β | Ewald coefficient | from erfc(β r_c) = 10⁻⁵, as GROMACS |
| p | B-spline order | 5 |
| h | largest grid spacing | 1.0 Å |
| Q | charge 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
- 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.
Ewald 1921
| Symbol | Meaning | In CAPS |
|---|---|---|
| β | Ewald coefficient | as PME |
| k_max | reciprocal vectors | enough 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
- Ewald, P. P., "Die Berechnung optischer und elektrostatischer Gitterpotentiale", Ann. Phys. 369, 253–287 (1921). doi:10.1002/andp.19213690304