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
"...ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "d00ab6b449159b51c532ea186e8b7f416e6dbca8"
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):
...
@@ -293,22 +293,21 @@ class TestForceField(unittest.TestCase):
# Define forcefield parameters used by simpleTemplateGenerator.
# Define forcefield parameters used by simpleTemplateGenerator.
# NOTE: This parameter definition file will currently only work for residues that either have
# 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.
# no external bonds or external bonds to other residues parameterized by the simpleTemplateGenerator.
simple_ffxml_contents
=
"""
\
simple_ffxml_contents
=
"""
<ForceField>
<ForceField>
<AtomTypes>
<AtomTypes>
<Type name="XXX" class="XXX" element="C" mass="12"/>
<Type name="XXX" class="XXX" element="C" mass="12
.0
"/>
</AtomTypes>
</AtomTypes>
<HarmonicBondForce>
<HarmonicBondForce>
<Bond type1="XXX" type2="XXX" length="0.1409" k="392459.2"/>
<Bond type1="XXX" type2="XXX" length="0.1409" k="392459.2"/>
</HarmonicBondForce>
</HarmonicBondForce>
<HarmonicAngleForce>
<HarmonicAngleForce>
<Angle type1="XXX" type2="XXX" type3="XXX" angle="2.09439510239" k="527.184"/>
<Angle type1="XXX" type2="XXX" type3="XXX" angle="2.09439510239" k="527.184"/>
</HarmonicAngleForce>
</HarmonicAngleForce>
<NonbondedForce coulomb14scale="0.833333" lj14scale="0.5">
<NonbondedForce coulomb14scale="0.833333" lj14scale="0.5">
<Atom type="XXX" charge="0.000" sigma="0.315" epsilon="0.635"/>
<Atom type="XXX" charge="0.000" sigma="0.315" epsilon="0.635"/>
</NonbondedForce>
</NonbondedForce>
</ForceField>"""
</ForceField>"""
simple_ffxml
=
StringIO
(
simple_ffxml_contents
)
#
#
# Test where we generate parameters for only a ligand.
# Test where we generate parameters for only a ligand.
...
@@ -317,7 +316,7 @@ class TestForceField(unittest.TestCase):
...
@@ -317,7 +316,7 @@ class TestForceField(unittest.TestCase):
# Load the PDB file.
# Load the PDB file.
pdb
=
PDBFile
(
os
.
path
.
join
(
'systems'
,
'T4-lysozyme-L99A-p-xylene-implicit.pdb'
))
pdb
=
PDBFile
(
os
.
path
.
join
(
'systems'
,
'T4-lysozyme-L99A-p-xylene-implicit.pdb'
))
# Create a ForceField object.
# 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.
# Add the residue template generator.
forcefield
.
registerTemplateGenerator
(
simpleTemplateGenerator
)
forcefield
.
registerTemplateGenerator
(
simpleTemplateGenerator
)
# Parameterize system.
# Parameterize system.
...
@@ -339,7 +338,7 @@ class TestForceField(unittest.TestCase):
...
@@ -339,7 +338,7 @@ class TestForceField(unittest.TestCase):
# Load the PDB file.
# Load the PDB file.
pdb
=
PDBFile
(
os
.
path
.
join
(
'systems'
,
test
[
'pdb_filename'
]))
pdb
=
PDBFile
(
os
.
path
.
join
(
'systems'
,
test
[
'pdb_filename'
]))
# Create a ForceField object.
# Create a ForceField object.
forcefield
=
ForceField
(
simple_ffxml
)
forcefield
=
ForceField
(
StringIO
(
simple_ffxml
_contents
)
)
# Add the residue template generator.
# Add the residue template generator.
forcefield
.
registerTemplateGenerator
(
simpleTemplateGenerator
)
forcefield
.
registerTemplateGenerator
(
simpleTemplateGenerator
)
# Parameterize system.
# Parameterize system.
...
@@ -348,7 +347,7 @@ class TestForceField(unittest.TestCase):
...
@@ -348,7 +347,7 @@ class TestForceField(unittest.TestCase):
# Now test all systems with a single ForceField object.
# Now test all systems with a single ForceField object.
# Create a ForceField object.
# Create a ForceField object.
forcefield
=
ForceField
(
simple_ffxml
)
forcefield
=
ForceField
(
StringIO
(
simple_ffxml
_contents
)
)
# Add the residue template generator.
# Add the residue template generator.
forcefield
.
registerTemplateGenerator
(
simpleTemplateGenerator
)
forcefield
.
registerTemplateGenerator
(
simpleTemplateGenerator
)
for
test
in
tests
:
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