Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 25, 2024
1 parent 83769e9 commit 8bd1f99
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/test_abacus_spin.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_scf(self):
np.testing.assert_almost_equal(
data["force_mags"], sys2.data["force_mags"], decimal=8
)

def test_scf_nspin2(self):
os.system("cp abacus.spin/INPUT.scf.nspin2 abacus.spin/INPUT")
mysys = dpdata.LabeledSystem("abacus.spin", fmt="abacus/scf")
Expand All @@ -60,16 +60,16 @@ def test_scf_nspin2(self):
np.testing.assert_almost_equal(
data["spins"][0],
[
[0,0,2.4000001004],
[0,0,2.3999994597],
[0, 0, 2.4000001004],
[0, 0, 2.3999994597],
],
decimal=8,
)
np.testing.assert_almost_equal(
data["force_mags"][0],
[
[0,0, -0.3669618965],
[0,0, -0.3669821632],
[0, 0, -0.3669618965],
[0, 0, -0.3669821632],
],
decimal=8,
)
Expand All @@ -85,7 +85,6 @@ def test_scf_nspin2(self):
data["force_mags"], sys2.data["force_mags"], decimal=8
)


def test_relax(self):
os.system("cp abacus.spin/INPUT.relax abacus.spin/INPUT")
mysys = dpdata.LabeledSystem("abacus.spin", fmt="abacus/relax")
Expand Down

0 comments on commit 8bd1f99

Please sign in to comment.