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
180ce26a
Commit
180ce26a
authored
Jan 27, 2016
by
Jason Swails
Browse files
Add a test for combining FF XML files with close, but not exactly equal scaling
factors.
parent
c3847685
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6305 additions
and
4 deletions
+6305
-4
wrappers/python/tests/TestForceField.py
wrappers/python/tests/TestForceField.py
+7
-4
wrappers/python/tests/systems/test_amber_ff.xml
wrappers/python/tests/systems/test_amber_ff.xml
+6298
-0
No files found.
wrappers/python/tests/TestForceField.py
View file @
180ce26a
...
@@ -6,10 +6,8 @@ from simtk.unit import *
...
@@ -6,10 +6,8 @@ from simtk.unit import *
import
simtk.openmm.app.element
as
elem
import
simtk.openmm.app.element
as
elem
import
simtk.openmm.app.forcefield
as
forcefield
import
simtk.openmm.app.forcefield
as
forcefield
import
math
import
math
if
sys
.
version_info
>=
(
3
,
0
):
from
io
import
StringIO
from
io
import
StringIO
import
os
else
:
from
cStringIO
import
StringIO
class
TestForceField
(
unittest
.
TestCase
):
class
TestForceField
(
unittest
.
TestCase
):
"""Test the ForceField.createSystem() method."""
"""Test the ForceField.createSystem() method."""
...
@@ -573,5 +571,10 @@ class AmoebaTestForceField(unittest.TestCase):
...
@@ -573,5 +571,10 @@ class AmoebaTestForceField(unittest.TestCase):
self
.
assertEqual
(
len
(
ff
.
_forces
[
0
].
proper
),
1
)
self
.
assertEqual
(
len
(
ff
.
_forces
[
0
].
proper
),
1
)
self
.
assertEqual
(
len
(
ff
.
_forces
[
0
].
improper
),
1
)
self
.
assertEqual
(
len
(
ff
.
_forces
[
0
].
improper
),
1
)
def
test_ScalingFactorCombining
(
self
):
""" Tests that FFs can be combined if their scaling factors are very close """
forcefield
=
ForceField
(
'amber99sb.xml'
,
os
.
path
.
join
(
'systems'
,
'test_amber_ff.xml'
))
# This would raise an exception if it didn't work
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
unittest
.
main
()
unittest
.
main
()
wrappers/python/tests/systems/test_amber_ff.xml
0 → 100644
View file @
180ce26a
This diff is collapsed.
Click to expand it.
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