Skip to content
Snippets Groups Projects
Commit c7402004 authored by Artem Pulkin's avatar Artem Pulkin
Browse files

tests: fix warnings

parent c78e254a
No related branches found
No related tags found
No related merge requests found
Pipeline #81820 passed
......@@ -174,7 +174,6 @@ class MoleculeTests(UpdateTestMixin, TestCase):
times = np.full(4, self.t / 8)
timestamps = np.cumsum(times) + self.t0
p, snapshots = dyn.nvt_vs(self.dyn, 0, times, 1, snapshots=True, rtol=1e-8)
# self.dyn.sample = self.dyn.pack_cell(*util.split2(self.dyn.x0_dynamic))
for i_i, (i, t_expected) in enumerate(zip(snapshots, timestamps)):
d = i.cartesian[1, 0] - i.cartesian[0, 0] - 1
f1 = .5 ** ((i_i + 1) / 2)
......@@ -596,7 +595,7 @@ def test_pr_free_dynamics_vecs():
masses_v=np.ones_like(cell.vectors),
v0_v=np.full_like(cell.vectors, v),
)
p, snapshots = dyn.integrate(dynamics, 10, snapshots=True, tol=1e-10)
p, snapshots = dyn.integrate(dynamics, 10, snapshots=True)
for i in snapshots:
testing.assert_allclose(i.vectors, cell.vectors + v * i.meta["time"])
testing.assert_allclose(i.coordinates, cell.coordinates)
......@@ -620,6 +619,6 @@ def test_pr_free_dynamics_coords():
masses_v=np.ones_like(cell.vectors),
v0=np.array([[v, 0, 0]]),
)
p, result = dyn.integrate(dynamics, 10, snapshots=True, tol=1e-10)
p, result = dyn.integrate(dynamics, 10, snapshots=True)
for i in result:
testing.assert_allclose(i.meta["ek"].sum() + i.meta["_ek-vectors"].sum(), v ** 2 / 2, rtol=1e-5)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment