diff --git a/tests/conftest.py b/tests/conftest.py index e892965..2f47497 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -11,14 +11,8 @@ from __future__ import annotations import pytest -from pymatgen.core import Lattice, Molecule, Structure from pymatgen.util.testing import PymatgenTest -from matgl.ext.pymatgen import Molecule2Graph, Structure2Graph, get_element_list -from matgl.graph.compute import ( - compute_pair_vector_and_distance, -) - @pytest.fixture(scope="session") def LiFePO4(): diff --git a/tests/test_phonon.py b/tests/test_phonon.py index 0d5d5e3..fd4b24b 100644 --- a/tests/test_phonon.py +++ b/tests/test_phonon.py @@ -1,2 +1,5 @@ +from __future__ import annotations + + def test_PhononCalc(): assert True diff --git a/tests/test_relaxation.py b/tests/test_relaxation.py index 8525b7f..f0465c1 100644 --- a/tests/test_relaxation.py +++ b/tests/test_relaxation.py @@ -1,6 +1,9 @@ -import pytest -import matgl +from __future__ import annotations + +import os +import matgl +import pytest from matgl.ext.ase import M3GNetCalculator from matcalc.relaxation import RelaxCalc @@ -10,7 +13,7 @@ def test_RelaxCalc(LiFePO4): potential = matgl.load_model("M3GNet-MP-2021.2.8-PES") calculator = M3GNetCalculator(potential=potential, stress_weight=0.01) - pcalc = RelaxCalc(calculator) + pcalc = RelaxCalc(calculator, traj_file="lfp_relax.txt") results = pcalc.calc(LiFePO4) assert results["a"] == pytest.approx(4.755711375217371) assert results["b"] == pytest.approx(6.131614236614623) @@ -23,3 +26,4 @@ def test_RelaxCalc(LiFePO4): results = list(pcalc.calc_many([LiFePO4] * 2)) assert len(results) == 2 assert results[-1]["a"] == pytest.approx(4.755711375217371) + os.remove("lfp_relax.txt")