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
a485716b
Commit
a485716b
authored
May 10, 2016
by
Jason Swails
Browse files
Add a test case for the bounds checking of GBSAGBnForce. Fails for code before
this PR
parent
070a0f47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
wrappers/python/tests/TestAmberPrmtopFile.py
wrappers/python/tests/TestAmberPrmtopFile.py
+12
-0
No files found.
wrappers/python/tests/TestAmberPrmtopFile.py
View file @
a485716b
...
...
@@ -361,5 +361,17 @@ class TestAmberPrmtopFile(unittest.TestCase):
# Make sure it says something about chamber
self
.
assertTrue
(
'chamber'
in
str
(
e
).
lower
())
def
testGBneckRadii
(
self
):
""" Tests that GBneck radii limits are correctly enforced """
from
simtk.openmm.app.internal.customgbforces
import
GBSAGBnForce
f
=
GBSAGBnForce
()
# Make sure legal parameters do not raise
f
.
addParticle
([
0
,
0.1
,
0.5
])
f
.
addParticle
([
0
,
0.2
,
0.5
])
f
.
addParticle
([
0
,
0.15
,
0.5
])
# Now make sure that out-of-range parameters *do* raise
self
.
assertRaises
(
ValueError
,
lambda
:
f
.
addParticle
([
0.9
,
0.5
]))
self
.
assertRaises
(
ValueError
,
lambda
:
f
.
addParticle
([
0.21
,
0.5
]))
if
__name__
==
'__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