KPOINTS

From VASP Wiki

The KPOINTS file specifies the Bloch vectors (k points) used to sample the Brillouin zone. Converging this sampling is one of the most important tasks in many calculations. A regular mesh is the most common choice to select k points. Choose the number of points along each direction approximately inversely proportional to the corresponding length of the unit cell. Build the KPOINTS file based on this template and read below for the exact specification.

Regular 4 x 4 x 4 mesh centered at Gamma 
0
Gamma
4 4 4

The band structure describes the eigenvalues of the orbitals throughout the Brillouin zone. It gives a detailed insight into the material determining many optical and transport properties. A band structure is often visualized along high symmetry paths. Some external tools[1][2] help to identify these points for materials of any symmetry. Use the template below to setup band-structure calculations. Alternatively, use a KPOINTS_OPT file to get the band structure as a postprocessing step after the regular calculation.

k points along high symmetry lines
 40              ! number of points per line
Line-mode
reciprocal
  0    0    0    gamma
  0.5  0.5  0    X

  0.5  0.5  0    X
  0.5  0.75 0.25 W

  0.5  0.75 0.25 W
  0    0    0    gamma
Tip: If the KPOINTS file is not present, the tag KSPACING determines the k-point sampling. Use that option for a quick first run but prefer setting the mesh manually for production calculations.


Coordinate system

When specifying coordinates in the KPOINTS file, use one of the following coordinate systems:

Reciprocal coordinate system
The k points are linear combinations of the reciprocal lattice vectors
Use the factors as the coordinates in KPOINTS.
Cartesian coordinate system
The coordinates directly correspond to the k point
up to the scaling factor . Here, is the scaling parameter specified on the second line of the POSCAR file.

Example: face-centered-cubic lattice

The following lattice vectors span the unit cell:

The corresponding reciprocal lattice vectors are

The following table shows several high-symmetry points of the fcc lattice expressed in Cartesian and reciprocal coordinates, respectively:

Point     Cartesian coordinates     Reciprocal coordinates
            (units of 2pi/a)         (units of b1,b2,b3)
----------------------------------------------------------
  G         (  0    0    0  )         (  0    0    0  )
  X         (  0    0    1  )         ( 1/2  1/2   0  )
  W         ( 1/2   0    1  )         ( 1/2  3/4  1/4 )
  K         ( 3/4  3/4   0  )         ( 3/8  3/8  3/4 )
  L         ( 1/2  1/2  1/2 )         ( 1/2  1/2  1/2 )

Explicit k-point mesh

When an explicit k-point mesh is provided, VASP uses exactly the provided points. The main use case of this mode is to look at particular features in the band structure for example for effective mass calculations. For regular meshes and band structures, prefer the automatic generation to avoid mistakes. Nevertheless, all other modes write the processed input in this format to IBZKPT so understanding this format helps analyze mistakes in setting up the KPOINTS file. A typical example has the following format:

Explicit k-point list
4
Cartesian
0.0  0.0  0.0   1
0.0  0.0  0.5   1
0.0  0.5  0.5   2
0.5  0.5  0.5   4
  • The first line is treated as a comment line.
  • Provide the number of k points on the second line.
  • The first character on the third line specifies the coordinate system. Use C, c, K, or k to indicate Cartesian coordinates. Any other character is interpreted as reciprocal coordinates but we advise writing reciprocal to make this clear.
  • Each following line contains the coordinates and weight of one k point. VASP takes care that weights are properly normalized so only relative weight is important. Typically the weights correspond to the symmetry degeneracy of a k point.

Use the explicit mode for

Tetrahedron method

When using the tetrahedron method (see ISMEAR), extend the list of k points by a list of all tetrahedra.

Explicit k-point list
4
Cartesian
0.0  0.0  0.0   1
0.0  0.0  0.5   1
0.0  0.5  0.5   2
0.5  0.5  0.5   4
Tetrahedra
1  0.183333333333333
6    1 2 3 4

