Note
Click here to download the full example code
Calculating band center using vdos¶
This example shows how to plot projected density of states
import os
from pdos_overlap.vasp_dos import get_example_data
from pdos_overlap.vasp_dos import VASP_DOS
from pdos_overlap.plotting_tools import set_figure_settings
Load DOSCAR file¶
First we will, get the example data, load a DOSCAR file and use it to instantiate a VASP_DOS object.
set_figure_settings('paper')
example_path = get_example_data()
DOSCAR = os.path.join(example_path, 'C2H4/DOSCAR')
PDOS = VASP_DOS(DOSCAR)
Calculate and print band centers¶
This method uses the the site and spin orbital projected density. It sums the spin orbital densities to get energy sub-level band centers.
orbitals = [key for key in PDOS.orbital_dictionary.keys() if 's' in key or 'p' in key]
band_centers = PDOS.get_band_center([0], orbital_list=orbitals\
, max_energy=PDOS.e_fermi, sum_spin=False)
for count, orbital in enumerate(orbitals):
print(orbital + ' band center :' + str(band_centers[count]))
Out:
s+ band center :-17.178867110984445
s- band center :-17.178845887899325
py+ band center :-8.756540885848858
py- band center :-8.756524623910577
pz+ band center :-11.145902800385862
pz- band center :-11.14591890144209
px+ band center :-8.756562549409367
px- band center :-8.756548208350123
Total running time of the script: ( 0 minutes 1.335 seconds)