Skip to content

Commit

Permalink
pre-commit auto-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Aug 30, 2023
1 parent 1cc3940 commit a3ebf16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/core/test_structure.py
Expand Up @@ -1570,15 +1570,15 @@ def test_calculate_m3gnet(self):
# Check the errors of predicted energy, forces and stress to be within
# 0.1 eV/atom, 0.2 eV/Å, and 2 GPa.
# The reference values here are predicted by M3GNet-MP-2021.2.8-DIRECT-PES in matgl.
assert calculator.results["energy"]/self.get_structure("Si").num_sites == approx(-5.4146976, abs=0.1)
assert calculator.results["energy"] / self.get_structure("Si").num_sites == approx(-5.4146976, abs=0.1)
assert np.linalg.norm(calculator.results["forces"]) == approx(7.8123485e-06, abs=0.2)
assert np.linalg.norm(calculator.results["stress"]) == approx(1.7861567, abs=2)

def test_relax_m3gnet(self):
pytest.importorskip("matgl")
struct = self.get_structure("Si")
relaxed = struct.relax()
assert relaxed.lattice.a == approx(3.867626620642243, abs=0.039) # 1% error
assert relaxed.lattice.a == approx(3.867626620642243, abs=0.039) # 1% error
assert hasattr(relaxed, "calc")
assert relaxed.dynamics == {"type": "optimization", "optimizer": "FIRE"}

Expand Down
1 change: 0 additions & 1 deletion tests/io/vasp/test_sets.py
Expand Up @@ -738,7 +738,6 @@ def setUp(self):
self.struct = Structure.from_file(f"{TEST_FILES_DIR}/POSCAR")
self.prev_incar = Incar.from_file(f"{TEST_FILES_DIR}/INCAR")


def test_init_default(self):
default = MatPESStaticSet(self.struct)
incar = default.incar
Expand Down

0 comments on commit a3ebf16

Please sign in to comment.