The line following the list of k point coordinates and weights must start with 'T' or 't'. On the next line, enter the number of tetrahedra and the volume weight common to all the tetrahedra. The volume weight is simply the ratio between the volume of a tetrahedron and the volume of the first Brillouin zone.

Subsequently, list the symmetry degeneration weight and the four corner points of each tetrahedron. The four integers represent the indices of the corners of the tetrahedron in the k-point list given above. Here, the counter starts at 1 which corresponds to the k point specified in the fourth line.

Warning: VASP does not renormalize the weights of the tetrahedra. Make sure they are properly normalized.


Important: Explicitly listing all the k points is not very convenient, especially in the context of the tetrahedron method. Keep in mind that the automatic modes generate the IBZKPT file in this format. For any nontrivial case, preferably modify an automatically-generated IBZKPT instead of building an explicit list from scratch .

Regular k-point mesh

This mode will automatically generate a mesh where each lattice vector is subdivided into an explicitly defined number of subdivisions. It offers sufficient flexibility and stability and should be preferred for most production calculations. Choose the number of subdivisions , and in the KPOINTS file like this

Regular k-point mesh
0              ! 0 -> determine number of k points automatically
Gamma          ! generate a Gamma centered mesh
4  4  4        ! subdivisions N_1, N_2 and N_3 along the reciprocal lattice vectors
0  0  0        ! optional shift of the mesh (s_1, s_2, s_3)
  • The first line is a comment line.
  • In the second line, set the number of k points to 0 to indicate an automatic mesh generation.
  • The first nonblank character of the third line determines the center of the mesh. The possible choice are -centered (G, g) or the Monkhorst-Pack scheme (M, m).[7]
  • Specify the desired number of subdivisions , and in the fourth line.
  • Optionally add a fifth line to shift the mesh by with respect to the default.
-centered mesh
The following k points sample the Brillouin zone
Monkhorst-Pack mesh
The k point mesh results from this definition

The spacing between the points is the same for both meshes. The only difference is the shift in the numerator of the Monkhorst-Pack mesh. For an odd number of subdivisions, this term is an integer and because of periodic boundaries, the two meshes agree. When the number of subdivisions is even the -centered mesh is shifted by compared to the Monkhorst-Pack one.

Important: Monkhorst-Pack meshes may converge faster than -centered ones. However, carefully read the subsection on symmetry considerations to avoid breaking the symmetry with a Monkhorst-Pack mesh.

Guidelines for the choice of the subsections

As a rule of thumb, choose , , and such that

This guideline is also implemented for the automatic k-point generation using KSPACING. Nevertheless, specifying the , , and manually ensures that changes in the lattice vectors do not affect the k-point mesh. When the primitive cell has (nearly) perpendicular axes (cubic, tetragonal, orthorhombic), this is equivalent to:

Of course, this only provides a guide for the ratios between the subsections. The actual density of the k point mesh has to be increased until some relevant output quantity of the calculation is converged.

Symmetry reduction of the mesh

VASP determines the symmetry of the system. For ISYM 0, the automatically generated k-point meshes are reduced to the irreducible subset. Every k point acquires a weight following their symmetry multiplicity. This can reduce the total number of k points significantly.

Important: To enable an efficient symmetry reduction, the (shifted) regular mesh of k points should conserve the point group symmetry of the reciprocal lattice. Specifically, the generating lattice () should belong to the same class of Bravais lattice as the reciprocal lattice.

Consequently, a shifted regular mesh should not be used for some Bravais lattices. Importantly, this includes the default Monkhorst-Pack mesh for even numbers of subdivisions. Furthermore, the reciprocal lattice vectors do not in general align with lattice vectors. There is typically a difference in the subdivisions obtained from the inverse of the lattice vectors or the reciprocal lattice vectors.

