CAPSChain Assembly and Packing Suite

Theory · 3 methods

Barostats

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.

Berendsen pressure coupling

The cell and all positions are scaled so that the pressure relaxes exponentially towards the target. It controls the density quickly but does not sample the isothermal–isobaric ensemble: volume fluctuations are too small.

$$\mu = \exp\left(-\frac{\beta\,\Delta t_p\,(P_0 - P)}{3\tau_P}\right), \qquad x \leftarrow \mu x, \qquad h \leftarrow \mu h$$

Berendsen et al. 1984, in CAPS's exponential form

SymbolMeaningIn CAPS
βisothermal compressibility4.5 × 10⁻⁵ atm⁻¹
τ_Ppressure relaxation timeτ_P · default 1000 fs
Δt_ptime between cell updates10 steps
Pvirial pressure (2K + W)/(3V)computed

When to use it

Early equilibration and the lateral axes of a tensile test (per-axis form). Use stochastic cell rescaling for production NPT.

Source
core/src/dynamics.cpp
Tested by
Dynamics.BarostatRespondsToTargetPressure
Departure from the reference
exponential rather than linear scaling; the volume change is limited to 1 % per update; a per-axis variant scales each axis from P_kk

References

  1. Berendsen, H. J. C., Postma, J. P. M., van Gunsteren, W. F., DiNola, A., Haak, J. R., "Molecular dynamics with coupling to an external bath", J. Chem. Phys. 81, 3684–3690 (1984). doi:10.1063/1.448118

Stochastic cell rescaling

A first-order barostat like Berendsen's, with a noise term that restores the correct volume fluctuations of the isothermal–isobaric ensemble. Velocities are scaled by the inverse factor so the kinetic energy stays consistent.

$$\begin{gathered}\mathrm{d}\epsilon = -\frac{\beta}{\tau_P}\left(P_0 - P - \frac{k_\mathrm{B}T}{V}\right)\mathrm{d}t + \sqrt{\frac{2k_\mathrm{B}T\beta}{V\tau_P}}\,\mathrm{d}W \\ \mu = e^{\mathrm{d}\epsilon/3}, \qquad x \leftarrow \mu x, \qquad v \leftarrow v/\mu\end{gathered}$$

Bernetti & Bussi 2020, isotropic

SymbolMeaningIn CAPS
εlogarithm of the volume—
βcompressibility (sets the response, not the result)4.5 × 10⁻⁵ atm⁻¹
τ_Prelaxation timeτ_P · default 1000 fs
dWWiener increment: √dt times a standard Gaussianmt19937-64 stream from the run's seed

When to use it

The default barostat for NPT production and for the NPT stages of equilibration protocols.

Source
core/src/dynamics.cpp
Tested by
Dynamics.BarostatRespondsToTargetPressure
Departure from the reference
isotropic only; dε limited to ±1 % per update

References

  1. Bernetti, M., Bussi, G., "Pressure control using stochastic cell rescaling", J. Chem. Phys. 153, 114107 (2020). doi:10.1063/5.0020514

Full-shape cell and stress control

The per-axis Berendsen barostat with a target for each axis (a tensile stress is a negative pressure), and the full shape: the cell's tilts also follow the shear stresses toward zero, so a triclinic or sheared cell relaxes its angles as well as its lengths.

$$d\varepsilon_{kk} = -\frac{\beta}{\tau_p}\,(P_k^0 - P_{kk})\,\frac{\Delta t}{3},\qquad d\gamma_{ab} = \frac{\beta}{\tau_p}\,P_{ab}\,\frac{\Delta t}{3}$$

each update at most 0.33 % strain; a tilt past half the cell is flipped to the equivalent cell

SymbolMeaningIn CAPS
P_k⁰target pressure of axis katm
P_abshear component of the pressure tensoratm
βcompressibility (the barostat's response)1/atm

When to use it

Crystals and crystalline fibres from a guessed cell, sheared composites, cells after a deformation: the shape relaxes to zero shear stress. LAMMPS: fix npt … tri does the same with Nosé–Hoover.

Source
core/src/dynamics.cpp
Tested by
tests/test_mechanics.cpp Mechanics.StressControlAndCreep (a sheared argon crystal's tilt relaxes and ⟨P_xy⟩ goes to zero)
Departure from the reference
Berendsen: the right averages, not the right fluctuations of the cell