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
filepath='Si/banddos.hdf'
with HDF5Reader(filepath) as h5reader:
data, attributes = h5reader.read(recipe=FleurBands)
# We are interested in each state's s-projection in the MT sphere of the 1st atom type.
weightName = "MT:1s"
# Some other weights:
# weightName = "MT:1p" # p-projection in the 1st atom type's MT sphere.
# weightName = "MT:1d" # d-projection in the 1st atom type's MT sphere.
# weightName = "MT:1f" # f-projection in the 1st atom type's MT sphere.
# weightName = "MT:2s" # s-projection in the 2nd atom type's MT sphere (if available).
# Plot the bandstructure and save to a file bandstructure.png
# If we just want a unweighted bandstrcture, we can omitt the weight argument here
plot_fleur_bands(data, attributes,
weight=weightName,
limits={'y': (-13, 8)},
save_options={
'transparent': False,
},
show=False, #Change show to True to show the plot in a window
save_plots=True)