Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add BSDOS plotter #532

Merged
merged 9 commits into from
Dec 15, 2016
Merged

add BSDOS plotter #532

merged 9 commits into from
Dec 15, 2016

Conversation

computron
Copy link
Member

Summary

A new band structure plotter that puts band structure and DOS on the same plot, aligned.

  • Band structures include spin polarization
  • Element projections on band structures supported
  • Element and orbital projections on DOS supported
  • Code is relatively straightforward to use, understand and modify as needed

Additional dependencies introduced (if any)

None

TODO (if any)

Things that could be done:

  • support element projections for band structures with 4 or more elements (only 3 of those elements would actually be projected, the remaining elements ignored)
  • support element+orbital projections for band structures

Example images

example1

example2

@computron
Copy link
Member Author

I changed the fontsizes slightly and made them tunable, now it (by default) looks like this:

example2_revised

@albalu
Copy link
Contributor

albalu commented Dec 14, 2016

@computron, requests:

  1. as a user I'd prefer to set emin and emax directly rather than setting cb_energy_range; sometimes I want to compare plots of 2-4 materials (e.g. doped or substituted) at a fixed emin, emax range. If I am dealing with one plot, I can always calculate the band gap myself and plot again with emin, emax that make the plot look better.

  2. It would be nice to have dos_xmax as an argument with a default of None, sometimes, I just want to focus on the band edges. Or for supercells, automatic dos_xmax is too large.

@computron
Copy link
Member Author

  1. The auto emax is nicer if you just want to auto-plot things without having to manually figure out different parameters for different materials. i.e., to get a nice looking plot without the user needing to input any parameters at all into BSDOSPlotter. For your use case, you can just subtract the band gap from the value you put in cb_energy_range if you really want the same energy axis for multiple plots.

  2. Why not just set your energy limits to focus on the band edges in that case instead of having a DOS plot that overruns its x-axis for certain energies? the latter will be ugly IMO. I would just set vb_energy_range to 1 eV and cb_energy_range to 1 eV, for example. Note the DOS x-limit is auto scaled for the energy range you put in, so even if there is a high DOS outside the energy range, it won't affect your scaling for your target energy range and you should have a nice looking plot

@computron
Copy link
Member Author

Actually for #1 I realized that you want to retain the same BSDOSPlotter object for all these w/o redoing the settings. OK I will add an option to turn off the gap addition

@albalu
Copy link
Contributor

albalu commented Dec 14, 2016

thank you!

@shyuep shyuep merged commit 000e411 into master Dec 15, 2016
@shyuep
Copy link
Member

shyuep commented Dec 15, 2016

Re xlim, I would say that we shouldn't pollute the code with too many options. Just return a pyplot object and the user can then set xlim or ylim or whatever else themselves.

@computron computron deleted the bsdos_plot branch December 20, 2016 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants