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

BUG: LMAXMIX should be set based on the presence of s, p, d, f electrons not based on Z #364

Closed
Andrew-S-Rosen opened this issue Jun 4, 2023 · 1 comment · Fixed by #362 or #504

Comments

@Andrew-S-Rosen
Copy link
Member

Andrew-S-Rosen commented Jun 4, 2023

Currently, LMAXMIX is set as follows:

# Modify LMAXMIX if you have d or f electrons present. Note that if the user
# explicitly sets LMAXMIX in settings it will override this logic. Previously, this
# was only set if Hubbard U was enabled as per the VASP manual but following an
# investigation it was determined that this would lead to a significant difference
# between SCF -> NonSCF even without Hubbard U enabled. Thanks to Andrew Rosen for
# investigating and reporting.
if "LMAXMIX" not in incar_settings.keys():
# contains f-electrons
if any(el.Z > 56 for el in structure.composition):
incar["LMAXMIX"] = 6
# contains d-electrons
elif any(el.Z > 20 for el in structure.composition):
incar["LMAXMIX"] = 4

However, this is based on Z value and not based on the presence or lack of s, p, d, or f electrons (see VASP manual). For instance, Sr has Z > 20 but does not have d electrons. We should be checking this based on the "block" of the electrons in the Structure object.

@Andrew-S-Rosen
Copy link
Member Author

Closed because @matthewkuner identified that everything is good as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant