Hi, I’m wondering if you can create a site and/or element projected band structure and DOS using vasp and BoltsTrap/BoltsTrap2. The code below is close but only the DOS is projected not the BS.
vrun = Vasprun('../vasprun.xml',parse_projected_eigen=True)
data = VasprunBSLoader.from_file('../vasprun.xml')
bztInterp = BztInterpolator(data,lpfac=10,energy_range=5.0,curvature=True)
# define the path as a list
kpaths = [['X','G','M']]
# set the fractional coordinates of the kpoint as a dict
kp_lbl = {'X': np.array([0.5, 0.0, 0.0]),
'G': np.array([0.0, 0.0, 0.0]),
'M': np.array([0.5, 0.5, 0.5])
}
sbs = bztInterp.get_band_structure(kpaths,kp_lbl)
tot_proj_dos = bztInterp.get_dos(partial_dos=True)
bsdos = BSDOSPlotter(bs_projection="elements",
dos_projection="elements",
vb_energy_range=4,
cb_energy_range=6,
egrid_interval=2)
plt = bsdos.get_plot(sbs,dos=tot_proj_dos)
plt.show()