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
12b839b2
Commit
12b839b2
authored
May 23, 2017
by
Jason Swails
Browse files
Add a test for flexibleConstraints.
parent
cc03f111
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
5 deletions
+28
-5
wrappers/python/tests/TestForceField.py
wrappers/python/tests/TestForceField.py
+28
-5
No files found.
wrappers/python/tests/TestForceField.py
View file @
12b839b2
...
@@ -95,6 +95,29 @@ class TestForceField(unittest.TestCase):
...
@@ -95,6 +95,29 @@ class TestForceField(unittest.TestCase):
validateConstraints
(
self
,
topology
,
system
,
validateConstraints
(
self
,
topology
,
system
,
constraints_value
,
rigidWater_value
)
constraints_value
,
rigidWater_value
)
def
test_flexibleConstraints
(
self
):
""" Test the flexibleConstraints keyword """
topology
=
self
.
pdb1
.
topology
system1
=
self
.
forcefield1
.
createSystem
(
topology
,
constraints
=
HAngles
,
rigidWater
=
True
)
system2
=
self
.
forcefield1
.
createSystem
(
topology
,
constraints
=
HAngles
,
rigidWater
=
True
,
flexibleConstraints
=
True
)
validateConstraints
(
self
,
topology
,
system1
,
HAngles
,
True
)
validateConstraints
(
self
,
topology
,
system2
,
HAngles
,
True
)
for
force
in
system1
.
getForces
():
if
isinstance
(
force
,
HarmonicBondForce
):
bf1
=
force
elif
isinstance
(
force
,
HarmonicAngleForce
):
af1
=
force
for
force
in
system2
.
getForces
():
if
isinstance
(
force
,
HarmonicBondForce
):
bf2
=
force
elif
isinstance
(
force
,
HarmonicAngleForce
):
af2
=
force
# Make sure we picked up extra terms with flexibleConstraints
self
.
assertGreater
(
bf2
.
getNumBonds
(),
bf1
.
getNumBonds
())
self
.
assertGreater
(
af2
.
getNumAngles
(),
af2
.
getNumAngles
())
def
test_ImplicitSolvent
(
self
):
def
test_ImplicitSolvent
(
self
):
"""Test the four types of implicit solvents using the implicitSolvent
"""Test the four types of implicit solvents using the implicitSolvent
parameter.
parameter.
...
...
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