Python code to plot a band structure with orbital highlighting¶

The following Python code section will import the relevant parts of the masci tools:

In [ ]:
from masci_tools.io.parsers.hdf5 import HDF5Reader
from masci_tools.io.parsers.hdf5.recipes import FleurBands
from masci_tools.vis.fleur import plot_fleur_bands

Next we have to open the banddos.hdf file to make the data available:

In [ ]:
#Read in data
with HDF5Reader('/home/jovyan/1.BasicFLEUR/F8/MoS2/relax/bands/banddos.hdf') as h5reader:
   data, attributes = h5reader.read(recipe=FleurBands)

Now we plot the band structure with a $d$-projection within the first atom type. In the example this is Molybdenum.

In [ ]:
#Plot the data
#Notice that you get the axis object of this plot is returned
#if you want to make any special additions
ax = plot_fleur_bands(data, attributes, weight='MT:1d')

In a second plot highlight the $p$-character within the second atom type. In the example this is Sulfur.

In [ ]:
#Plot the data
#Notice that you get the axis object of this plot is returned
#if you want to make any special additions
ax = plot_fleur_bands(data, attributes, weight='MT:2p')

By inspecting the two plots one can directly see that the states determining the band gap feature Molybdenum $d$ character. One can also see some smaller contributions from other orbital characters in other MT spheres. Even without hybridization this can be the case because the eigenstates can be extended beyond the MT sphere boundary and reach into other MT spheres, giving rise to such contributions.

In [ ]: