Skip to content

Commit

Permalink
MatPESStaticSet.yaml set LMAXMIX: 6 (#3400)
Browse files Browse the repository at this point in the history
* MatPESStaticSet.yaml set LMAXMIX: 6

* test LMAXMIX in TestMatPESStaticSet.test_default
  • Loading branch information
janosh committed Oct 11, 2023
1 parent 92d00cd commit 38db1dd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions pymatgen/io/vasp/MatPESStaticSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ INCAR:
PREC: Accurate
SIGMA: 0.05 # change from 0.02 to 0.05, included to have some reasonable default
LDAU: false
LMAXMIX: 6
LDAUJ:
F:
Co: 0
Expand Down
25 changes: 13 additions & 12 deletions tests/io/vasp/test_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ class TestSetChangeCheck(PymatgenTest):
def test_sets_changed(self):
msg = (
"WARNING! These tests will fail when you change an input set. They are included "
"as a sanity check: if you want to change an input set, please make sure to "
"as a sanity check. When changing an input set, please make sure to "
"notify the users for that set. For sets starting with 'MVL' this is @shyuep, for "
"sets starting with 'MP' this is @shyuep and @mkhorton. "
"sets starting with 'MP' this is @shyuep and @mkhorton. For sets starting with 'MatPES' "
"this is @shyuep and @janosh."
)

input_sets = glob(f"{MODULE_DIR}/*.yaml")
Expand All @@ -110,22 +111,21 @@ def test_sets_changed(self):
hashes[name] = hashlib.sha1(text).hexdigest()

known_hashes = {
"MatPESStaticSet.yaml": "8789f974913c935f21ff2fbffc0502714ca39470",
"MITRelaxSet.yaml": "1a0970f8cad9417ec810f7ab349dc854eaa67010",
"MPAbsorptionSet.yaml": "5931e1cb3cf8ba809b3d4f4a5960d728c682adf1",
"MPHSERelaxSet.yaml": "0d0d96a620461071cfd416ec9d5d6a8d2dfd0855",
"MPRelaxSet.yaml": "f2949cdc5dc8cd0bee6d39a5df0d6a6b7c144821",
"MPSCANRelaxSet.yaml": "2d31ee637cb5d4d96f2e0aba3772a52cbcceb348",
"MVLGWSet.yaml": "104ae93c3b3be19a13b0ee46ebdd0f40ceb96597",
"MVLRelax52Set.yaml": "4cfc6b1bd0548e45da3bde4a9c65b3249da13ecd",
"MPHSERelaxSet.yaml": "0d0d96a620461071cfd416ec9d5d6a8d2dfd0855",
"PBE54Base.yaml": "ec317781a7f344beb54c17a228db790c0eb49282",
"VASPIncarBase.yaml": "19762515f8deefb970f2968fca48a0d67f7964d4",
"MPSCANRelaxSet.yaml": "2d31ee637cb5d4d96f2e0aba3772a52cbcceb348",
"MPRelaxSet.yaml": "f2949cdc5dc8cd0bee6d39a5df0d6a6b7c144821",
"MITRelaxSet.yaml": "1a0970f8cad9417ec810f7ab349dc854eaa67010",
"vdW_parameters.yaml": "04bb09bb563d159565bcceac6a11e8bdf0152b79",
"MPAbsorptionSet.yaml": "5931e1cb3cf8ba809b3d4f4a5960d728c682adf1",
"MatPESStaticSet.yaml": "3a7cfef8143dbe32d3856c6945eb9ac9bd8b85c6",
"PBE54Base.yaml": "ec317781a7f344beb54c17a228db790c0eb49282",
}

assert hashes == known_hashes, msg
for input_set in hashes:
assert hashes[input_set] == known_hashes[input_set], msg
assert hashes[input_set] == known_hashes[input_set], f"{input_set} got {hashes[input_set]}\n\n{msg}"


class TestDictSet(PymatgenTest):
Expand Down Expand Up @@ -775,6 +775,7 @@ def test_default(self):
assert incar["NSW"] == 0
assert incar["PREC"] == "Accurate"
assert incar["SIGMA"] == 0.05
assert incar["LMAXMIX"] == 6
# test POTCAR files are default PBE_54 PSPs and functional
assert input_set.potcar_symbols == ["Fe_pv", "P", "O"]
assert input_set.potcar.functional == "PBE_54"
Expand All @@ -785,7 +786,7 @@ def test_default(self):
def test_with_prev_incar(self):
default_prev = MatPESStaticSet(structure=self.struct, prev_incar=self.prev_incar)
incar = default_prev.incar
# test if prev_incar is used.
# check that prev_incar is used.
assert incar["NPAR"] == 8
assert incar["LMAXMIX"] == 4
# test some incar parameters from prev_incar are not inherited
Expand Down

0 comments on commit 38db1dd

Please sign in to comment.