NBANDS: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{TAGDEF|NBANDS|[integer]}} | {{TAGDEF|NBANDS|[integer]}} | ||
{{DEF|NBANDS|{{TAG|NELECT}}/2+NIONS/2 | {{DEF|NBANDS|max({{TAG|NELECT}}/2+NIONS/2,{{TAG|NELECT}}*0.6)|}} | ||
Description: {{TAG|NBANDS}} | Description: {{TAG|NBANDS}} specifies the number of bands in the calculation. | ||
---- | ---- | ||
The right choice of {{TAG|NBANDS}} strongly depends on the type of the performed | |||
calculation and the system. As a minimum, VASP requires one empty band, | |||
otherwise, a warning is given. Only in large gap insulators, accurate | |||
results can be obtained without empty bands and the warning might be ignored. | |||
Since in iterative matrix-diagonalization schemes eigenvectors close to the top | |||
of the calculated number of states converge much slower than the lowest | |||
eigenstates, it is important to choose a sufficiently large {{TAG|NBANDS}}. An | |||
insufficient number of empty bands might result in a significant performance | |||
loss. Therefore, we recommend setting {{TAG|NBANDS}} to the default value of | |||
''NELECT/2 + NIONS/2'', which is safe in most cases. In some cases, it is also | |||
possible to decrease the number of additional bands to ''NIONS/4'' and improve | |||
the performance slightly. On the other hand, some transition metals and atoms with open | |||
''f'' shells might require a much larger number of empty bands (up to | |||
''2*NIONS''). | |||
To check this parameter perform several calculations for a fixed potential | |||
({{TAG|ICHARG}}=12) with an increasing number of bands (e.g. starting from | |||
''NELECT/2 + NIONS/2''). An accuracy of <math> 10^{-6}</math> should be obtained | |||
in 10-15 iterations. | |||
The convergence of the calculations with a large number of empty states can be | |||
slow. In such cases, we recommend performing an exact diagonalization | |||
({{TAG|ALGO}}=Exact) of the Hamiltonian with empty bands starting from a | |||
converged charge density. | |||
{{NB|tip|Note that the {{TAG|RMM-DIIS}} scheme ({{TAG|ALGO}}{{=}}Fast) is more sensitive to the number of bands than the default Davidson algorithm ({{TAG|ALGO}}{{=}}Normal).|}} | |||
==== Parallelization ==== | |||
When executed on multiple CPUs, VASP automatically increases the number of bands, so that {{TAG|NBANDS}} is divisible by the number of CPU cores. | |||
If {{TAG|NCORE}} > 1, {{TAG|NBANDS}} is increased until it is divisible by the number of cores in a group ({{TAG|NCORE}}). | |||
If {{TAG|KPAR}} > 1, {{TAG|NBANDS}} is increased until it is divisible by the number of cores in a group. | |||
==== Spin-polarized calculation ==== | |||
In the case of spin-polarized calculations, the default value for {{TAG|NBANDS}} is | |||
increased to account for the initial magnetic moments. | |||
==== Noncollinear calculation ==== | |||
In noncollinear calculations, the default {{TAG|NBANDS}} value is doubled to account for the | |||
spinors components. | |||
---- | ---- | ||
[[Category:INCAR]][[Category:Electronic minimization]][[Category:Dielectric properties]] | [[Category:INCAR]][[Category:Electronic minimization]][[Category:Dielectric properties]] |
Revision as of 12:13, 7 April 2022
NBANDS = [integer]
Default: NBANDS | = max(NELECT/2+NIONS/2,NELECT*0.6) |
Description: NBANDS specifies the number of bands in the calculation.
The right choice of NBANDS strongly depends on the type of the performed calculation and the system. As a minimum, VASP requires one empty band, otherwise, a warning is given. Only in large gap insulators, accurate results can be obtained without empty bands and the warning might be ignored.
Since in iterative matrix-diagonalization schemes eigenvectors close to the top of the calculated number of states converge much slower than the lowest eigenstates, it is important to choose a sufficiently large NBANDS. An insufficient number of empty bands might result in a significant performance loss. Therefore, we recommend setting NBANDS to the default value of NELECT/2 + NIONS/2, which is safe in most cases. In some cases, it is also possible to decrease the number of additional bands to NIONS/4 and improve the performance slightly. On the other hand, some transition metals and atoms with open f shells might require a much larger number of empty bands (up to 2*NIONS). To check this parameter perform several calculations for a fixed potential (ICHARG=12) with an increasing number of bands (e.g. starting from NELECT/2 + NIONS/2). An accuracy of should be obtained in 10-15 iterations.
The convergence of the calculations with a large number of empty states can be slow. In such cases, we recommend performing an exact diagonalization (ALGO=Exact) of the Hamiltonian with empty bands starting from a converged charge density.
Tip: Note that the RMM-DIIS scheme (ALGO=Fast) is more sensitive to the number of bands than the default Davidson algorithm (ALGO=Normal). |
Parallelization
When executed on multiple CPUs, VASP automatically increases the number of bands, so that NBANDS is divisible by the number of CPU cores. If NCORE > 1, NBANDS is increased until it is divisible by the number of cores in a group (NCORE). If KPAR > 1, NBANDS is increased until it is divisible by the number of cores in a group.
Spin-polarized calculation
In the case of spin-polarized calculations, the default value for NBANDS is increased to account for the initial magnetic moments.
Noncollinear calculation
In noncollinear calculations, the default NBANDS value is doubled to account for the spinors components.