Skip to content

Revert to Yb_2 on pre-PBE_54 input sets#2972

Merged
janosh merged 12 commits into
masterfrom
revert-to-yb2-on-pre-pbe54
May 6, 2023
Merged

Revert to Yb_2 on pre-PBE_54 input sets#2972
janosh merged 12 commits into
masterfrom
revert-to-yb2-on-pre-pbe54

Conversation

@janosh

@janosh janosh commented May 4, 2023

Copy link
Copy Markdown
Member

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 thread pymatgen/io/vasp/sets.py
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
Copy Markdown
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

janosh commented May 5, 2023

Copy link
Copy Markdown
Member Author

@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