Skip to content

Commit

Permalink
fix TestMatPESStaticSet failing due to missing tests/files/POT_PAW_PB…
Browse files Browse the repository at this point in the history
…E_64
  • Loading branch information
janosh committed Nov 28, 2023
1 parent 3a58824 commit 816cd3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
7 changes: 0 additions & 7 deletions tests/io/vasp/test_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,19 +1042,12 @@ def test_bad_value(self):

def test_functional_types(self):
assert self.psingle_Mn_pv.functional == "PBE"

assert self.psingle_Mn_pv.functional_class == "GGA"

assert self.psingle_Mn_pv.potential_type == "PAW"

psingle = PotcarSingle.from_file(f"{TEST_FILES_DIR}/POT_LDA_PAW/POTCAR.Fe.gz")

assert psingle.functional == "Perdew-Zunger81"

assert psingle.functional_class == "LDA"

assert psingle.potential_type == "PAW"

assert self.psingle_Mn_pv.symbol == "Mn_pv"

def test_is_valid(self):
Expand Down
16 changes: 9 additions & 7 deletions tests/io/vasp/test_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,12 +775,14 @@ def test_default(self):
assert incar["PREC"] == "Accurate"
assert incar["SIGMA"] == 0.05
assert incar["LMAXMIX"] == 6
# test POTCAR files are default PBE_64 PSPs and functional
assert input_set.potcar_symbols == ["Fe_pv", "P", "O"]
assert input_set.potcar.functional == "PBE_64"
assert input_set.potcar_symbols == ["Fe_pv", "P", "O"]
assert input_set.potcar_functional == "PBE_64"
assert input_set.kpoints is None

assert str(input_set.potcar[0]) == str(PotcarSingle.from_symbol_and_functional("Fe_pv", "PBE_64"))
# test POTCAR files are default PBE_64 PSPs and functional
# only runs if POTCAR files to compare against are available
if os.path.isdir(f"{TEST_FILES_DIR}/POT_GGA_PAW_PBE_64"):
assert str(input_set.potcar[0]) == str(PotcarSingle.from_symbol_and_functional("Fe_pv", "PBE_64"))

def test_with_prev_incar(self):
default_prev = MatPESStaticSet(structure=self.struct, prev_incar=self.prev_incar)
Expand Down Expand Up @@ -814,7 +816,7 @@ def test_with_prev_incar(self):
assert incar["SIGMA"] == 0.05
# test POTCAR files are default PBE_64 PSPs and functional
assert default_prev.potcar_symbols == ["Fe_pv", "P", "O"]
assert default_prev.potcar.functional == "PBE_64"
assert default_prev.potcar_functional == "PBE_64"
assert default_prev.kpoints is None

def test_r2scan(self):
Expand All @@ -826,7 +828,7 @@ def test_r2scan(self):
assert incar_scan.get("LDAU") is None
# test POTCAR files are default PBE_64 PSPs and functional
assert scan.potcar_symbols == ["Fe_pv", "P", "O"]
assert scan.potcar.functional == "PBE_64"
assert scan.potcar_functional == "PBE_64"
assert scan.kpoints is None

def test_default_u(self):
Expand All @@ -838,7 +840,7 @@ def test_default_u(self):
# test POTCAR files are default PBE_64 PSPs and functional
assert incar_u["LDAUU"] == [5.3, 0, 0]
assert default_u.potcar_symbols == ["Fe_pv", "P", "O"]
assert default_u.potcar.functional == "PBE_64"
assert default_u.potcar_functional == "PBE_64"
assert default_u.kpoints is None

def test_functionals(self):
Expand Down

0 comments on commit 816cd3a

Please sign in to comment.