Example of the angle correction transformation in two dimensions
Prior to optimization, the structure's lattice is adjusted so that all angles are between and
; by a process similar to that described by Oganov et al. in their 2008 paper. The following transformations are applied to all combinations of the three lattice vectors:
If both conditions
are true, the cell should be transformed. To do this, the vector is replaced by the vector
, defined as
This transformation adds a vector that is parallel to
with length that is an integer multiple of
. The multiplier
is defined as the next highest integer from the absolute value of the scalar projection of
on
divided by the length of
)}. The sign of
from is determined by
, resulting in the transformation equation above. For clarification, see the preceeding image.
These equations differ somewhat from those provided by Oganov et al., since the above equations apply to arbitrary length vectors, while those published for Oganov's USPEX code seem to only be applicable to unit vectors.
Atomic coordinates are stored in Cartesian form before the lattice transformation to maintain the structure's atomic configuration. After the new angles are set, the atoms are adjusted so that they lie within the new cell by adding or subtracting 1 from the new fractional coordinates.