In some special cases, the two options are equal, for example when the length of all vectors is the same or they are mutually perpendicular. Unfortunately, either choice yields incompatible k point meshes for some of the Bravais lattices. Consult the table below to make an informed choice depending on the symmetry of the system.

Bravais lattice variant mesh choices subsection choices
triclinic primitive -centered, Monkhorst Pack ,
monoclinic primitive -centered, Monkhorst Pack ,
base-centered -centered, Monkhorst Pack ,
orthorhombic primitive -centered, Monkhorst Pack ,
base-centered -centered, Monkhorst Pack ,
body-centered -centered, Monkhorst Pack
face-centered -centered
tetragonal primitive -centered, Monkhorst Pack ,
body-centered -centered, Monkhorst Pack
hexagonal rhombohedral -centered ,
hexagonal -centered ,
cubic primitive -centered, Monkhorst Pack ,
body-centered -centered, Monkhorst Pack ,
face-centered -centered ,
Tip: VASP issues an error when it detects an incompatible k point mesh. The specific error message depends on the particular setup but includes the name of the routine IBZKPT, some warning about the generating k-lattice, and some suggestions to overcome the problem.


For the most common use-case of automatic mesh generation, i.e., Monkhorst-Pack meshes, this dictates that:

  • For face-centered cubic (fcc), hexagonal, and fcc-orthorhombic crystalline lattices one should only use -centered Monkhorst-Pack meshes.
  • The reciprocal lattice and generating lattice (defined by the generating vectors ) should belong to the same class of Bravais lattices.
This is almost always ensured when one chooses the mesh dimensions in accordance with the common rule of thumb:
where are the reciprocal lattice vectors.
Sadly, this is not completely foolproof. For instance, for the primitive cells of the body-centered tetragonal and body-centered orthorhombic lattices this criterion will not yield an appropriate generating lattice (this affects the use of automatically generated meshes defined by the length parameter and meshes defined by means of the KSPACING-tag as well).
For the primitive cells of body-centered tetragonal, body-centered orthorhombic, and most other Bravais lattices one might alternatively choose the mesh dimensions in a accordance with:
where are the lattice vectors of the crystalline unit cell.
Unfortunately, this is not guaranteed to always work either: this criterion will, for instance, fail to define an appropriate generating lattice for the primitive cells of face-centered orthorhombic crystal structures.
The problems with the primitive cells of the body-centered tetragonal, and body/face-centered orthorhombic Bravais lattices can be solved in three different ways:
  1. Choose . For Monkhorst-Pack meshes the reciprocal lattice and the generating lattice are guaranteed to be of the same Bravais lattice type. For body-centered tetragonal and face-centered orthorhombic primitive cells this is a good solution since their reciprocal lattices are body-centered tetragonal (!) and body-centered orthorhombic, respectively, i.e.: .
  2. A simple but computationally expensive option for body-centered tetragonal/orthorhombic cells: change the representation of your structure from the primitive cell to the conventional tetragonal/orthorhombic cell. The latter is a supercell containing two primitive cells.
  3. Stick to the primitive cell representation of your structure but define your k-mesh w.r.t. the reciprocal lattice of the corresponding conventional cell, using the generalized regular mesh format. An example, the construction of a generalized regular mesh of k-points based on the conventional cell of the body-centered orthorhombic lattice, is given near the end of the subsection on generalized regular meshes.


Generalized regular meshes

Automatic generation
0
Cartesian
0.25 0.00 0.00
0.00 0.25 0.00
0.00 0.00 0.25
0.00 0.00 0.00
  • If the first non-blank character on the third line of the KPOINTS file is not an A, a, M, m, G or g the third flavour of automatic mesh generation is selected: the mesh of k-points is defined by the specification of its generating basis vectors.
