Commit 1d3804df authored by Andreas Krämer's avatar Andreas Krämer
Browse files

fixes for python2 and forcefield class

parent 4c9bb3de
......@@ -2439,7 +2439,7 @@ class LennardJonesGenerator(object):
for atom in data.atoms:
self.force.addParticle((typeToMergedType[data.atomType[atom]],))
self.force.setUseLongRangeCorrection(True)
self.force.setUseLongRangeCorrection(bool(args.get('useLongRangeCorrection', False)))
self.force.setCutoffDistance(nonbondedCutoff)
sys.addForce(self.force)
......
......@@ -285,13 +285,13 @@ class TestCharmmFiles(unittest.TestCase):
for residue in psf.topology.residues():
atoms = [atom.name for atom in residue.atoms()]
if residue.name == "M14":
self.assertCountEqual(m14, atoms)
self.assertEqual(sorted(m14), sorted(atoms))
elif residue.name == "TIP3":
self.assertCountEqual(tip3, atoms)
self.assertEqual(sorted(tip3), sorted(atoms))
elif residue.name == "POT":
self.assertCountEqual(pot, atoms)
self.assertEqual(sorted(pot), sorted(atoms))
elif residue.name == "CLA":
self.assertCountEqual(cla, atoms)
self.assertEqual(sorted(cla), sorted(atoms))
else:
self.assertTrue(False)
......
CRYST1 12.009 12.338 11.510 90.00 90.00 90.00 P 1
ATOM 1 SOD SOD I 1 -5.844 1.432 3.239 1.00 0.00 ION NA
ATOM 2 CLA CLA I 2 -5.605 -3.153 1.213 1.00 0.00 ION CL
ATOM 2 CLA CLA I 2 -5.605 -1.153 1.213 1.00 0.00 ION CL
END
\ No newline at end of file
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