Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
8190f59a
Commit
8190f59a
authored
Jan 02, 2016
by
John Chodera (MSKCC)
Browse files
Fix issue with simple ffxml StringIO in TestForceField.
parent
92cde5ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
17 deletions
+16
-17
wrappers/python/tests/TestForceField.py
wrappers/python/tests/TestForceField.py
+16
-17
No files found.
wrappers/python/tests/TestForceField.py
View file @
8190f59a
...
...
@@ -293,22 +293,21 @@ class TestForceField(unittest.TestCase):
# Define forcefield parameters used by simpleTemplateGenerator.
# NOTE: This parameter definition file will currently only work for residues that either have
# no external bonds or external bonds to other residues parameterized by the simpleTemplateGenerator.
simple_ffxml_contents
=
"""
\
simple_ffxml_contents
=
"""
<ForceField>
<AtomTypes>
<Type name="XXX" class="XXX" element="C" mass="12"/>
</AtomTypes>
<HarmonicBondForce>
<Bond type1="XXX" type2="XXX" length="0.1409" k="392459.2"/>
</HarmonicBondForce>
<HarmonicAngleForce>
<Angle type1="XXX" type2="XXX" type3="XXX" angle="2.09439510239" k="527.184"/>
</HarmonicAngleForce>
<NonbondedForce coulomb14scale="0.833333" lj14scale="0.5">
<Atom type="XXX" charge="0.000" sigma="0.315" epsilon="0.635"/>
</NonbondedForce>
<AtomTypes>
<Type name="XXX" class="XXX" element="C" mass="12
.0
"/>
</AtomTypes>
<HarmonicBondForce>
<Bond type1="XXX" type2="XXX" length="0.1409" k="392459.2"/>
</HarmonicBondForce>
<HarmonicAngleForce>
<Angle type1="XXX" type2="XXX" type3="XXX" angle="2.09439510239" k="527.184"/>
</HarmonicAngleForce>
<NonbondedForce coulomb14scale="0.833333" lj14scale="0.5">
<Atom type="XXX" charge="0.000" sigma="0.315" epsilon="0.635"/>
</NonbondedForce>
</ForceField>"""
simple_ffxml
=
StringIO
(
simple_ffxml_contents
)
#
# Test where we generate parameters for only a ligand.
...
...
@@ -317,7 +316,7 @@ class TestForceField(unittest.TestCase):
# Load the PDB file.
pdb
=
PDBFile
(
os
.
path
.
join
(
'systems'
,
'T4-lysozyme-L99A-p-xylene-implicit.pdb'
))
# Create a ForceField object.
forcefield
=
ForceField
(
'amber99sb.xml'
,
'tip3p.xml'
,
simple_ffxml
)
forcefield
=
ForceField
(
'amber99sb.xml'
,
'tip3p.xml'
,
StringIO
(
simple_ffxml
_contents
)
)
# Add the residue template generator.
forcefield
.
registerTemplateGenerator
(
simpleTemplateGenerator
)
# Parameterize system.
...
...
@@ -339,7 +338,7 @@ class TestForceField(unittest.TestCase):
# Load the PDB file.
pdb
=
PDBFile
(
os
.
path
.
join
(
'systems'
,
test
[
'pdb_filename'
]))
# Create a ForceField object.
forcefield
=
ForceField
(
simple_ffxml
)
forcefield
=
ForceField
(
StringIO
(
simple_ffxml
_contents
)
)
# Add the residue template generator.
forcefield
.
registerTemplateGenerator
(
simpleTemplateGenerator
)
# Parameterize system.
...
...
@@ -348,7 +347,7 @@ class TestForceField(unittest.TestCase):
# Now test all systems with a single ForceField object.
# Create a ForceField object.
forcefield
=
ForceField
(
simple_ffxml
)
forcefield
=
ForceField
(
StringIO
(
simple_ffxml
_contents
)
)
# Add the residue template generator.
forcefield
.
registerTemplateGenerator
(
simpleTemplateGenerator
)
for
test
in
tests
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment