Skip to content

Commit 9895455

Browse files
author
Shyue Ping Ong
committed
Fix MatPES settings.
1 parent 8951a47 commit 9895455

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pymatgen/io/vasp/sets.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,10 +1258,11 @@ def __init__(
12581258
super().__init__(structure, MatPESStaticSet.CONFIG, **kwargs)
12591259

12601260
if xc_functional.upper() == "R2SCAN":
1261-
self.user_incar_settings["METAGGA"] = "R2SCAN"
1262-
self.user_incar_settings["ALGO"] = "ALL"
1261+
self._config_dict["INCAR"]["METAGGA"] = "R2SCAN"
1262+
self._config_dict["INCAR"]["ALGO"] = "ALL"
1263+
del self._config_dict["INCAR"]["GGA"]
12631264
elif xc_functional.upper() == "PBE+U":
1264-
self.user_incar_settings["LDAU"] = True
1265+
self._config_dict["INCAR"]["LDAU"] = True
12651266
elif xc_functional.upper() != "PBE":
12661267
raise ValueError(
12671268
f"{xc_functional} is not supported."

tests/io/vasp/test_sets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,7 @@ def test_r2scan(self):
816816
scan = MatPESStaticSet(self.struct, xc_functional="R2SCAN")
817817
incar_scan = scan.incar
818818
assert incar_scan["METAGGA"] == "R2scan"
819+
assert incar_scan.get("GGA") is None
819820
assert incar_scan["ALGO"] == "All"
820821
assert incar_scan.get("LDAU") is None
821822
# test POTCAR files are default PBE_54 PSPs and functional

0 commit comments

Comments
 (0)