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
0c68e831
Commit
0c68e831
authored
Mar 09, 2016
by
Rafal P. Wiewiora
Browse files
check charges in test
parent
4aa8df6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
wrappers/python/tests/TestForceField.py
wrappers/python/tests/TestForceField.py
+6
-2
No files found.
wrappers/python/tests/TestForceField.py
View file @
0c68e831
...
@@ -562,8 +562,12 @@ class TestForceField(unittest.TestCase):
...
@@ -562,8 +562,12 @@ class TestForceField(unittest.TestCase):
pdb
=
PDBFile
(
StringIO
(
pdb_string
))
pdb
=
PDBFile
(
StringIO
(
pdb_string
))
self
.
assertRaises
(
Exception
,
lambda
:
ff
.
createSystem
(
pdb
.
topology
))
self
.
assertRaises
(
Exception
,
lambda
:
ff
.
createSystem
(
pdb
.
topology
))
ff
.
createSystem
(
pdb
.
topology
,
residueTemplates
=
{
list
(
pdb
.
topology
.
residues
())[
0
]
:
'FE2'
})
sys
=
ff
.
createSystem
(
pdb
.
topology
,
residueTemplates
=
{
list
(
pdb
.
topology
.
residues
())[
0
]
:
'FE2'
})
ff
.
createSystem
(
pdb
.
topology
,
residueTemplates
=
{
list
(
pdb
.
topology
.
residues
())[
0
]
:
'FE'
})
# confirm charge
self
.
assertEqual
(
sys
.
getForce
(
0
).
getParticleParameters
(
0
)[
0
].
_value
,
2.0
)
sys
=
ff
.
createSystem
(
pdb
.
topology
,
residueTemplates
=
{
list
(
pdb
.
topology
.
residues
())[
0
]
:
'FE'
})
# confirm charge
self
.
assertEqual
(
sys
.
getForce
(
0
).
getParticleParameters
(
0
)[
0
].
_value
,
3.0
)
def
test_ResidueOverloading
(
self
):
def
test_ResidueOverloading
(
self
):
"""Test residue overloading via overload tag in the XML"""
"""Test residue overloading via overload tag in the XML"""
...
...
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