# What is the number of bands in GPAW?

Silicon has 6 conduction bands of interest. In GPAW tutorials for the calculation of properties of silicon, the parameters nbands which is referred as the "number of electronic bands" goes from 10 to 60 bands depending on the example. What does this parameter means? Also in the documentation introduction it says

For systems with the occupied states well separated from the unoccupied states, one could use just the number of bands needed to hold the occupied states. For metals, more bands are needed. Sometimes, adding more unoccupied bands will improve convergence.

What does this means for metals? For example for a conducting metal where only valence s electrons play a role, where are the unoccupied bands? The conduction band is not even fully filled, why cannot we just set nband=1?

The number of bands you set is usually the total number of bands, i.e. the number of valence bands plus the number of conduction bands. For the calculation of the ground state density, you need a minimum of all the occupied bands (valence bands); if your silicon pseudopotential has 4 valence electrons, that means you need at least 2 bands per silicon atom. These are the valence bands.

For systems with a reasonably large band gap, you can usually calculate the ground state fairly reliably and quickly using only the valence bands. However, even in these cases it is often found that including a small number of extra bands, i.e. conduction bands, will speed up the calculation and make it more robust. For smaller band-gaps, it becomes more important to include some conduction bands, and the extreme case is a metal, where there is no band-gap and so you absolutely need to include some conduction bands.

### Why do we need to compute conduction bands for the ground state?

Remember that your DFT program does not even know the correct Hamiltonian when it's trying to compute the Kohn-Sham states, because the Hamiltonian depends on the density, and the density depends on the Kohn-Sham states. The optimisation usually follows a self-consistent field (SCF) approach, where the states are optimised for a fixed Hamiltonian, then the Hamiltonian is improved and the states optimised again. This SCF "cycle" is repeated until (hopefully) it converges to both the correct Hamiltonian and the correct states.

To see why you need to include some low-lying conduction states, let's imagine running the SCF process backwards. We start with the correct, self-consistent Hamiltonian $$\hat{H}$$ and the eigenstates $$\{\psi_b^{(0)}\}$$ and eigenvalues $$\{\epsilon_b\}$$, and then we add a small error to the Hamiltonian, $$\Delta\hat{H}$$; how do the Kohn-Sham states change? We can use perturbation theory, and write: $$\psi_b(\mathbf{r}) = \sum_{b^\prime} \frac{\langle\psi_{b^\prime}\vert\Delta\hat{H}\vert\psi_{b}\rangle}{\epsilon_{b}-\epsilon_{b^\prime}}\psi_{b^\prime}(\mathbf{r}) \tag{1}$$ Notice that the effect of adding error to the Hamiltonian is to make our eigenstates a mixture of the "true" states -- each band $$b$$ gets a contribution from all the other bands ($$b^\prime$$ in the sum) -- and that the amount of mixing is greatest for bands where $$\epsilon_b\approx\epsilon_{b^\prime}$$.

This mixing doesn't affect the density if all the states have the same occupation, e.g. they are all valence (fully occupied) or all conduction (fully unoccupied); however, any mixing between valence and conduction states will lead to an additional error in the density, which in turn leads to an additional error in the Hamiltonian. This mixing is weak if the conduction states have energies much higher than the valence states (e.g. a wide-band-gap insulator), and the mixing is strong if the conduction states have very similar energies to the valence states (e.g. a metal).

#### Plane-wave DFT

In plane-wave DFT (or regularly-sampled real-space methods), there is an extra consideration. Because the size of a plane-wave basis is very large compared to the number of electrons, you don't diagonalise the Hamiltonian in the plane-wave basis directly, you diagonalise it iteratively and only calculate the bands you want in the plane-wave basis.

If you optimised the Kohn-Sham bands entirely independently of each other, you would have the same problem of the mixing between the "true" bands as discussed above, and it would be extremely difficult to calculate the bands any time two or more were close in energy. To avoid this difficulty, we directly diagonalise the Hamiltonian in the subspace of the bands we're calculating, i.e. we define the matrix $$h$$ such that, $$h_{bb^\prime}=\langle \psi_b\vert\hat{H}\vert\psi_{b^\prime}\rangle \tag{2}$$ and then we directly diagonalise $$h$$ to obtain the best approximation to the "true" eigenstates, in the basis of our current "best guess" eigenstates.

This step is often called "subspace diagonalisation" or "subspace rotation", and it improves the convergence of the iterative methods enormously whenever any of the states of interest are close in energies to each other. However, in order to take advantage of it you need to make sure that you've included all of the bands which might mix with the ones you really care about; in other words, you need to ensure you've included enough conduction states that the mixing between the states you really care about (valence states, in a ground state calculation) and the lowest energy states you aren't including in your calculation is low.

#### Partial occupancies

A further complication in real calculations is that we often use an energy broadening function, which near the Fermi energy leads to partial band occupancies, rather than each band being simply fully occupied or completely empty. The use of partial occupancies improves the stability of both the density optimisation and the Fermi-level description, but it means that some bands which used to be empty conduction states now gain a small occupation, and hence contribute to the density.

In order to model your material accurately, you need to make sure that you've included in your calculation all states which might have some occupancy, and of course we still might want to include higher-energy states which would mix unhelpfully with these partially-occupied states. As a rough guide, you want to include all the conduction states within a few $$\sigma$$ of your Fermi-energy, where $$\sigma$$ is the standard-deviation of your energy broadening function, and "a few" is probably 5 or so (depending a little on the broadening function; some of them have long "tails").

• I am concerned with more simplistic models for metals. Do you have any suggestions for number of bands of a jellium like model? Commented Mar 6, 2023 at 12:22
• @Jelliummind you need enough bands for the number of electrons in the jellium, plus a small number of extra conduction states to improve the numerical conditioning. Commented Mar 7, 2023 at 13:49
• Does that the number of bands has to be larger than the number of electrons? Commented Mar 7, 2023 at 13:51
• @Jelliummind it has to at least enough to contain all the electrons; it is usually more efficient to also have a few extra conduction states, but it is not strictly required. Commented Mar 7, 2023 at 14:05
• @Jelliummind no, usually a band can hold 2 electrons, so "enough to contain all the electrons" would mean 2*num_bands >= num_electrons. Bands would only be able to hold 1 electron if you have a spin-polarised calculation, or are using spinor states (e.g. for spin-orbit coupling, or non-collinear magnetism). Commented Mar 7, 2023 at 14:34