Skip to content

Commit

Permalink
Update test_lammps_md.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen authored Dec 9, 2023
1 parent 9c40173 commit 409b706
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/test_lammps_md.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ def test_lammps_md_nvt_all(self):
seed=4928459,
dist="gaussian",
lmp=None,
quantities=("positions", "cell", "forces", "temperature", "energy_pot", "energy_tot", "pressure"),
quantities=("positions", "cell", "forces", "temperature", "energy_pot", "energy_tot", "pressure", "velocities"),
)
self.assertEqual(result_dict["positions"].shape, (10, 32, 3))
self.assertEqual(result_dict["velocities"].shape, (10, 32, 3))
self.assertEqual(result_dict["cell"].shape, (10, 3, 3))
self.assertEqual(result_dict["forces"].shape, (10, 32, 3))
self.assertEqual(result_dict["temperature"].shape, (10, ))
Expand Down Expand Up @@ -94,9 +95,10 @@ def test_lammps_md_npt_all(self):
seed=4928459,
dist="gaussian",
lmp=None,
quantities=("positions", "cell", "forces", "temperature", "energy_pot", "energy_tot", "pressure"),
quantities=("positions", "cell", "forces", "temperature", "energy_pot", "energy_tot", "pressure", "velocities"),
)
self.assertEqual(result_dict["positions"].shape, (10, 32, 3))
self.assertEqual(result_dict["velocities"].shape, (10, 32, 3))
self.assertEqual(result_dict["cell"].shape, (10, 3, 3))
self.assertEqual(result_dict["forces"].shape, (10, 32, 3))
self.assertEqual(result_dict["temperature"].shape, (10, ))
Expand Down Expand Up @@ -125,14 +127,15 @@ def test_lammps_md_nph_all(self):
seed=4928459,
dist="gaussian",
lmp=None,
quantities=("positions", "cell", "forces", "temperature", "energy_pot", "energy_tot", "pressure"),
quantities=("positions", "cell", "forces", "temperature", "energy_pot", "energy_tot", "pressure", "velocities"),
)
self.assertEqual(result_dict["positions"].shape, (10, 32, 3))
self.assertEqual(result_dict["velocities"].shape, (10, 32, 3))
self.assertEqual(result_dict["cell"].shape, (10, 3, 3))
self.assertEqual(result_dict["forces"].shape, (10, 32, 3))
self.assertEqual(result_dict["temperature"].shape, (10, ))
self.assertEqual(result_dict["energy_pot"].shape, (10, ))
self.assertEqual(result_dict["energy_tot"].shape, (10, ))
self.assertEqual(result_dict["pressure"].shape, (10, 3, 3))
self.assertTrue(result_dict["temperature"][-1] > 90)
self.assertTrue(result_dict["temperature"][-1] < 110)
self.assertTrue(result_dict["temperature"][-1] < 110)

0 comments on commit 409b706

Please sign in to comment.