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
2efac76b
"vscode:/vscode.git/clone" did not exist on "7ecb9bdc701cadbb9d50149f2cdfead29214e513"
Commit
2efac76b
authored
Jan 01, 2016
by
John Chodera (MSKCC)
Browse files
Bugfix in ForceField.registerTemplateGenerator()
parent
138d74fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
wrappers/python/simtk/openmm/app/forcefield.py
wrappers/python/simtk/openmm/app/forcefield.py
+2
-2
No files found.
wrappers/python/simtk/openmm/app/forcefield.py
View file @
2efac76b
...
@@ -258,7 +258,7 @@ class ForceField(object):
...
@@ -258,7 +258,7 @@ class ForceField(object):
The residue template generator must return `True` if it could successfully generate a template, and `False` if it could not.
The residue template generator must return `True` if it could successfully generate a template, and `False` if it could not.
"""
"""
self
.
_templateGenerators
.
append
(
handle
r
)
self
.
_templateGenerators
.
append
(
template_generato
r
)
def
_findAtomTypes
(
self
,
attrib
,
num
):
def
_findAtomTypes
(
self
,
attrib
,
num
):
"""Parse the attributes on an XML tag to find the set of atom types for each atom it involves."""
"""Parse the attributes on an XML tag to find the set of atom types for each atom it involves."""
...
@@ -580,7 +580,7 @@ class ForceField(object):
...
@@ -580,7 +580,7 @@ class ForceField(object):
[
template
,
matches
]
=
self
.
_getResidueTemplateMatches
(
res
,
bondedToAtom
)
[
template
,
matches
]
=
self
.
_getResidueTemplateMatches
(
res
,
bondedToAtom
)
if
matches
is
None
:
if
matches
is
None
:
# No existing templates match. Try any registered residue template generators.
# No existing templates match. Try any registered residue template generators.
for
generator
in
self
.
_
residueT
emplateGenerators
:
for
generator
in
self
.
_
t
emplateGenerators
:
if
generator
(
forcefield
,
res
):
if
generator
(
forcefield
,
res
):
# This generator has registered a new residue template that should match.
# This generator has registered a new residue template that should match.
[
template
,
matches
]
=
self
.
_getResidueTemplateMatches
(
res
,
bondedToAtom
)
[
template
,
matches
]
=
self
.
_getResidueTemplateMatches
(
res
,
bondedToAtom
)
...
...
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