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

Revert to Yb_2 on pre-PBE_54 input sets #2972

Merged
merged 12 commits into from
May 6, 2023
Merged

Conversation

janosh
Copy link
Member

@janosh janosh commented May 4, 2023

Follow up to #2969.

Instead of changing from Yb_2 to Yb_3 everywhere, we issue a warning in pre-PBE_54 input sets that Yb_2 will give very bad results for most systems since Yb is usually Yb3+.

Reason: The better fix Yb_3 only became available in the PBE_54 set of PSPs so using it in pre-PBE_54 input sets effectively means you can't run Yb compounds.

Closes #2970 , closes #2971.

@janosh janosh added the fix Bug fix PRs label May 4, 2023
Comment on lines 338 to 346
struct_has_Yb = any(specie.symbol == "Yb" for site in structure for specie in site.species)
uses_Yb_2_psp = self.CONFIG["POTCAR"]["Yb"].lower() == "yb_2"
if struct_has_Yb and uses_Yb_2_psp:
warnings.warn(
"The structure contains Ytterbium (Yb) and this InputSet uses the Yb_2 PSP.\n"
"Yb_2 is known to often give bad results since Yb has oxidation state 3+ in most compounds.\n"
"See https://github.com/materialsproject/pymatgen/issues/2968 for details.",
BadInputSetWarning,
)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shyuep As discussed, I'm reverting the change from Yb_2 to Yb_3 on pre-PBE_54 input sets and issuing a strong warning instead.

@janosh janosh enabled auto-merge (squash) May 5, 2023 20:44
@janosh
Copy link
Member Author

janosh commented May 5, 2023

@jmmshn asked for a new release which I think we're ready for once this is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pytest.raises() as exc_info has no .exception Bug in DictSet.kpoints due to operator precedence
1 participant