Commit 0c68e831 authored by Rafal P. Wiewiora's avatar Rafal P. Wiewiora
Browse files

check charges in test

parent 4aa8df6d
...@@ -562,8 +562,12 @@ class TestForceField(unittest.TestCase): ...@@ -562,8 +562,12 @@ class TestForceField(unittest.TestCase):
pdb = PDBFile(StringIO(pdb_string)) pdb = PDBFile(StringIO(pdb_string))
self.assertRaises(Exception, lambda: ff.createSystem(pdb.topology)) self.assertRaises(Exception, lambda: ff.createSystem(pdb.topology))
ff.createSystem(pdb.topology, residueTemplates={list(pdb.topology.residues())[0] : 'FE2'}) sys = ff.createSystem(pdb.topology, residueTemplates={list(pdb.topology.residues())[0] : 'FE2'})
ff.createSystem(pdb.topology, residueTemplates={list(pdb.topology.residues())[0] : 'FE'}) # confirm charge
self.assertEqual(sys.getForce(0).getParticleParameters(0)[0]._value, 2.0)
sys = ff.createSystem(pdb.topology, residueTemplates={list(pdb.topology.residues())[0] : 'FE'})
# confirm charge
self.assertEqual(sys.getForce(0).getParticleParameters(0)[0]._value, 3.0)
def test_ResidueOverloading(self): def test_ResidueOverloading(self):
"""Test residue overloading via overload tag in the XML""" """Test residue overloading via overload tag in the XML"""
......
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