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
53f770f4
Commit
53f770f4
authored
Feb 21, 2017
by
peastman
Committed by
GitHub
Feb 21, 2017
Browse files
Merge pull request #1557 from andysim/dpme
Dispersion PME
parents
f36f36bf
c0850062
Changes
62
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
wrappers/python/tests/TestForceField.py
wrappers/python/tests/TestForceField.py
+6
-4
wrappers/python/tests/TestGromacsTopFile.py
wrappers/python/tests/TestGromacsTopFile.py
+6
-4
No files found.
wrappers/python/tests/TestForceField.py
View file @
53f770f4
...
...
@@ -33,12 +33,14 @@ class TestForceField(unittest.TestCase):
def
test_NonbondedMethod
(
self
):
"""Test all
five
options for the nonbondedMethod parameter."""
"""Test all
six
options for the nonbondedMethod parameter."""
methodMap
=
{
NoCutoff
:
NonbondedForce
.
NoCutoff
,
CutoffNonPeriodic
:
NonbondedForce
.
CutoffNonPeriodic
,
CutoffPeriodic
:
NonbondedForce
.
CutoffPeriodic
,
Ewald
:
NonbondedForce
.
Ewald
,
PME
:
NonbondedForce
.
PME
}
Ewald
:
NonbondedForce
.
Ewald
,
PME
:
NonbondedForce
.
PME
,
LJPME
:
NonbondedForce
.
LJPME
}
for
method
in
methodMap
:
system
=
self
.
forcefield1
.
createSystem
(
self
.
pdb1
.
topology
,
nonbondedMethod
=
method
)
...
...
@@ -62,7 +64,7 @@ class TestForceField(unittest.TestCase):
def
test_Cutoff
(
self
):
"""Test to make sure the nonbondedCutoff parameter is passed correctly."""
for
method
in
[
CutoffNonPeriodic
,
CutoffPeriodic
,
Ewald
,
PME
]:
for
method
in
[
CutoffNonPeriodic
,
CutoffPeriodic
,
Ewald
,
PME
,
LJPME
]:
system
=
self
.
forcefield1
.
createSystem
(
self
.
pdb1
.
topology
,
nonbondedMethod
=
method
,
nonbondedCutoff
=
2
*
nanometer
,
...
...
@@ -776,7 +778,7 @@ class AmoebaTestForceField(unittest.TestCase):
def
test_NonbondedMethod
(
self
):
"""Test
all five
options for the nonbondedMethod parameter."""
"""Test
both
options for the nonbondedMethod parameter."""
methodMap
=
{
NoCutoff
:
AmoebaMultipoleForce
.
NoCutoff
,
PME
:
AmoebaMultipoleForce
.
PME
}
...
...
wrappers/python/tests/TestGromacsTopFile.py
View file @
53f770f4
...
...
@@ -22,12 +22,14 @@ class TestGromacsTopFile(unittest.TestCase):
self
.
top2
=
GromacsTopFile
(
'systems/implicit.top'
)
def
test_NonbondedMethod
(
self
):
"""Test all
five
options for the nonbondedMethod parameter."""
"""Test all
six
options for the nonbondedMethod parameter."""
methodMap
=
{
NoCutoff
:
NonbondedForce
.
NoCutoff
,
CutoffNonPeriodic
:
NonbondedForce
.
CutoffNonPeriodic
,
CutoffPeriodic
:
NonbondedForce
.
CutoffPeriodic
,
Ewald
:
NonbondedForce
.
Ewald
,
PME
:
NonbondedForce
.
PME
}
Ewald
:
NonbondedForce
.
Ewald
,
PME
:
NonbondedForce
.
PME
,
LJPME
:
NonbondedForce
.
LJPME
}
for
method
in
methodMap
:
system
=
self
.
top1
.
createSystem
(
nonbondedMethod
=
method
)
forces
=
system
.
getForces
()
...
...
@@ -52,7 +54,7 @@ class TestGromacsTopFile(unittest.TestCase):
def
test_Cutoff
(
self
):
"""Test to make sure the nonbondedCutoff parameter is passed correctly."""
for
method
in
[
CutoffNonPeriodic
,
CutoffPeriodic
,
Ewald
,
PME
]:
for
method
in
[
CutoffNonPeriodic
,
CutoffPeriodic
,
Ewald
,
PME
,
LJPME
]:
system
=
self
.
top1
.
createSystem
(
nonbondedMethod
=
method
,
nonbondedCutoff
=
2
*
nanometer
,
constraints
=
HBonds
)
...
...
@@ -66,7 +68,7 @@ class TestGromacsTopFile(unittest.TestCase):
def
test_EwaldErrorTolerance
(
self
):
"""Test to make sure the ewaldErrorTolerance parameter is passed correctly."""
for
method
in
[
Ewald
,
PME
]:
for
method
in
[
Ewald
,
PME
,
LJPME
]:
system
=
self
.
top1
.
createSystem
(
nonbondedMethod
=
method
,
ewaldErrorTolerance
=
1e-6
,
constraints
=
HBonds
)
...
...
Prev
1
2
3
4
Next
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