Commit 501fcca4 authored by Jeff Wagner's avatar Jeff Wagner
Browse files

Add test that SA energy=0 when gbsaModel is None

parent 74ef3fee
......@@ -127,6 +127,14 @@ class TestAmberPrmtopFile(unittest.TestCase):
self.assertTrue(found_matching_solvent_dielectric and
found_matching_solute_dielectric)
def test_ImplicitSolventZeroSA(self):
"""Test that requesting gbsaModel=None yields a surface area energy of 0 when
prmtop.createSystem produces a GBSAOBCForce"""
system = prmtop2.createSystem(implicitSolvent=OBC2, gbsaModel=None)
for force in system.getForces():
if isinstance(force, GBSAOBCForce):
self.assertEqual(force.getSurfaceAreaEnergy(), 0*kilojoule/(nanometer**2*mole))
def test_HydrogenMass(self):
"""Test that altering the mass of hydrogens works correctly."""
......@@ -375,6 +383,7 @@ class TestAmberPrmtopFile(unittest.TestCase):
# Now make sure that out-of-range parameters *do* raise
self.assertRaises(ValueError, lambda: f.addParticle([0, 0.9, 0.5]))
self.assertRaises(ValueError, lambda: f.addParticle([0, 0.21, 0.5]))
if __name__ == '__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