-
Notifications
You must be signed in to change notification settings - Fork 876
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
[Breaking] Fix valence electron configuration parsing for PotcarSingle.electron_configuration
#4278
base: master
Are you sure you want to change the base?
[Breaking] Fix valence electron configuration parsing for PotcarSingle.electron_configuration
#4278
Conversation
5efb71d
to
c735cca
Compare
bdea380
to
cd92872
Compare
PotcarSingle.electron_configuration
PotcarSingle.electron_configuration
I have a feeling that we might need to rewrite the For example for the pymatgen/tests/io/vasp/test_inputs.py Line 1386 in 5b997f7
Can you please give me some advice on this? @rkingsbury Thanks in advance |
@DanielYang59 I also defines a cutoff for an occupied orbital which might help for non-integer cases |
Hi @JaGeo good day and thanks for the comment
Beautiful! Looks like the
I guess no code is perfectly written without repeated refactor? :) Line 18 in 5b997f7
|
@DanielYang59 yes, it would be great if you take over and make this code a method for the potcar. Then, I can adapt the developer code. |
Great! I guess we could either:
Which do you suggest? I might personally prefer the former now that its already giving the wrong results so I would consider this a fix?
I'm not really aware of non-integer occupancies from POTCARs, can you perhaps point me to some such POTCARs such that I could put more thinking on them? |
@DanielYang59 i also think it should be the former as it currently is implemented wrong in my opinion. Li, Be, maybe? Some have 0.01 occupancy, I think. If you have some potcars available, you can use the dev script to spot them. |
Cool I would just replace for now but should be easy to switch anytime
Thanks I would have a look, I thought it's H.* (H.25, H.35, ...) |
PotcarSingle.electron_configuration
PotcarSingle.electron_configuration
total_electrons = 0.0 | ||
|
||
for n, subshell, occ in reversed(all_config): | ||
if occ >= 0.01: # TODO: hard-coded occupancy cutoff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO tag: hard-coded cutoff
PotcarSingle.electron_configuration
PotcarSingle.electron_configuration
Summary
PotcarSingle.electron_configuration
, to fix Possibly incorrect electron_configuration returned by vasp.inputs.PotcarSingle #4269Element
/Species
: orderfull_electron_structure
by energy #3944