CAPSChain Assembly and Packing Suite

Theory · 6 methods

Minimisers

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.

L-BFGS

A quasi-Newton minimiser that approximates the inverse Hessian from the last few steps (two-loop recursion). It is the fastest of CAPS's minimisers for smooth energies of thousands of atoms.

$$d = -H_k\nabla E, \qquad H_k \text{ from the last } m \text{ pairs } \left(s_i = x_{i+1} - x_i,\; y_i = \nabla E_{i+1} - \nabla E_i\right)$$

Liu & Nocedal 1989

SymbolMeaningIn CAPS
mstored pairs10
ftolstop when the largest atomic force is below0.5 kcal/mol/Å by default
etolor the relative energy change is below10⁻⁸

When to use it

The default minimiser. After growth with a contact scale below 1, run the capped push-off first (Relax does by default).

Source
core/src/relax.cpp
Tested by
Relax.EveryMinimiserLowersEnergy · Relax.CompressesOverlappingCellToTarget
Departure from the reference
none

References

  1. Liu, D. C., Nocedal, J., "On the limited memory BFGS method for large scale optimization", Math. Program. 45, 503–528 (1989). doi:10.1007/BF01589116

FIRE

A damped dynamics minimiser: velocities are mixed towards the force direction and the time step grows while the power F·v stays positive; the motion stops when it turns uphill.

$$\begin{gathered}v \leftarrow (1 - \alpha)\,v + \alpha\,|v|\,\frac{F}{|F|} \\ \text{if } F\cdot v < 0:\quad v = 0,\;\; \Delta t \leftarrow f_\mathrm{dec}\,\Delta t,\;\; \alpha = \alpha_\mathrm{start}\end{gathered}$$

Bitzek et al. 2006

SymbolMeaningIn CAPS
α_startmixing0.1
f_inc, f_dectime-step growth and cut1.1, 0.5
N_minsteps before growth5

When to use it

Rough starts with large forces, where line searches struggle.

Source
core/src/relax.cpp
Tested by
Relax.EveryMinimiserLowersEnergy
Departure from the reference
standard parameters of the paper

References

  1. Bitzek, E., Koskinen, P., Gähler, F., Moseler, M., Gumbsch, P., "Structural relaxation made simple", Phys. Rev. Lett. 97, 170201 (2006). doi:10.1103/PhysRevLett.97.170201

Conjugate gradients and steepest descent

Steepest descent follows the force; Polak–Ribière conjugate gradients mixes in the previous direction so successive steps do not undo each other.

$$d_{k+1} = F_{k+1} + \beta d_k, \qquad \beta = \max\left(0,\; \frac{F_{k+1}\cdot(F_{k+1} - F_k)}{F_k\cdot F_k}\right)$$

Polak & Ribière 1969

SymbolMeaningIn CAPS
βPolak–Ribière coefficient, reset to 0 when negative—
ftolforce tolerance0.5 kcal/mol/Å

When to use it

Comparison and teaching; L-BFGS is faster for the same tolerance.

Source
core/src/relax.cpp
Tested by
Relax.EveryMinimiserLowersEnergy
Departure from the reference
none

References

  1. Polak, E., Ribière, G., "Note sur la convergence de méthodes de directions conjuguées", Rev. Fr. Inform. Rech. Opér. 3, 35–43 (1969)

Capped-force push-off

Overlapping atoms (from growth with lowered contact limits, or packing) make Lennard-Jones forces explode. The push-off caps them: inside the radius where the force would exceed the cap the potential becomes linear, and the cap is raised stage by stage while minimising. Optionally the push-off runs first as NVT dynamics, as in the paper: the cap is raised geometrically over a set time (the λ ramp) so chains move apart by motion before the minimisation stages.

$$\begin{gathered}F_\mathrm{LJ}(r) \to \operatorname{sign}(F)\,\min\left(|F_\mathrm{LJ}(r)|,\, F_\mathrm{cap}\right), \qquad F_\mathrm{cap} = 5, 20, 100, \dots, F_\mathrm{final}\ \text{kcal/mol/Å} \\ \text{MD:}\ \ F_{\mathrm{cap},k} = 5\left(\frac{F_\mathrm{final}}{5}\right)^{k/9}, \quad k = 0, \dots, 9, \ \text{each for } t_\mathrm{ramp}/10\end{gathered}$$

after Auhl et al. 2003

SymbolMeaningIn CAPS
F_capcap of each stage5, 20, 100, then the chosen final cap (500 by default)
t_rampλ ramp: the time of the MD push-off20 ps on the Relax board; 0 = minimisation stages only
TNVT temperature of the MD push-off (Bussi thermostat, 1 fs)300 K

When to use it

Always before minimising a grown or packed cell; Relax does it by default.

Source
core/src/relax.cpp · core/src/field.cpp (force_cap)
Tested by
Equilibrate.PushoffTamesOverlaps · Relax.PushoffByMdRampsTheCap
Departure from the reference
the cap is raised in ten NVT segments rather than continuously; Coulomb terms are off during the push-off

References

  1. Auhl, R., Everaers, R., Grest, G. S., Kremer, K., Plimpton, S. J., "Equilibration of long chain polymer melts in computer simulations", J. Chem. Phys. 119, 12718–12728 (2003). doi:10.1063/1.1628670

Cell relaxation with held lattice parameters

The cell and the atoms relax together while chosen lattice parameters keep their values: the chain axis of a polymer crystal, β of a monoclinic cell, or a layer spacing. The variables are the free ones of a, b, c, α, β and γ, and the atoms in fractional coordinates. The cell keeps its orientation: h = R₀ h_std(a, b, c, α, β, γ), with R₀ fixed at the start and h_std putting a along x and b in the xy plane. L-BFGS minimises the enthalpy H = E + PV with its exact gradient. For the atoms that is hᵀ ∂E/∂x. For the cell it is ∂H/∂h = (PV I − W) h⁻ᵀ at fixed fractional coordinates, W being the virial tensor, carried to each lattice parameter through ∂h/∂p. Where the force field has the long-range tail correction, its energy E_t ∝ 1/V enters through its own volume derivative (a virial of E_t on each diagonal component), not the fluid tail pressure, so the gradient is that of the energy minimised. A cell narrower than twice the cut-off is evaluated as copies that move together, so every neighbour within the cut-off is seen.

$$H = E + PV,\qquad \frac{\partial H}{\partial \mathbf s_i} = \mathbf h^{\mathsf T}\frac{\partial E}{\partial \mathbf x_i},\qquad \frac{\partial H}{\partial \mathbf h} = \left(PV\,\mathbf I - \mathbf W\right)\mathbf h^{-\mathsf T},\qquad \frac{\partial H}{\partial p} = \sum_{\alpha\beta}\left(\frac{\partial H}{\partial \mathbf h}\right)_{\alpha\beta}\frac{\partial h_{\alpha\beta}}{\partial p}$$

s fractional coordinates, x = h s; p one of a, b, c, α, β, γ; with the tail correction W carries E_t (not P_t V) on its diagonal

SymbolMeaningIn CAPS
hcell matrix, columns a b cÅ
Wvirial tensorkcal/mol
Phydrostatic pressureatm
pa free lattice parameterÅ or rad

When to use it

Monoclinic polyethylene and α-iPP relaxed with the chain axis or β kept, a crystal relaxed with a layer spacing fixed to experiment, a filler cell relaxed at a pressure with its angles held.

Source
core/src/cell_relax.cpp
Tested by
tests/test_cell_relax.cpp (the gradient of all six parameters of a sheared argon cell against central differences of the energy, with and without the tail correction, to 10⁻⁵; fcc argon from a = 5.6 Å reaches the minimum of E(a) found by a golden-section search over the cubic lattice to 10⁻⁴ Å, stays cubic to 10⁻⁶°, with less than 1 atm left; c and β held stay to 10⁻¹² and 10⁻⁹ while the free parameters carry no force and the cell keeps a along x); tests/python/test_bindings.py (monoclinic PE with b and β held)
Departure from the reference
0 K: no thermal expansion. The stress reported is the energy's own (−(1/V) ∂E/∂ε, the tail as ∂E_t/∂V), not the homogeneous-fluid tail pressure of an MD run. Held parameters are held exactly, not by a restraint; symmetry is not imposed, so a held β with free α and γ can drift off a monoclinic cell unless α and γ are held too.

References

  1. Parrinello, M., Rahman, A., "Polymorphic transitions in single crystals: a new molecular dynamics method", J. Appl. Phys. 52, 7182–7190 (1981). doi:10.1063/1.328693
  2. Liu, D. C., Nocedal, J., "On the limited memory BFGS method for large scale optimization", Math. Program. 45, 503–528 (1989). doi:10.1007/BF01589116

Reaction paths and the nudged elastic band

