setBox

Informs the potential of the box on which it acts. Typically this
requires at least that it update the nearestImageTransformer of its
coordinatePair (if it uses one), e.g.:
cPair.setNearestImageTransformer(box.boundary());

virial

gradient

Returns the gradient of the potential as it applies to each atom in the
given AtomSet, indicating how the energy would change as the position of
the first atom is varied. The method is allowed to return an array of
Vectors with fewer elements than the number of atoms in the AtomSet.

gradient

Returns the same gradient as gradient(AtomSet) and also adds in the
contribution of the AtomSet to the pressureTensor. Their
contribution is added to the given Tensor. This combined method exists
for computational efficiency. Calculating the pressureTensor is
generally trivial once the gradient is known but often requires
intermediate information.