Skip to content

Commit

Permalink
add check on get_force
Browse files Browse the repository at this point in the history
  • Loading branch information
samwaseda committed Jan 10, 2022
1 parent 11b4112 commit 40ddc60
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_metadynamics_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ def test_B(self):
0.999
)

def test_B(self):
x = np.random.random() * self.lammps.structure.cell[tuple(2 * [self.meta.input.axis])]
dx = x * 0.1
x *= 0.9
self.meta.update_s(x)
self.assertGreater(self.meta.get_force(x + dx), 0)
self.assertLess(self.meta.get_force(x - dx), 0)


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

0 comments on commit 40ddc60

Please sign in to comment.