A path between two structures of the same atoms. B's atoms are matched to A's when the file lists them in another order. Atoms of one element, and of one bonded environment when both structures have the same environments, are assigned by the Hungarian method to the least summed squared distance. With the environments, that assignment is then turned into the nearest map that keeps every bond, so a symmetric molecule's hydrogens never trade carbons. A molecule is first superposed from the four orientations of its principal axes, the assignment and the fit repeated until stable; a periodic cell uses minimum-image distances. A molecule's B is superposed on A, so the path carries no rigid motion. The images come from straight lines, from LST (each image minimises the deviation of its pair distances from distances interpolated between the ends, weighted by 1/d⁴, plus a small pull to the straight-line image), or from IDPP (the same distance objective without the pull, the images optimised together as a band). The climbing-image nudged elastic band then finds the minimum energy path and its saddle with the force field. Each image feels the force perpendicular to the path plus a spring force along the improved tangent. Once the band has settled, the highest image climbs if its energy is above both neighbours (the ends count); otherwise no image climbs and the report says so. The images move by FIRE, and a band that grows past ten times its starting length, or whose energies stop being finite, is stopped with a note.

$$S_\kappa = \sum_{i<j}\frac{(d^{\kappa}_{ij} - d_{ij})^2}{d_{ij}^4},\qquad \mathbf F_i = \mathbf F_i^{\perp} + k\left(|\mathbf R_{i+1} - \mathbf R_i| - |\mathbf R_i - \mathbf R_{i-1}|\right)\hat{\boldsymbol\tau}_i,\qquad \mathbf F_{\mathrm{climb}} = \mathbf F - 2(\mathbf F\cdot\hat{\boldsymbol\tau})\hat{\boldsymbol\tau}$$

LST adds γ Σ |r − r^LI|² with γ = 10⁻⁶ bohr⁻⁴; τ̂ is the tangent to the higher-energy neighbour (energy-weighted at extrema)

SymbolMeaningIn CAPS
d_ij^κtarget pair distance in image κÅ
Mimages between the ends—
kspring constantkcal/mol/Ų
τ̂unit tangent of the path—

When to use it

Barriers of gas hops through rubber, of chain slip in polymer crystals, of bond-exchange steps in vitrimers, and of conformational changes such as methyl rotation.

Source
core/src/reaction_path.cpp
Tested by
tests/test_reaction_path.cpp (a shuffled, turned and moved molecule and a shuffled crystal with wrapped atoms are matched exactly; a dimer turned by 90° keeps its bond length on every LST and IDPP image while straight lines shorten it to 1.5 cos 45°; the climbing image reaches the saddle of an analytic surface to 10⁻⁵ with the exact barrier; a band whose ends lie above every interior image converges with no climbing image; ethane's methyl rotation with UFF climbs to the eclipsed form with equal barriers from both ends); tests/python/test_bindings.py reaction_path
Departure from the reference
the band uses the force field only (not the MACE potential); LST and IDPP use every atom pair, so up to 3000 atoms; classes of more than 1500 equivalent atoms are matched greedily. A turn that only permutes equivalent atoms (a methyl by 120°) is undone by matching: keep the file order for such paths

References

  1. Kuhn, H. W., "The Hungarian method for the assignment problem", Naval Res. Logist. Q. 2, 83–97 (1955). doi:10.1002/nav.3800020109
  2. Halgren, T. A., Lipscomb, W. N., "The synchronous-transit method for determining reaction pathways and locating molecular transition states", Chem. Phys. Lett. 49, 225–232 (1977). doi:10.1016/0009-2614(77)80574-5
  3. Smidstrup, S., Pedersen, A., Stokbro, K., Jónsson, H., "Improved initial guess for minimum energy path calculations", J. Chem. Phys. 140, 214106 (2014). doi:10.1063/1.4878664
  4. Henkelman, G., Uberuaga, B. P., Jónsson, H., "A climbing image nudged elastic band method for finding saddle points and minimum energy paths", J. Chem. Phys. 113, 9901–9904 (2000). doi:10.1063/1.1329672
  5. Henkelman, G., Jónsson, H., "Improved tangent estimate in the nudged elastic band method for finding minimum energy paths and saddle points", J. Chem. Phys. 113, 9978–9985 (2000). doi:10.1063/1.1323224
  6. Bitzek, E., Koskinen, P., Gähler, F., Moseler, M., Gumbsch, P., "Structural relaxation made simple", Phys. Rev. Lett. 97, 170201 (2006). doi:10.1103/PhysRevLett.97.170201