"platforms/opencl/tests/TestOpenCLCustomCVForce.cpp" did not exist on "35be4eb200b74390c3878b762c2272e2315dff24"
Commit e585fb6e authored by Jason Swails's avatar Jason Swails
Browse files

Add a simple test for CustomIntegrator.

parent 8f1a60d4
...@@ -1201,5 +1201,16 @@ class TestAPIUnits(unittest.TestCase): ...@@ -1201,5 +1201,16 @@ class TestAPIUnits(unittest.TestCase):
integrator.setStepSize(0.0005) integrator.setStepSize(0.0005)
self.assertEqual(integrator.getStepSize(), 0.0005*picosecond) self.assertEqual(integrator.getStepSize(), 0.0005*picosecond)
def testCustomIntegrator(self):
""" Tests the CustomIntegrator API features """
integrator = CustomIntegrator(1.0)
self.assertEqual(integrator.getStepSize(), 1.0*picosecond)
self.assertEqual(integrator.getConstraintTolerance(), 1e-5)
integrator.setConstraintTolerance(1e-6)
self.assertEqual(integrator.getConstraintTolerance(), 1e-6)
integrator = CustomIntegrator(1.0*femtoseconds)
self.assertEqual(integrator.getStepSize(), 1.0*femtoseconds)
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment