NBANDS: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
Line 1: Line 1:
{{TAGDEF|NBANDS|[integer]}}
{{TAGDEF|NBANDS|[integer]}}
{{DEF|NBANDS|{{TAG|NELECT}}/2+NIONS/2|non-spinpolarized|0.6*{{TAG|NELECT}}+NMAG|spinpolarized}}
{{DEF|NBANDS|max({{TAG|NELECT}}/2+NIONS/2,{{TAG|NELECT}}*0.6)|}}


Description: {{TAG|NBANDS}} determines the actual number of bands in the calculation.
Description: {{TAG|NBANDS}} specifies the number of bands in the calculation.
----
----
One should choose {{TAG|NBANDS}} such that a considerable number of empty bands is included in the calculation. As a minimum we require one empty band. VASP will give a warning, if this is not the case.
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.


{{TAG|NBANDS}} is also important from a technical point of view: In iterative matrix-diagonalization schemes eigenvectors close to the top of the calculated number of vectors converge much slower than the lowest eigenvectors. This might result in a significant performance loss if not enough empty bands are included in the calculation. Therefore we recommend setting {{TAG|NBANDS}} to {{TAG|NELECT}}/2 + NIONS/2, this is also the default setting of the makeparam utility and of VASP.4.X. This setting is safe in most cases. In some cases, it is also possible to decrease the number of additional bands to NIONS/4 for large systems without performance loss, but on the other hand transition metals do require a much larger number of empty bands (up to 2*NIONS).
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.  


To check this parameter perform several calculations for a fixed potential ({{TAG|ICHARG}}=12) with an increasing number of bands (e.g. starting from {{TAG|NELECT}}/2 + NIONS/2). An accuracy of should be obtained in 10-15 iterations. Mind that the RMM-DIIS scheme ({{TAG|IALGO}}=48) is more sensitive to the number of bands than the default CG algorithm ({{TAG|IALGO}}=38).
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.


{{sc|NBANDS|Examples|Examples that use this tag}}
----
----
[[The_VASP_Manual|Contents]]


[[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.