Conventions#
This page documents the project-wide sign conventions used across all interaction modules (electrostatics, dispersion, Lennard-Jones).
Virial#
All modules return the virial tensor defined as the negative strain derivative of the energy:
where \(\varepsilon\) is the symmetric infinitesimal strain tensor.
For pairwise real-space interactions this is equivalent to:
where \(\mathbf{r}_{ij} = \mathbf{r}_j - \mathbf{r}_i\) and \(\mathbf{F}_{ij}\) is the force on atom \(i\) due to atom \(j\). Individual kernel implementations may use the reversed separation vector or the reaction force internally, but returned virials always follow this convention.
Stress#
The tensile-positive Cauchy stress is obtained from the virial as:
where \(V = |\det(\mathbf{C})|\) is the cell volume.
Note
Some molecular-dynamics codes use the opposite (compression-positive or “pressure”) convention \(\sigma = W / V\). When comparing against external references, check which convention they follow.
Separation Vector#
The canonical separation vector points from atom \(i\) to atom \(j\):
Individual kernel implementations may use either direction internally, but the returned virial always follows the convention above.