These generating vectors may be specified in Cartesian coordinates or in coordinates of the reciprocal lattice: if the first non-blank character is a C, c, K or k the generating vectors are assumed to be specified in Cartesian coordinates. Any other character (than a, m, g, c, or k) implies the use of coordinates w.r.t. the reciprocal lattice vectors (reciprocal mode). We advise everyone to write reciprocal, r, or R to select reciprocal coordinates, since future versions of VASP might require that the first letter agrees with r for the recipocal mode.
  • On lines 4-6 one should specify the generating vectors , , and , respectively.
In the reciprocal mode the generating vectors are specified as:
where are the three reciprocal basis vectors, and are the values you supply.
In the Cartesian input format the generating vectors are given by:
where is the scaling parameter you have specified on the second line of the POSCAR file.
These generating vectors then define a mesh of k-points given by:
where VASP will automatically choose , , and such that all possible points of the generating mesh in the first Brillouin zone of the reciprocal lattice will be included.
N.B.: The generating k-lattice defined by the vectors , , and and the reciprocal lattice must be commensurate. This means it must be possible to express the reciprocal lattice vectors as sums of integer multiples of the generating lattice vectors. If this is not the case the code will exit in error.
  • On the seventh line one has to specify a shift of the k-point lattice w.r.t. the origin, in coordinates (, , ) w.r.t. the generating lattice vectors , , and .

The resulting shifted mesh of k-points is given by:


From this definition and the definition of the Monkhorst-Pack meshes above it may be clear that Monkhorst-Pack meshes are a particular subset of generalized regular meshes, for which:

(i.e., the generating lattice vectors are integer subdivisions of the reciprocal lattice vectors).

For instance, the generalized regular mesh given by

Automatic generation
0
Reciprocal
 0.25 0.00 0.00
 0.00 0.25 0.00
 0.00 0.00 0.25
 0.50 0.50 0.50

is equivalent to the Monkhorst-Pack mesh specified by

Automatic generation
0
Monkhorst-pack
 4 4 4
 0 0 0


A typical use-case for generalized regular meshes: to generate a mesh of k-points based on the conventional cell of a particular Bravais lattice, to be used with for instance the primitive cell of that lattice (see the subsection on symmetry considerations). As an example, consider the primitive cell of a body-centered orthorhombic lattice:

where the rows of represent the lattice vector of the primitive cell. The corresponding conventional cell is given by

and its reciprocal lattice by

Then the following generating lattice based on the reciprocal lattice of the conventional cell

yields a roughly uniform sampling of the Brillouin zone when , , and are chosen such that:

For instance, for a body-centered orthorhombic primitive cell with , here given in POSCAR file format:

body-centered orthorhombic primitive cell
5.0
-0.500000  0.600000  0.250000
 0.500000 -0.600000  0.250000
 0.500000  0.600000 -0.250000
1
direct
0.000000 0.000000 0.000000

this following KPOINTS file

Generalized regular mesh
0
Cartesian
 0.50000000  0.00000000  0.00000000
 0.00000000  0.41666667  0.00000000
 0.00000000  0.00000000  0.50000000
 0.00000000  0.00000000  0.00000000

corresponds to the aforementioned generating lattice for , , and .


Furthermore, the use of generalized regular meshes has been shown to be potentially superior to the use of Monkhorst-Pack meshes in terms of the convergence of total energy calculations with respect to the number of k-points in the irreducible part of the Brillouin zone (i.e., the resulting number of k-points after symmetry reduction).[3][4] For the moment, however, VASP is not able to automatically construct optimal generalized regular k-points meshes with a certain target sampling density (in the spirit of the aforementioned publications).

Band-structure calculations

To facilitate the calculation of (DFT) band structure, there is a mode that generates strings of k-points connecting specific points in the Brillouin zone:

k-points along high symmetry lines
 40              ! 40 intersections 
