Band-structure calculation using density-functional theory: Difference between revisions
m (Huebsch moved page Construction:Band-structure calculation using DFT to Band-structure calculation using density-functional theory without leaving a redirect) |
(Style fixes: meta-opener, & to and, ICHARG|11, backup->back up, p4vasp typo, passive->active voice, uncomment categories, add references, anchor link spaces, KPOINTS section link) |
||
| Line 1: | Line 1: | ||
These step-by-step instructions cover calculating the '''[[:Category:Band structure|band structure]]''' within '''density-functional theory''' (DFT), with references to practical examples. | |||
Obtaining the band structure involves first solving the Hamiltonian to get eigenvalues and eigenvectors, then plotting them as electronic energy levels versus crystal momentum. The Hamiltonian requires at least the density (charge and magnetization) and possibly higher derivatives depending on the [[:Category:Exchange-correlation functionals|exchange-correlation]] (XC) functional. | Obtaining the band structure involves first solving the Hamiltonian to get eigenvalues and eigenvectors, then plotting them as electronic energy levels versus crystal momentum. The Hamiltonian requires at least the density (charge and magnetization) and possibly higher derivatives depending on the [[:Category:Exchange-correlation functionals|exchange-correlation]] (XC) functional. | ||
{{NB|mind| The '''unified approach''' presented on this page applies to [[GGA#Available functionals|LDA]] (needs density), [[GGA|GGA]] (needs density and gradient) and deorbitalized meta-GGA (needs density, gradient and Laplacian) functionals. In contrast, [[METAGGA|meta-GGAs]] need the kinetic energy density and follow a [[Band-structure calculation using meta-GGA functionals|different approach]]. Another [[Band-structure calculation using hybrid functionals| | {{NB|mind| The '''unified approach''' presented on this page applies to [[GGA#Available functionals|LDA]] (needs density), [[GGA|GGA]] (needs density and gradient) and deorbitalized meta-GGA (needs density, gradient and Laplacian) functionals. In contrast, [[METAGGA|meta-GGAs]] need the kinetic energy density and follow a [[Band-structure calculation using meta-GGA functionals|different approach]]. Another [[Band-structure calculation using hybrid functionals|approach]] is required for [[:Category:Hybrid functionals|hybrid functionals]].}} | ||
== Step-by-step instructions == | == Step-by-step instructions == | ||
For DFT, the Hamiltonian can be expressed in terms of the electronic charge and magnetization density. Both are written to the {{FILE|CHGCAR}} file during an initial self-consistent-field (SCF) run. From this converged {{FILE|CHGCAR}} file, we can obtain the eigenvalues at the desired [[#Choosing a high-symmetry path| high-symmetry path]] via a subsequent NSCF (= fixed density) run. | For DFT, the Hamiltonian can be expressed in terms of the electronic charge and magnetization density. Both are written to the {{FILE|CHGCAR}} file during an initial self-consistent-field (SCF) run. From this converged {{FILE|CHGCAR}} file, we can obtain the eigenvalues at the desired [[#Choosing a high-symmetry path|high-symmetry path]] via a subsequent NSCF (= fixed density) run. | ||
To compute the DFT ([[GGA#Available functionals|LDA]]/[[GGA|GGA]]/deorbitalized meta-GGA) band structure, you have two options. Note that '''[[#Option A: Single run | Option A: Single run]]''' has been made available for convenience, but does not allow the same level of control nor (necessarily) performance as '''[[#Option B: Split run | Option B: Split run]]'''. | To compute the DFT ([[GGA#Available functionals|LDA]]/[[GGA|GGA]]/deorbitalized meta-GGA) band structure, you have two options. Note that '''[[#Option A: Single run|Option A: Single run]]''' has been made available for convenience, but does not allow the same level of control nor (necessarily) performance as '''[[#Option B: Split run|Option B: Split run]]'''. | ||
=== Option A: Single run === | === Option A: Single run === | ||
{{NB|mind| This option is only available as of VASP 6.3.0.}} | {{NB|mind| This option is only available as of VASP 6.3.0.}} | ||
With the introduction of the {{FILE|KPOINTS_OPT}} file, VASP can calculate the band structure in a single run. Be aware that there is a tradeoff of choosing convenience over control (see '''[[#Option B: Split run | Option B]]''' for details). Internally, this will perform a self-consistent field (SCF) computation followed by a fixed-density (NSCF) computation. | With the introduction of the {{FILE|KPOINTS_OPT}} file, VASP can calculate the band structure in a single run. Be aware that there is a tradeoff of choosing convenience over control (see '''[[#Option B: Split run|Option B]]''' for details). Internally, this will perform a self-consistent field (SCF) computation followed by a fixed-density (NSCF) computation. | ||
* '''Step 1''': Choose your [[#Choosing a high-symmetry path| high-symmetry path]] and rename the resulting {{FILE|KPOINTS}} file to {{FILE|KPOINTS_OPT}}. | * '''Step 1''': Choose your [[#Choosing a high-symmetry path|high-symmetry path]] and rename the resulting {{FILE|KPOINTS}} file to {{FILE|KPOINTS_OPT}}. | ||
* '''Step 2''': Set up additional files: | * '''Step 2''': Set up additional files: | ||
| Line 21: | Line 21: | ||
:* {{FILE|POSCAR}} containing structure information, | :* {{FILE|POSCAR}} containing structure information, | ||
:* {{FILE|INCAR}} containing any required tags ({{TAG|NSW}}=0 | :* {{FILE|INCAR}} containing any required tags ({{TAG|NSW}}=0 and {{TAG|IBRION}}=-1 or {{TAG|ISTART}}=0 and {{TAG|ICHARG}}=2, plus other tags as needed, e.g., {{TAG|EDIFF}}, {{TAG|LORBIT}}=11, etc.), | ||
:* {{FILE|KPOINTS}} containing a regular '''k''' mesh, using e.g. [[KPOINTS#Regular_k-point_mesh|Γ-centered mesh or Monkhorst-Pack mesh]], | :* {{FILE|KPOINTS}} containing a regular '''k''' mesh, using e.g. [[KPOINTS#Regular_k-point_mesh|Γ-centered mesh or Monkhorst-Pack mesh]], | ||
| Line 27: | Line 27: | ||
:* {{FILE|POTCAR}} containing the required pseudopotentials. | :* {{FILE|POTCAR}} containing the required pseudopotentials. | ||
:Note that {{FILE| KPOINTS}} and {{FILE| KPOINTS_OPT}} both co-exist in this method: {{FILE| KPOINTS}} holds the regular '''k''' mesh for the initial SCF computation, while {{FILE| KPOINTS_OPT}} holds the high-symmetry path along which the band structure will be evaluated. | :Note that {{FILE|KPOINTS}} and {{FILE|KPOINTS_OPT}} both co-exist in this method: {{FILE|KPOINTS}} holds the regular '''k''' mesh for the initial SCF computation, while {{FILE|KPOINTS_OPT}} holds the high-symmetry path along which the band structure will be evaluated. | ||
* '''Step 3''': Start the VASP run, which will internally perform an SCF run to obtain the {{FILE| CHGCAR}} and then perform the NSCF run at fixed density to evaluate the eigenvalues along the high-symmetry path. | * '''Step 3''': Start the VASP run, which will internally perform an SCF run to obtain the {{FILE|CHGCAR}} and then perform the NSCF run at fixed density to evaluate the eigenvalues along the high-symmetry path. | ||
* '''Step 4''': [[#Visualization | Visualize]] the band structure using {{py4vasp}}. | * '''Step 4''': [[#Visualization | Visualize]] the band structure using {{py4vasp}}. | ||
| Line 35: | Line 35: | ||
=== Option B: Split run === | === Option B: Split run === | ||
Splitting the band-structure calculation into two separate VASP runs allows full control over the tags/parameters for both steps. In this approach, first, an initial self-consistent field (SCF) run yields a converged {{FILE| CHGCAR}} file storing density (charge | Splitting the band-structure calculation into two separate VASP runs allows full control over the tags/parameters for both steps. In this approach, first, an initial self-consistent field (SCF) run yields a converged {{FILE|CHGCAR}} file storing density (charge and magnetization) information. Then, we start an NSCF (fixed-density) run that reads in the {{FILE|CHGCAR}} file and computes the eigenvalues along the chosen [[#Choosing a high-symmetry path|high-symmetry path]]. | ||
{{NB|tip| If you already have a converged {{FILE|CHGCAR}} file of a static self-consistent-field (SCF) calculation, copy that {{FILE|CHGCAR}} to your working directory and proceed with '''Step 4'''.}} | {{NB|tip| If you already have a converged {{FILE|CHGCAR}} file of a static self-consistent-field (SCF) calculation, copy that {{FILE|CHGCAR}} to your working directory and proceed with '''Step 4'''.}} | ||
* '''Step 1''': Set up the following files: | * '''Step 1''': Set up the following files (see [[Setting up an electronic minimization]] for general guidance on INCAR settings and k-point convergence): | ||
:* {{FILE|POSCAR}} containing structure information, | :* {{FILE|POSCAR}} containing structure information, | ||
:* {{FILE|INCAR}} containing any required tags ({{TAG|NSW}}=0 | :* {{FILE|INCAR}} containing any required tags ({{TAG|NSW}}=0 and {{TAG|IBRION}}=-1 or {{TAG|ISTART}}=0 and {{TAG|ICHARG}}=2, {{TAG|LKPOINTS_OPT}}=<code>.FALSE.</code>, plus other tags as needed, e.g., {{TAG|EDIFF}}), | ||
:* {{FILE|KPOINTS}} containing a regular '''k''' mesh, using e.g. [[KPOINTS#Regular_k-point_mesh|Γ-centered mesh or Monkhorst-Pack mesh]], | :* {{FILE|KPOINTS}} containing a regular '''k''' mesh, using e.g. [[KPOINTS#Regular_k-point_mesh|Γ-centered mesh or Monkhorst-Pack mesh]], | ||
| Line 51: | Line 51: | ||
* '''Step 2''': Start VASP to perform the SCF run, and wait for the calculation to converge. Adjust parameters if needed until convergence is reached (see, e.g., {{TAG|EDIFF}}). | * '''Step 2''': Start VASP to perform the SCF run, and wait for the calculation to converge. Adjust parameters if needed until convergence is reached (see, e.g., {{TAG|EDIFF}}). | ||
* '''Step 3''' (optional): You may wish to | * '''Step 3''' (optional): You may wish to back up your {{FILE|INCAR}}, {{FILE|POSCAR}}, {{FILE|POTCAR}}, {{FILE|KPOINTS}} and {{FILE|CHGCAR}} to a new directory before proceeding. | ||
* '''Step 4''': Choose a [[#Choosing a high-symmetry path| high-symmetry path]] and overwrite the {{FILE|KPOINTS}} file accordingly. | * '''Step 4''': Choose a [[#Choosing a high-symmetry path|high-symmetry path]] and overwrite the {{FILE|KPOINTS}} file accordingly. | ||
* '''Step 5''': Adjust your {{FILE|INCAR}} file: | * '''Step 5''': Adjust your {{FILE|INCAR}} file: | ||
:* Remove any of the following tags, if present: {{TAG| NSW}}, {{TAG| IBRION}} | :* Remove any of the following tags, if present: {{TAG|NSW}}, {{TAG|IBRION}} and {{TAG|ISTART}}. | ||
:* Add | :* Add {{TAG|ICHARG|11}}. This instructs VASP to restart from the converged charge density in {{FILE|CHGCAR}} and continue with the density held fixed. | ||
:* Add additional relevant tags as needed, i.e., {{TAG| LORBIT}}=11. | :* Add additional relevant tags as needed, i.e., {{TAG|LORBIT}}=11. | ||
{{NB|mind| You may wish to also set the {{TAG|EFERMI}} tag to a numeric value to keep the Fermi energy fixed for the next step (because the Fermi energy cannot be computed based on '''k''' points along a path, and the Fermi energy given by the NSCF calculation will therefore be incorrect when {{TAG|ICHARG|11}}). You can extract the Fermi energy from the SCF calculation using {{py4vasp}} like so: | {{NB|mind| You may wish to also set the {{TAG|EFERMI}} tag to a numeric value to keep the Fermi energy fixed for the next step (because the Fermi energy cannot be computed based on '''k''' points along a path, and the Fermi energy given by the NSCF calculation will therefore be incorrect when {{TAG|ICHARG|11}}). You can extract the Fermi energy from the SCF calculation using {{py4vasp}} like so: | ||
| Line 69: | Line 69: | ||
* '''Step 6''': Start VASP to perform the NSCF calculation, reading in the {{FILE|CHGCAR}} file and keeping the density fixed. | * '''Step 6''': Start VASP to perform the NSCF calculation, reading in the {{FILE|CHGCAR}} file and keeping the density fixed. | ||
{{NB|mind| Any existing {{FILE|KPOINTS_OPT}} file triggers '''[[#Option A: Single run | Option A]]''' unless you disable this by setting {{TAG| LKPOINTS_OPT}} to <code>.FALSE.</code> in the {{FILE|INCAR}} file.}} | {{NB|mind| Any existing {{FILE|KPOINTS_OPT}} file triggers '''[[#Option A: Single run|Option A]]''' unless you disable this by setting {{TAG|LKPOINTS_OPT}} to <code>.FALSE.</code> in the {{FILE|INCAR}} file.}} | ||
* '''Step 7''': [[#Visualization | Visualize]] the band structure using {{py4vasp}}. | * '''Step 7''': [[#Visualization | Visualize]] the band structure using {{py4vasp}}. | ||
| Line 75: | Line 75: | ||
== Choosing a high-symmetry path == | == Choosing a high-symmetry path == | ||
[[:Category:Band structure |Band-structure]] calculations generally compute the '''Kohn-Sham orbitals''' and eigenenergies along a path in reciprocal space which usually connects high-symmetry points in the first '''Brillouin zone'''. Which '''k''' points are high-symmetry points depends on the '''space group''' of your structure. | [[:Category:Band structure|Band-structure]] calculations generally compute the '''Kohn-Sham orbitals''' and eigenenergies along a path in reciprocal space which usually connects high-symmetry points in the first '''Brillouin zone'''. Which '''k''' points are high-symmetry points depends on the '''space group''' of your structure. | ||
Use external tools{{cite|seekpath}}{{cite|bilbao:kvec}} to find the space group, plot the Brillouin zone, and pick a high-symmetry '''k''' path. Extract the corresponding coordinates to a new {{FILE|KPOINTS}} file. | |||
{{NB|mind| The tools provide the coordinates and the labels for a given structure. Because these paths depend on the symmetry, take special care that the analysis is not tainted by finite precision or rounding. Also, keep in mind that the primitive and the conventional unit cell have different reciprocal coordinate systems.}} | {{NB|mind| The tools provide the coordinates and the labels for a given structure. Because these paths depend on the symmetry, take special care that the analysis is not tainted by finite precision or rounding. Also, keep in mind that the primitive and the conventional unit cell have different reciprocal coordinate systems.}} | ||
An example for what such a {{FILE| KPOINTS}} file might look like (example for face-centered-cubic silicon): | An example for what such a {{FILE|KPOINTS}} file might look like (example for face-centered-cubic silicon): | ||
k points for band structure | k points for band structure | ||
10 ! intersections | 10 ! intersections | ||
| Line 98: | Line 98: | ||
The empty lines and labels are optional and meant for readability. The labels will be used by {{py4vasp}}. VASP produces equidistant '''k''' points for each segment. The example above would yield 10 points from ''L'' to ''Γ'', 10 points from ''Γ'' to ''X'', 10 from ''X'' to ''U'', and 10 from ''K'' to ''Γ'', including endpoints. | The empty lines and labels are optional and meant for readability. The labels will be used by {{py4vasp}}. VASP produces equidistant '''k''' points for each segment. The example above would yield 10 points from ''L'' to ''Γ'', 10 points from ''Γ'' to ''X'', 10 from ''X'' to ''U'', and 10 from ''K'' to ''Γ'', including endpoints. | ||
For further details and instructions, please consult the [[KPOINTS#Band-structure_calculations| KPOINTS]] documentation. | For further details and instructions, please consult the [[KPOINTS#Band-structure_calculations|KPOINTS § Band-structure calculations]] documentation. | ||
== Visualization == | == Visualization == | ||
| Line 105: | Line 105: | ||
<syntaxhighlight lang="python"> | <syntaxhighlight lang="python"> | ||
import py4vasp | import py4vasp | ||
calc = | calc = py4vasp.Calculation.from_path(".") | ||
calc.band.plot() | calc.band.plot() | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 117: | Line 117: | ||
In case a {{FILE|KPOINTS_OPT}} file is present ([[#Option A: Single run |Option A]]), VASP computes the band energies for the '''k''' points of the {{FILE|KPOINTS_OPT}} file after SCF convergence is reached within the same submitted job. There may, however, be a '''computational advantage''' to splitting the run ([[#Option B: Split run |Option B]]) because of different optimal batching options for the '''k''' mesh. | In case a {{FILE|KPOINTS_OPT}} file is present ([[#Option A: Single run |Option A]]), VASP computes the band energies for the '''k''' points of the {{FILE|KPOINTS_OPT}} file after SCF convergence is reached within the same submitted job. There may, however, be a '''computational advantage''' to splitting the run ([[#Option B: Split run |Option B]]) because of different optimal batching options for the '''k''' mesh. | ||
There are additional advantages to using the {{FILE|KPOINTS_OPT}} file for computing the band structure [[Band-structure calculation using hybrid functionals| using hybrid functionals]] or [[Band-structure calculation using meta-GGA functionals| using meta-GGA functionals]]. Refer to these references for details. | There are additional advantages to using the {{FILE|KPOINTS_OPT}} file for computing the band structure [[Band-structure calculation using hybrid functionals|using hybrid functionals]] or [[Band-structure calculation using meta-GGA functionals|using meta-GGA functionals]]. Refer to these references for details. | ||
A number of '''post-processing options''' for the Kohn-Sham (KS) orbitals can affect the computation of the band structure. Usually, these options are set directly in the {{FILE|INCAR}} file: See, for example, {{TAG|LORBIT}}=11 or [[ | A number of '''post-processing options''' for the Kohn-Sham (KS) orbitals can affect the computation of the band structure. Usually, these options are set directly in the {{FILE|INCAR}} file: See, for example, {{TAG|LORBIT}}=11 or [[Constructing Wannier orbitals]]. | ||
== Practical examples == | == Practical examples == | ||
| Line 133: | Line 133: | ||
== Related tags and articles == | == Related tags and articles == | ||
{{FILE| KPOINTS}}, {{FILE| KPOINTS_OPT}}, {{FILE| KPOINTS_WAN}}, {{TAG|ICHARG}}, [[GGA#Available functionals|LDA]], [[GGA|GGA]], [[Setting up an electronic minimization]], [[Band-structure calculation using meta-GGA functionals]], [[Band-structure calculation using hybrid functionals]] | {{FILE|KPOINTS}}, {{FILE|KPOINTS_OPT}}, {{FILE|KPOINTS_WAN}}, {{TAG|ICHARG}}, [[GGA#Available functionals|LDA]], [[GGA|GGA]], [[Setting up an electronic minimization]], [[Band-structure calculation using meta-GGA functionals]], [[Band-structure calculation using hybrid functionals]] | ||
== References == | == References == | ||
< | <references/> | ||
[[Category:Band structure]] | |||
[[Category:Howto]] | |||
Revision as of 13:10, 19 March 2026
These step-by-step instructions cover calculating the band structure within density-functional theory (DFT), with references to practical examples.
Obtaining the band structure involves first solving the Hamiltonian to get eigenvalues and eigenvectors, then plotting them as electronic energy levels versus crystal momentum. The Hamiltonian requires at least the density (charge and magnetization) and possibly higher derivatives depending on the exchange-correlation (XC) functional.
| Mind: The unified approach presented on this page applies to LDA (needs density), GGA (needs density and gradient) and deorbitalized meta-GGA (needs density, gradient and Laplacian) functionals. In contrast, meta-GGAs need the kinetic energy density and follow a different approach. Another approach is required for hybrid functionals. |
Step-by-step instructions
For DFT, the Hamiltonian can be expressed in terms of the electronic charge and magnetization density. Both are written to the CHGCAR file during an initial self-consistent-field (SCF) run. From this converged CHGCAR file, we can obtain the eigenvalues at the desired high-symmetry path via a subsequent NSCF (= fixed density) run.
To compute the DFT (LDA/GGA/deorbitalized meta-GGA) band structure, you have two options. Note that Option A: Single run has been made available for convenience, but does not allow the same level of control nor (necessarily) performance as Option B: Split run.
Option A: Single run
| Mind: This option is only available as of VASP 6.3.0. |
With the introduction of the KPOINTS_OPT file, VASP can calculate the band structure in a single run. Be aware that there is a tradeoff of choosing convenience over control (see Option B for details). Internally, this will perform a self-consistent field (SCF) computation followed by a fixed-density (NSCF) computation.
- Step 1: Choose your high-symmetry path and rename the resulting KPOINTS file to KPOINTS_OPT.
- Step 2: Set up additional files:
- POSCAR containing structure information,
- KPOINTS containing a regular k mesh, using e.g. Γ-centered mesh or Monkhorst-Pack mesh,
- POTCAR containing the required pseudopotentials.
- Note that KPOINTS and KPOINTS_OPT both co-exist in this method: KPOINTS holds the regular k mesh for the initial SCF computation, while KPOINTS_OPT holds the high-symmetry path along which the band structure will be evaluated.
- Step 3: Start the VASP run, which will internally perform an SCF run to obtain the CHGCAR and then perform the NSCF run at fixed density to evaluate the eigenvalues along the high-symmetry path.
Option B: Split run
Splitting the band-structure calculation into two separate VASP runs allows full control over the tags/parameters for both steps. In this approach, first, an initial self-consistent field (SCF) run yields a converged CHGCAR file storing density (charge and magnetization) information. Then, we start an NSCF (fixed-density) run that reads in the CHGCAR file and computes the eigenvalues along the chosen high-symmetry path.
| Tip: If you already have a converged CHGCAR file of a static self-consistent-field (SCF) calculation, copy that CHGCAR to your working directory and proceed with Step 4. |
- Step 1: Set up the following files (see Setting up an electronic minimization for general guidance on INCAR settings and k-point convergence):
- POSCAR containing structure information,
- KPOINTS containing a regular k mesh, using e.g. Γ-centered mesh or Monkhorst-Pack mesh,
- POTCAR containing the required pseudopotentials.
Warning: For the initial SCF run (Step 2), do not set ICHARG = 11. You will find mentions of the ICHARG tag related to DFT band-structure calculations: This is specific to Step 5-6.
|
- Step 2: Start VASP to perform the SCF run, and wait for the calculation to converge. Adjust parameters if needed until convergence is reached (see, e.g., EDIFF).
- Step 3 (optional): You may wish to back up your INCAR, POSCAR, POTCAR, KPOINTS and CHGCAR to a new directory before proceeding.
- Step 4: Choose a high-symmetry path and overwrite the KPOINTS file accordingly.
- Step 5: Adjust your INCAR file:
Mind: You may wish to also set the EFERMI tag to a numeric value to keep the Fermi energy fixed for the next step (because the Fermi energy cannot be computed based on k points along a path, and the Fermi energy given by the NSCF calculation will therefore be incorrect when ICHARG = 11). You can extract the Fermi energy from the SCF calculation using py4vasp like so:
from py4vasp import Calculation
Calculation.from_path("dir/with/vaspout.h5").dos.read()["fermi_energy"]
# or, instead:
Calculation.from_path("dir/with/vaspout.h5").band.read()["fermi_energy"]
Alternatively, you can investigate the vaspout.h5 file yourself, and find the Fermi energy under |
- Step 6: Start VASP to perform the NSCF calculation, reading in the CHGCAR file and keeping the density fixed.
Mind: Any existing KPOINTS_OPT file triggers Option A unless you disable this by setting LKPOINTS_OPT to .FALSE. in the INCAR file.
|
Choosing a high-symmetry path
Band-structure calculations generally compute the Kohn-Sham orbitals and eigenenergies along a path in reciprocal space which usually connects high-symmetry points in the first Brillouin zone. Which k points are high-symmetry points depends on the space group of your structure.
Use external tools[1][2] to find the space group, plot the Brillouin zone, and pick a high-symmetry k path. Extract the corresponding coordinates to a new KPOINTS file.
| Mind: The tools provide the coordinates and the labels for a given structure. Because these paths depend on the symmetry, take special care that the analysis is not tainted by finite precision or rounding. Also, keep in mind that the primitive and the conventional unit cell have different reciprocal coordinate systems. |
An example for what such a KPOINTS file might look like (example for face-centered-cubic silicon):
k points for band structure 10 ! intersections line Fractional 0.50000 0.50000 0.50000 L 0.00000 0.00000 0.00000 Γ 0.00000 0.00000 0.00000 Γ 0.00000 0.50000 0.50000 X 0.00000 0.50000 0.50000 X 0.25000 0.62500 0.62500 U 0.37500 0.7500 0.37500 K 0.00000 0.00000 0.00000 Γ
The empty lines and labels are optional and meant for readability. The labels will be used by py4vasp. VASP produces equidistant k points for each segment. The example above would yield 10 points from L to Γ, 10 points from Γ to X, 10 from X to U, and 10 from K to Γ, including endpoints. For further details and instructions, please consult the KPOINTS § Band-structure calculations documentation.
Visualization
py4vasp provides utilities for plotting the band structure. In a python notebook in the directory of the calculation (or a different directory - see input to py4vasp.Calculation.from_path), you can run the following code:
import py4vasp
calc = py4vasp.Calculation.from_path(".")
calc.band.plot()
However, if using KPOINTS_OPT for the high-symmetry path (Option A: Single run), you need to pass "kpoints_opt" as an argument to calc.band.plot:
calc.band.plot("kpoints_opt")
Mind: If using Option B: Split run and not setting EFERMI in Step 5, you can still change the Fermi energy at the plotting stage:
calc.band.plot(fermi_energy=...) # plug in extracted Fermi energy from SCF run
|
Recommendations and advice
In case a KPOINTS_OPT file is present (Option A), VASP computes the band energies for the k points of the KPOINTS_OPT file after SCF convergence is reached within the same submitted job. There may, however, be a computational advantage to splitting the run (Option B) because of different optimal batching options for the k mesh.
There are additional advantages to using the KPOINTS_OPT file for computing the band structure using hybrid functionals or using meta-GGA functionals. Refer to these references for details.
A number of post-processing options for the Kohn-Sham (KS) orbitals can affect the computation of the band structure. Usually, these options are set directly in the INCAR file: See, for example, LORBIT=11 or Constructing Wannier orbitals.
Practical examples
We offer additional tutorials for calculating and visualizing DFT band structures:
- Bulk systems, Part 1: band structure of face-centered-cubic silicon.
- Bulk systems, Part 2: band structure of cubic-diamond silicon.
- Bulk systems, Part 3: band structure of face-centered-cubic nickel.
Related tags and articles
KPOINTS, KPOINTS_OPT, KPOINTS_WAN, ICHARG, LDA, GGA, Setting up an electronic minimization, Band-structure calculation using meta-GGA functionals, Band-structure calculation using hybrid functionals