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
ce70fa17
"wrappers/vscode:/vscode.git/clone" did not exist on "baa7a8f63bebc0a847bc0dd2d2ad56117fa8eb84"
Commit
ce70fa17
authored
Jan 19, 2016
by
John Chodera (MSKCC)
Browse files
Fix omitted template accumulation.
parent
86d8dbf9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
wrappers/python/simtk/openmm/app/forcefield.py
wrappers/python/simtk/openmm/app/forcefield.py
+1
-0
wrappers/python/tests/TestForceField.py
wrappers/python/tests/TestForceField.py
+4
-3
No files found.
wrappers/python/simtk/openmm/app/forcefield.py
View file @
ce70fa17
...
...
@@ -657,6 +657,7 @@ class ForceField(object):
# Residue is unique.
unique_unmatched_residues
.
append
(
residue
)
signatures
.
add
(
signature
)
templates
.
append
(
template
)
return
[
unique_unmatched_residues
,
templates
]
...
...
wrappers/python/tests/TestForceField.py
View file @
ce70fa17
...
...
@@ -261,10 +261,10 @@ class TestForceField(unittest.TestCase):
from
uuid
import
uuid4
template_name
=
uuid4
()
# Create residue template.
template
=
ForceField
.
_createResidueTemplate
(
residue
)
template
.
name
=
template_name
template
=
ForceField
.
_createResidueTemplate
(
residue
)
# use helper function
template
.
name
=
template_name
# replace template name
for
(
template_atom
,
residue_atom
)
in
zip
(
template
.
atoms
,
residue
.
atoms
()):
template_atom
.
type
=
'XXX'
template_atom
.
type
=
'XXX'
# replace atom type
# Register the template.
forcefield
.
registerResidueTemplate
(
template
)
...
...
@@ -380,6 +380,7 @@ class TestForceField(unittest.TestCase):
# Check results.
self
.
assertEqual
(
len
(
unmatched_residues
),
24
)
self
.
assertEqual
(
len
(
unique_unmatched_residues
),
2
)
self
.
assertEqual
(
len
(
templates
),
2
)
unique_names
=
set
([
residue
.
name
for
residue
in
unique_unmatched_residues
])
self
.
assertTrue
(
'HOH'
not
in
unique_names
)
self
.
assertTrue
(
'NA'
in
unique_names
)
...
...
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