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.
Berendsen et al. 1984, in CAPS's exponential form
| Symbol | Meaning | In CAPS |
|---|---|---|
| β | isothermal compressibility | 4.5 × 10⁻⁵ atm⁻¹ |
| τ_P | pressure relaxation time | τ_P · default 1000 fs |
| Δt_p | time between cell updates | 10 steps |
| P | virial 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
- 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.
Bernetti & Bussi 2020, isotropic
| Symbol | Meaning | In CAPS |
|---|---|---|
| ε | logarithm of the volume | — |
| β | compressibility (sets the response, not the result) | 4.5 × 10⁻⁵ atm⁻¹ |
| τ_P | relaxation time | τ_P · default 1000 fs |
| dW | Wiener increment: √dt times a standard Gaussian | mt19937-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
- 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.
each update at most 0.33 % strain; a tilt past half the cell is flipped to the equivalent cell
| Symbol | Meaning | In CAPS |
|---|---|---|
| P_k⁰ | target pressure of axis k | atm |
| P_ab | shear component of the pressure tensor | atm |
| β | 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