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
501fcca4
"vscode:/vscode.git/clone" did not exist on "5759db44037986e4f0281c35cb333fcd2ec8fcd9"
Commit
501fcca4
authored
Aug 06, 2019
by
Jeff Wagner
Browse files
Add test that SA energy=0 when gbsaModel is None
parent
74ef3fee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
wrappers/python/tests/TestAmberPrmtopFile.py
wrappers/python/tests/TestAmberPrmtopFile.py
+10
-1
No files found.
wrappers/python/tests/TestAmberPrmtopFile.py
View file @
501fcca4
...
@@ -127,6 +127,14 @@ class TestAmberPrmtopFile(unittest.TestCase):
...
@@ -127,6 +127,14 @@ class TestAmberPrmtopFile(unittest.TestCase):
self
.
assertTrue
(
found_matching_solvent_dielectric
and
self
.
assertTrue
(
found_matching_solvent_dielectric
and
found_matching_solute_dielectric
)
found_matching_solute_dielectric
)
def
test_ImplicitSolventZeroSA
(
self
):
"""Test that requesting gbsaModel=None yields a surface area energy of 0 when
prmtop.createSystem produces a GBSAOBCForce"""
system
=
prmtop2
.
createSystem
(
implicitSolvent
=
OBC2
,
gbsaModel
=
None
)
for
force
in
system
.
getForces
():
if
isinstance
(
force
,
GBSAOBCForce
):
self
.
assertEqual
(
force
.
getSurfaceAreaEnergy
(),
0
*
kilojoule
/
(
nanometer
**
2
*
mole
))
def
test_HydrogenMass
(
self
):
def
test_HydrogenMass
(
self
):
"""Test that altering the mass of hydrogens works correctly."""
"""Test that altering the mass of hydrogens works correctly."""
...
@@ -375,6 +383,7 @@ class TestAmberPrmtopFile(unittest.TestCase):
...
@@ -375,6 +383,7 @@ class TestAmberPrmtopFile(unittest.TestCase):
# Now make sure that out-of-range parameters *do* raise
# Now make sure that out-of-range parameters *do* raise
self
.
assertRaises
(
ValueError
,
lambda
:
f
.
addParticle
([
0
,
0.9
,
0.5
]))
self
.
assertRaises
(
ValueError
,
lambda
:
f
.
addParticle
([
0
,
0.9
,
0.5
]))
self
.
assertRaises
(
ValueError
,
lambda
:
f
.
addParticle
([
0
,
0.21
,
0.5
]))
self
.
assertRaises
(
ValueError
,
lambda
:
f
.
addParticle
([
0
,
0.21
,
0.5
]))
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
unittest
.
main
()
unittest
.
main
()
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