Line-mode
reciprocal
  0    0    0    gamma
  0.5  0.5  0    X

  0.5  0.5  0    X
  0.5  0.75 0.25 W

  0.5  0.75 0.25 W
  0    0    0    gamma
  • The first line is treated as a comment line.
  • On the second line, you specify the number of points per line-segment
  • To generate strings of k-points connecting specific points of the Brillouin zone, the first non-blank character on the third line must be an L or l (for line-mode):
  • The coordinates of the k-points to be connected can be supplied in Cartesian coordinates (first non-blank character on the 4th line is either C, c, K, or k) or in coordinates w.r.t. the reciprocal lattice vectors (the first non-blank character on the 4th line is any character other than the aforementioned).
  • The following lines have to specify the begin and end points of the line segments that are to be connected by strings of k-points.
In the reciprocal mode the k-points are specified as:
where are the three reciprocal basis vectors, and are the values you supply.
In the Cartesian input format the k-points are given by:
where is the scaling parameter you have specified on the second line of the POSCAR file.


The example above will generate 40 k-points between the first and the second supplied point, 40 k-points between the third and the fourth, and another 40 points between the final two points. In the case above the coordinates of the k-points are supplied in coordinates (w.r.t. the reciprocal lattice).

Alternatively one may specify these points in Cartesian coordinates:

k-points along high symmetry lines
 40           ! 40 intersections 
Line-mode
Cartesian
  0   0   0   gamma
  0   0   1   X

  0   0   1   X
  0.5 0   1   W

  0.5 0   1   W
  0   0   1   gamma

The choice of points and their labels, in the example above, correspond to (several of) the high-symmetry points in the Brillouin zone of a face-centered cubic (fcc) lattice.

Here is another example, a KPOINTS file for hexagonal structures:

k-points along high symmetry lines for hexagonal str.
 40
line
rec
0.000    0.000    0.500  A
0.000    0.000    0.000  Gamma

0.000    0.000    0.000  Gamma 
0.500    0.000    0.000  M

0.500    0.000    0.000  M
0.333333 0.333333 0.000  K 

0.333333 0.333333 0.000  K
0.000    0.000    0.000  Gamma


N.B.: As mentioned above, this particular mode of k-points generation is primarily used for the calculation of DFT band structures. This is a two-step procedure: first, you have to perform a fully self-consistent calculation with a regular k-point mesh (e.g. a Monkhorst-Pack mesh), and in the second step one does the actual band structure calculation with the line-mode KPOINTS file. The second step is a non-selfconsistent calculation (set ICHARG=11) that needs to start from the self-consistent charge density (CHGCAR file) you have obtained in the first step. There are several examples of this in the tutorial on simple bulk systems.

Automatic k-mesh generation

The most convenient way to specify the k-point sampling of the first Brillouin zone is to have VASP automatically generate a (shifted) regular mesh of points. This mode of k-point generation comes in three different flavours: Rk length, Monkhorst-Pack, and generalized regular meshes.

The following KPOINTS file suffices to fully automatically generate a regular mesh of k-points, centered on the -point, with , , and subdivisions along the reciprocal lattice vectors , , and , respectively.

Automatic mesh
0              ! number of k-points = 0 -> automatic generation scheme 
Auto           ! fully automatic
  10           ! length (R_k)
  • The first line is treated as a comment line.
  • The '0' on the second line signifies that you request an automatically generated mesh of k-points
  • To select the fully automatic flavor of mesh generation the first non-blank character in the third line must be A or a.
  • On the fourth and last line you need to specify a length parameter () that determines , , and (the number of subdivisions along the reciprocal lattice vectors , , and ) in the following manner:
where is the norm of the reciprocal lattice vector .

The fully automatic scheme then generates an -centered Monkhorst-Pack mesh of k-points:

Useful values for the length vary between Rk=10 (large gap insulators) and 100 (d-metals). Note, the aforementioned values are just a rule of thumb: the actual length parameter will have to be chosen such that some relevant output quantity of the calculation is converged w.r.t. to this parameter.

N.B.: an almost identical flavor of automatic mesh generation is offered by the KSPACING tag.

Related tags and sections

KSPACING, KPOINTS_OPT

References


Contents