Skip to content

Projected density of states for a list of sites #3841

Answered by fraricci
wladerer asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there!

I think currently there is not a function to sum doses over specific sites (contrarily to the projected bands).
I came up with this trick that allows to make use of the get_element_dos() and get_element_spd_dos().
The idea is to convert all the sites you are interested into fake sites that have the same element.

Here is the code that should do that:

from pymatgen.core.sites import PeriodicSite
vrun = Vasprun('./gaas/vasprun.xml',parse_projected_eigen=True)
cdos = vrun.complete_dos
sites_selected = cdos.structure.sites[:16]

for site in sites_selected:
    fake_site = PeriodicSite("H",site.frac_coords,site.lattice)
    cdos.pdos[fake_site] = cdos.pdos.pop(site) #or add this addit…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wladerer
Comment options

Answer selected by wladerer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants