"platforms/reference/vscode:/vscode.git/clone" did not exist on "4885a268cbc4bd568a0a01869b8f70f1a47d1ca6"
Commit 2efac76b authored by John Chodera (MSKCC)'s avatar John Chodera (MSKCC)
Browse files

Bugfix in ForceField.registerTemplateGenerator()

parent 138d74fb
...@@ -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(handler) self._templateGenerators.append(template_generator)
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._residueTemplateGenerators: for generator in self._templateGenerators:
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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment