Skip to content

Commit

Permalink
leave user-defined ALGO if set, always apply LADU if xc_functional.up…
Browse files Browse the repository at this point in the history
…per().endswith("+U") and restore removing GGA tag if xc_functional.upper() == "R2SCAN"
  • Loading branch information
janosh committed Aug 31, 2023
1 parent aeebf00 commit bfd9476
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pymatgen/io/vasp/sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1249,8 +1249,9 @@ def __init__(

if xc_functional.upper() == "R2SCAN":
self.user_incar_settings["METAGGA"] = "R2SCAN"
self.user_incar_settings["ALGO"] = "ALL"
elif xc_functional.upper() == "PBE+U":
self.user_incar_settings.setdefault("ALGO", "ALL") # leave user-defined ALGO if set
self.user_incar_settings.pop("GGA", None)
if xc_functional.upper().endswith("+U"):
self.user_incar_settings["LDAU"] = True
if user_potcar_functional.upper() != "PBE_54":
warnings.warn(
Expand Down

0 comments on commit bfd9476

Please sign in to comment.