LATTICE CONSTRAINTS: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
 
(36 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{TAGDEF|LATTICE_CONSTRAINTS|[logical][logical][logical]}}
{{DISPLAYTITLE:LATTICE_CONSTRAINTS}}{{TAGDEF|LATTICE_CONSTRAINTS|[logical][logical][logical]}}


Description: The tag {{TAG|LATTICE_CONSTRAINTS}} determines whether the lattice dynamics are released ({{TAG|LATTICE_CONSTRAINTS}}=''.TRUE.'') in the given directions in molecular dynamics calculations.  
Description: Sets three boolean to selectively allow changes in the lattice vectors.
----
----
This tag requires three boolean values for the <math>x</math>, <math>y</math> and <math>z</math> direction of the lattice constants, respectively. By setting ''.TRUE.'' the lattice constant in the respective dimension is allowed to change.
The lattice in {{VASP}} is defined by 3 lattice vectors <math>\mathbf{a}_{1}</math>, <math>\mathbf{a}_{2}</math>, <math>\mathbf{a}_{3}</math>, which
are defined in the {{FILE|POSCAR}} file. The lattice can be represented by the following matrix:


We recommend to use this tag for liquids in the isobaric-isothermal (NpT) ensemble in the following way:
<math>
  \mathbf{A} =
  \begin{bmatrix}
    a_{11} & a_{12} & a_{13} \\
    a_{21} & a_{22} & a_{23} \\
    a_{31} & a_{32} & a_{33}
  \end{bmatrix}.
</math>
 
The tag {{TAG|LATTICE_CONSTRAINTS}} can be used to constrain certain entries of this matrix.
==Orthorhombic case==
For orthorhombic boxes the lattice <math>\mathbf{A}</math> will be a diagonal matrix of the form:
 
<math>
  \mathbf{A} =
  \begin{bmatrix}
    a_{11} & 0      & 0 \\
      0    & a_{22} & 0 \\
      0    & 0      & a_{33}
  \end{bmatrix},
</math>
 
Therefore by setting one of the entries of {{TAG|LATTICE_CONSTRAINTS}} to FALSE the lattice parameter in this direction will not be allowed to change.                                                   
For [[MD|MD simulations]] ({{TAG|IBRION}}=0), we recommend using {{TAG|LATTICE_CONSTRAINTS}} for (orthorhombic) liquids in the isobaric-isothermal ([[NpT ensemble|NpT]]) ensemble in the following way:
  {{TAGBL|LATTICE_CONSTRAINTS}} = .FALSE. .FALSE. .TRUE.
  {{TAGBL|LATTICE_CONSTRAINTS}} = .FALSE. .FALSE. .TRUE.


This way the first two lattice constants are not allowed to change. The third lattice constants needs to be allowed to change to allow volume changes for the barostat (the system is 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 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 ensemble|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 [[Ionic minimization|structure relaxation]] ({{TAG|IBRION}}=1,2), {{TAG|LATTICE_CONSTRAINTS}} is useful to relax the lattice constants of 2D materials. In case of a slab in the <math>\mathbf{a}_1</math>-<math>\mathbf{a}_2</math> plane, add vacuum padding along <math>\mathbf{a}_3</math> and set
{{TAGBL|LATTICE_CONSTRAINTS}} = .TRUE. .TRUE. .FALSE.
 
==Non-orthorhombic case==
For non-orthorhombic boxes {{TAG|LATTICE_CONSTRAINTS}} is more complicated to use. The tag will set certain rows and columns of the stress tensor
 
<math>
  \mathbf{\sigma} =
  \begin{bmatrix}
    xx & xy & xz \\
    yx & yy & yz \\
    zx & zy & zz
  \end{bmatrix},
</math>
 
to zero. By setting certain entries of the stress tensor to zero the corresponding entries of the lattice <math>\mathbf{A}</math> will not be updated.
For example when setting {{TAGBL|LATTICE_CONSTRAINTS}} = .FALSE. .TRUE. .TRUE. the used stress tensor will look like
 
<math>
  \mathbf{\sigma} =
  \begin{bmatrix}
    0 & 0 & 0 \\
    0 & yy & yz \\
    0 & zy & zz
  \end{bmatrix},
</math>
 
and therefore the first row and the first column of the lattice <math>\mathbf{A}</math> will not change.
Another example would be to set {{TAGBL|LATTICE_CONSTRAINTS}} = .FALSE. .TRUE. .FALSE. resulting in the following
stress tensor
 
<math>
  \mathbf{\sigma} =
  \begin{bmatrix}
    0 & 0  & 0 \\
    0 & yy & 0 \\
    0 & 0  & 0
  \end{bmatrix}
</math>


{{NB|warning|This tag is only available for molecular dynamics calculations.}}
So only the <math>yy</math>/<math>a_{22}</math> entry of the lattice <math>\mathbf{A}</math> will change.
{{NB|mind| Note that for non-orthorhombic boxes the angles between the lattice vectors <math>\mathbf{a}_{1}</math>, <math>\mathbf{a}_{2}</math>, <math>\mathbf{a}_{3}</math> will not be conserved.}}
{{NB|mind| {{TAG|LATTICE_CONSTRAINTS}} in combination with {{TAG|IBRION}}{{=}}1,2 is available from VASP 6.4.3.}}


== Related Tags and Sections ==
== Related tags and articles ==
{{TAG|Interface pinning}}
{{TAG|IBRION}}, {{TAG|MDALGO}}, [[:Category:Interface pinning|Interface pinning]]


{{sc|LATTICE_CONSTRAINTS|Examples|Examples that use this tag}}
{{sc|LATTICE_CONSTRAINTS|Examples|Examples that use this tag}}
----
----


[[Category:INCAR]][[Category:Molecular Dynamics]]
[[Category:INCAR tag]][[Category:Molecular dynamics]][[Category:Symmetry]]

Latest revision as of 10:34, 5 February 2024

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 , , , which are defined in the POSCAR file. The lattice can be represented by the following matrix:

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

Orthorhombic case

For orthorhombic boxes the lattice will be a diagonal matrix of the form:

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 - plane, add vacuum padding along 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

to zero. By setting certain entries of the stress tensor to zero the corresponding entries of the lattice will not be updated. For example when setting LATTICE_CONSTRAINTS = .FALSE. .TRUE. .TRUE. the used stress tensor will look like

and therefore the first row and the first column of the lattice will not change. Another example would be to set LATTICE_CONSTRAINTS = .FALSE. .TRUE. .FALSE. resulting in the following stress tensor

So only the / entry of the lattice will change.

Mind: Note that for non-orthorhombic boxes the angles between the lattice vectors , , will not be conserved.
Mind: LATTICE_CONSTRAINTS in combination with IBRION=1,2 is available from VASP 6.4.3.

Related tags and articles

IBRION, MDALGO, Interface pinning

Examples that use this tag