Band Structure of NiO

Germain Salvato Vallverdu

Short examples to show how to extract or plot the band structure from a VASP calculation using pymagen.

Written using:

First, load used packages :

I work in a directory that contains the calculations of the NiO band structure. Look at this example to learn how to obtain a band structure from VASP calculations.

1) Read vasprun.xml and extract the band structure

You can obtain some information about the band structure :

2) Extract a given band or eigenvalues

The bands attribute of the BaandStructure object is a dictionnary of arrays that contains all the bands. The shape is the following :

{Spin.up: np.array((nb_bands, nb_kpoints)), Spin.down: np.array((nb_bands, nb_kpoints))}

The 9th bands of spin down is extracted by :

In order to print a band and the corresponding k-points :

3) Plot a simple band structure

3.1) Extract data from the plot

You can get data from the plot and in particular the (x, y) coordinates of each band.

For example, here, you print the abscissa and the energy of the 9th band. Keep in mind that here the data are the ones used to do the plot. Thus the zero to fermi translation is already done according to the BSPlotter class.

Same as above but in a plot.

The same again but merging the slices of the band.

4) Plot DOS

Read the DOS from another calculations.

5) Plot Bands and DOS