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
bc240d4a
Commit
bc240d4a
authored
May 04, 2014
by
John Chodera (MSKCC)
Browse files
Fixes to tests.
parent
4e4db1f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
wrappers/python/tests/TestForceField.py
wrappers/python/tests/TestForceField.py
+10
-10
No files found.
wrappers/python/tests/TestForceField.py
View file @
bc240d4a
...
@@ -150,8 +150,8 @@ class AmoebaTestForceField(unittest.TestCase):
...
@@ -150,8 +150,8 @@ class AmoebaTestForceField(unittest.TestCase):
def
test_NonbondedMethod
(
self
):
def
test_NonbondedMethod
(
self
):
"""Test all five options for the nonbondedMethod parameter."""
"""Test all five options for the nonbondedMethod parameter."""
methodMap
=
{
NoCutoff
:
mm
.
AmoebaMultipoleForce
.
NoCutoff
,
methodMap
=
{
NoCutoff
:
AmoebaMultipoleForce
.
NoCutoff
,
PME
:
mm
.
AmoebaMultipoleForce
.
PME
}
PME
:
AmoebaMultipoleForce
.
PME
}
for
method
in
methodMap
:
for
method
in
methodMap
:
system
=
self
.
forcefield1
.
createSystem
(
self
.
pdb1
.
topology
,
system
=
self
.
forcefield1
.
createSystem
(
self
.
pdb1
.
topology
,
...
@@ -163,29 +163,29 @@ class AmoebaTestForceField(unittest.TestCase):
...
@@ -163,29 +163,29 @@ class AmoebaTestForceField(unittest.TestCase):
def
test_Cutoff
(
self
):
def
test_Cutoff
(
self
):
"""Test to make sure the nonbondedCutoff parameter is passed correctly."""
"""Test to make sure the nonbondedCutoff parameter is passed correctly."""
cutoff_distance
=
0.7
*
nanometer
for
method
in
[
NoCutoff
,
PME
]:
for
method
in
[
NoCutoff
,
PME
]:
system
=
self
.
forcefield1
.
createSystem
(
self
.
pdb1
.
topology
,
system
=
self
.
forcefield1
.
createSystem
(
self
.
pdb1
.
topology
,
nonbondedMethod
=
method
,
nonbondedMethod
=
method
,
nonbondedCutoff
=
7
*
angstroms
,
vdwCutoff
=
cutoff_distance
,
constraints
=
None
)
constraints
=
None
)
cutoff_distance
=
0.0
*
nanometer
cutoff_check
=
0.7
*
nanometer
for
force
in
system
.
getForces
():
for
force
in
system
.
getForces
():
if
isinstance
(
force
,
AmoebaNonbondedForce
)
or
isinstance
(
force
,
AmoebaMultipoleForce
):
if
isinstance
(
force
,
AmoebaVdwForce
):
cutoff_distance
=
force
.
getCutoffDistance
()
self
.
assertEqual
(
force
.
getCutoff
(),
cutoff_distance
)
self
.
assertEqual
(
cutoff_distance
,
cutoff_check
)
if
isinstance
(
force
,
AmoebaMultipoleForce
):
self
.
assertEqual
(
force
.
getCutoffDistance
(),
cutoff_distance
)
def
test_DispersionCorrection
(
self
):
def
test_DispersionCorrection
(
self
):
"""Test to make sure the nonbondedCutoff parameter is passed correctly."""
"""Test to make sure the nonbondedCutoff parameter is passed correctly."""
for
useDispersionCorrection
in
[
True
,
False
]:
for
useDispersionCorrection
in
[
True
,
False
]:
system
=
self
.
forcefield1
.
createSystem
(
self
.
pdb1
.
topology
,
system
=
self
.
forcefield1
.
createSystem
(
self
.
pdb1
.
topology
,
nonbonded
Cutoff
=
7
*
angstroms
,
nonbonded
Method
=
PME
,
useDispersionCorrection
=
useDispersionCorrection
)
useDispersionCorrection
=
useDispersionCorrection
)
for
force
in
system
.
getForces
():
for
force
in
system
.
getForces
():
if
isinstance
(
force
,
Amoeba
Nonbonded
Force
):
if
isinstance
(
force
,
Amoeba
Vdw
Force
):
self
.
assertEqual
(
useDispersionCorrection
,
force
.
getUseDispersionCorrection
())
self
.
assertEqual
(
useDispersionCorrection
,
force
.
getUseDispersionCorrection
())
...
...
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