Skip to content

Commit

Permalink
add ut
Browse files Browse the repository at this point in the history
  • Loading branch information
iProzd committed Jun 6, 2024
1 parent c58a87f commit 172f54d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/test_deepmd_mixed.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,5 +314,29 @@ def test_str(self):
)


class TestMixedSingleSystemsDump(
unittest.TestCase, CompLabeledSys, IsNoPBC
):
def setUp(self):
self.places = 6
self.e_places = 6
self.f_places = 6
self.v_places = 6

# C1H4
self.system_1 = dpdata.LabeledSystem(
"gaussian/methane.gaussianlog", fmt="gaussian/log"
)
self.system_2 = dpdata.LabeledSystem(
"gaussian/methane.gaussianlog", fmt="gaussian/log"
)
# test dump
self.system_1.to('deepmd/npy/mixed', "tmp.deepmd.mixed.single")

def tearDown(self):
if os.path.exists("tmp.deepmd.mixed.single"):
shutil.rmtree("tmp.deepmd.mixed.single")


if __name__ == "__main__":
unittest.main()

0 comments on commit 172f54d

Please sign in to comment.