LATTICE_CONSTRAINTS

LATTICE_CONSTRAINTS = [logical][logical][logical]

Description: Sets three boolean to selectively allow changes in the lattice vectors.

The lattice in VASP is defined by 3 lattice vectors ${\displaystyle \mathbf {a} _{1}}$, ${\displaystyle \mathbf {a} _{2}}$, ${\displaystyle \mathbf {a} _{3}}$, which are defined in the POSCAR file. The lattice can be represented by the following matrix:

${\displaystyle \mathbf {A} ={\begin{bmatrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}\end{bmatrix}}.}$

The tag LATTICE_CONSTRAINTS can be used to constrain certain entries of this matrix.

Orthorhombic case

For orthorhombic boxes the lattice ${\displaystyle \mathbf {A} }$ will be a diagonal matrix of the form:

${\displaystyle \mathbf {A} ={\begin{bmatrix}a_{11}&0&0\\0&a_{22}&0\\0&0&a_{33}\end{bmatrix}},}$

Therefore by setting one of the entries of LATTICE_CONSTRAINTS to FALSE the lattice parameter in this direction will not be allowed to change. For MD simulations (IBRION=0), we recommend using LATTICE_CONSTRAINTS for (orthorhombic) liquids in the isobaric-isothermal (NpT) ensemble in the following way:

LATTICE_CONSTRAINTS = .FALSE. .FALSE. .TRUE.


This way, the first two lattice constants are not allowed to change. The third lattice constant needs to be free to allow volume changes for the barostat. The system is then like a piston. The constraints are necessary for liquids in NpT simulations because if all lattice degrees of freedom are allowed to relax, irreversible deformations of the cell are very likely to happen. This can lead to undesirable results like a very flat supercell, which cannot be used to obtain valid MD trajectories.

For structure relaxation (IBRION=1,2), LATTICE_CONSTRAINTS is useful to relax the lattice constants of 2D materials. In case of a slab in the ${\displaystyle \mathbf {a} _{1}}$-${\displaystyle \mathbf {a} _{2}}$ plane, add vacuum padding along ${\displaystyle \mathbf {a} _{3}}$ and set

LATTICE_CONSTRAINTS = .TRUE. .TRUE. .FALSE.


Non-orthorhombic case

For non-orthorhombic boxes LATTICE_CONSTRAINTS is more complicated to use. The tag will set certain rows and columns of the stress tensor

${\displaystyle \mathbf {\sigma } ={\begin{bmatrix}xx&xy&xz\\yx&yy&yz\\zx&zy&zz\end{bmatrix}},}$

to zero. By setting certain entries of the stress tensor to zero the corresponding entries of the lattice ${\displaystyle \mathbf {A} }$ will not be updated. For example when setting LATTICE_CONSTRAINTS = .FALSE. .TRUE. .TRUE. the used stress tensor will look like

${\displaystyle \mathbf {\sigma } ={\begin{bmatrix}0&0&0\\0&yy&yz\\0&zy&zz\end{bmatrix}},}$

and therefore the first row and the first column of the lattice ${\displaystyle \mathbf {A} }$ will not change. Another example would be to set LATTICE_CONSTRAINTS = .FALSE. .TRUE. .FALSE. resulting in the following stress tensor

${\displaystyle \mathbf {\sigma } ={\begin{bmatrix}0&0&0\\0&yy&0\\0&0&0\end{bmatrix}}}$

So only the ${\displaystyle yy}$/${\displaystyle a_{22}}$ entry of the lattice ${\displaystyle \mathbf {A} }$ will change.

 Mind: Note that for non-orthorhombic boxes the angles between the lattice vectors ${\displaystyle \mathbf {a} _{1}}$, ${\displaystyle \mathbf {a} _{2}}$, ${\displaystyle \mathbf {a} _{3}}$ will not be conserved.
 Mind: LATTICE_CONSTRAINTS in combination with IBRION=1,2 is available from VASP 6.4.3.