Unverified Commit 87a70daf authored by Brian Andrews's avatar Brian Andrews Committed by GitHub
Browse files

Add SWM4-NDP water to modeller.addSolvent() (#3760)

* add swm4-ndp water to addSolvent

* add equilibrated box

* typo of water radius

* fixed addSolvent description

* add swm4 to tests
parent 838886ee
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -416,7 +416,7 @@ class Modeller(object): ...@@ -416,7 +416,7 @@ class Modeller(object):
forcefield : ForceField forcefield : ForceField
the ForceField to use for determining van der Waals radii and atomic charges the ForceField to use for determining van der Waals radii and atomic charges
model : str='tip3p' model : str='tip3p'
the water model to use. Supported values are 'tip3p', 'spce', 'tip4pew', and 'tip5p'. the water model to use. Supported values are 'tip3p', 'spce', 'tip4pew', 'tip5p', and 'swm4ndp' (polarizable).
boxSize : Vec3=None boxSize : Vec3=None
the size of the box to fill with water the size of the box to fill with water
boxVectors : tuple of Vec3=None boxVectors : tuple of Vec3=None
...@@ -454,6 +454,8 @@ class Modeller(object): ...@@ -454,6 +454,8 @@ class Modeller(object):
waterRadius = 0.315365*vdwRadiusPerSigma waterRadius = 0.315365*vdwRadiusPerSigma
elif model == 'tip5p': elif model == 'tip5p':
waterRadius = 0.312*vdwRadiusPerSigma waterRadius = 0.312*vdwRadiusPerSigma
elif model == 'swm4ndp':
waterRadius = 0.318395*vdwRadiusPerSigma
else: else:
raise ValueError('Unknown water model: %s' % model) raise ValueError('Unknown water model: %s' % model)
pdb = PDBFile(os.path.join(os.path.dirname(__file__), 'data', model+'.pdb')) pdb = PDBFile(os.path.join(os.path.dirname(__file__), 'data', model+'.pdb'))
......
...@@ -264,7 +264,7 @@ class TestModeller(unittest.TestCase): ...@@ -264,7 +264,7 @@ class TestModeller(unittest.TestCase):
topology_start = self.pdb.topology topology_start = self.pdb.topology
topology_start.setUnitCellDimensions(Vec3(3.5, 3.5, 3.5)*nanometers) topology_start.setUnitCellDimensions(Vec3(3.5, 3.5, 3.5)*nanometers)
for model in ['tip3p', 'spce', 'tip4pew', 'tip5p']: for model in ['tip3p', 'spce', 'tip4pew', 'tip5p', 'swm4ndp']:
forcefield = ForceField('amber10.xml', model + '.xml') forcefield = ForceField('amber10.xml', model + '.xml')
modeller = Modeller(topology_start, self.positions) modeller = Modeller(topology_start, self.positions)
# delete water to get the "before" topology # delete water to get the "before" topology
......
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