-
Notifications
You must be signed in to change notification settings - Fork 875
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
Minor update to make FermiDos
more robust
#4240
Minor update to make FermiDos
more robust
#4240
Conversation
db71bbe
to
d1f986d
Compare
Thanks. Can you add a unittest for the functionality pls? |
Done! Didn't add one at first as it should be a relatively rare case where this actually matters (e.g. Dirac cone systems or toy test cases), but added now! |
Are you sure they're unrelated? I see e.g.
Thanks for the PR! |
@mkhorton ah yes sorry! I just looked at one failing test and it seemed to be something different. I've fixed that one now, and it's a nice validation as it now gives a |
…' into minor_FermiDos_robustness_update
This is a minor fix to the
get_doping
method inFermiDos
to make it a little more robust, so that it can handle rare cases where there is only either 0 or 1 energy increments between the VBM and CBM indices (e.g. Dirac cone systems or toy test cases). This is done by starting the CB integral (for electron concentrations) from either the mid-gap index or, if mid-gap index is the VBM, from VBM+1 (= CBM index), and vice versa for the VB integral for hole concentrations.