SMTG-Bham / sumo

Heavyweight plotting tools for ab initio calculations
https://smtg-bham.github.io/sumo/
MIT License
192 stars 77 forks source link

bandstructure projected to a single/few dopant atoms #178

Open alpinnovianus opened 2 years ago

alpinnovianus commented 2 years ago

In DOS plots, we can select the specific atoms to project, so we can know the DOS contributions from dopants.

In bandstructure plots, can we do the same to the bands projection? i.e. having a spaghetti plot where the valence/conduction band are projected with respect to contribution from a dopant atom.

essentially, i want --atoms option in dosplot to be also available in bandplot to plot the band projection (not the dos). I think this can be especially useful in doping studies, where the dopant affects only a few bands near fermi energy.

ajjackson commented 2 years ago

Hmm, there is an --atoms option already in bandplot but it does something slightly different.

For a dilute dopant I don't think you will get a useful spaghetti plot; this requires band-unfolding. Perhaps easyunfold will be a better match for this problem; it does seem to support this kind of atom selection https://smtg-ucl.github.io/easyunfold/example_mgo/

For Sumo, I think this unfortunately falls into the wider problem of "how to allow absolutely any combination of atoms/orbitals/spins to be selected". We already have a lot of options and syntax and still many cases like this fall through the cracks. There are ideas about how to solve the problem but they will need a bit of development time.

bfield1 commented 2 months ago

I want to say that I also want this feature, and it is more useful than just for dopants or impurities. Projecting bands onto specific atoms is standard practice when looking at edge/surface states in ribbon/slab calculations.

I appreciate that figuring out clean syntax for specifying increasingly-complex combinations is a tricky problem. But even if such a feature is not included in the CLI, having it in the scripting API would still be valuable. (In the mean-time, I'll just keep writing my own hacks.)

ajjackson commented 2 months ago

Noted! Providing a better scripting API is also something that would be good to do.