Skip to content

Commit

Permalink
Merge branch 'spin' of https://github.com/pxlxingliang/dpdata into spin
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Nov 25, 2024
2 parents 8c0fede + 8bd1f99 commit 28a758c
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 28a758c

Please sign in to comment.