Warning: number of bands has been changed from the values supplied in the INCAR file

Queries about input and output files, running specific calculations, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
shweta_choudhary
Newbie
Newbie
Posts: 15
Joined: Tue May 16, 2023 12:56 pm

Warning: number of bands has been changed from the values supplied in the INCAR file

#1 Post by shweta_choudhary » Tue May 20, 2025 12:24 pm

Dear Support Team,

I would like to understand why the NBANDS is overridden by the value specified in the INCAR file.

Additionally, if different NBANDS values are used for the SCF and non-SCF calculations (with the non-SCF run utilizing the CHGCAR and WAVECAR from the SCF calculation), will this discrepancy affect the accuracy or reliability of the resulting band structure and density of states (DOS)?

Code: Select all

 -----------------------------------------------------------------------------
|                                                                             |
|           W    W    AA    RRRRR   N    N  II  N    N   GGGG   !!!           |
|           W    W   A  A   R    R  NN   N  II  NN   N  G    G  !!!           |
|           W    W  A    A  R    R  N N  N  II  N N  N  G       !!!           |
|           W WW W  AAAAAA  RRRRR   N  N N  II  N  N N  G  GGG   !            |
|           WW  WW  A    A  R   R   N   NN  II  N   NN  G    G                |
|           W    W  A    A  R    R  N    N  II  N    N   GGGG   !!!           |
|                                                                             |
|     The number of bands has been changed from the values supplied in        |
|     the INCAR file. This is a result of running the parallel version.       |
|     The orbitals not found in the WAVECAR file will be initialized with     |
|     random numbers, which is usually adequate. For correlated               |
|     calculations, however, you should redo the groundstate calculation.     |
|     I found NBANDS = 296. Now, NBANDS = 480.                                |
|                                                                             |
 -----------------------------------------------------------------------------

Thanks,
shweta


henrique_miranda
Global Moderator
Global Moderator
Posts: 518
Joined: Mon Nov 04, 2019 12:41 pm
Contact:

Re: Warning: number of bands has been changed from the values supplied in the INCAR file

#2 Post by henrique_miranda » Tue May 20, 2025 7:34 pm

The reason as to why NBANDS can be changed with respect to the value you specify in the INCAR when you run vasp in parallel is due to the way data is distributed. If you don't specify NCORE or KPAR then VASP will default to band paralelism which means that each MPI rank (mpirun -np <number of MPI ranks>) will take NBANDS/<number of MPI ranks>. This means that NBANDS should be divisible by the number of MPI ranks and so we internaly force it to be so. Note that the number of bands is always increased which means the accuracy of your calculation will not be negatively affected.

Can setting a larger NBANDS in the NSCF calculation than in the SCF negatively your calculation? Yes it can, normally it does not and you can always make sure it does not.
If you add more bands the iterative diagonalization or direct optimization algorithm you use to obtain the eigenvalues will still optimize those bands.
What can be problematic is that the convergence criteria is the total energy, which means that the empty states are not checked to stop the iterative procedure.
This is why if you are doing calculations that involve many empty states (RPA or GW for example) and memory allows, it might be a good idea to use ALGO=Exact.
Note that for getting the DFT bandgap or plotting the bandstructure simply setting a larger NBANDS is often accurate enough. If you want to be extra carefull you can set EDIFF smaller than the one used in the SCF calculation. If you want to be very very careful you can try using ALGO=Exact, but I personally find this overkill.


Post Reply