forked from enviPath/enviPy
Fix App Domain Bug when a Rule can be applied more than once (#49)
Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#49
This commit is contained in:
@ -639,20 +639,23 @@ class IndigoUtils(object):
|
||||
environment.add(mappedAtom.index())
|
||||
|
||||
for k, v in functional_groups.items():
|
||||
try:
|
||||
sanitized = IndigoUtils.sanitize_functional_group(k)
|
||||
|
||||
sanitized = IndigoUtils.sanitize_functional_group(k)
|
||||
query = indigo.loadSmarts(sanitized)
|
||||
|
||||
query = indigo.loadSmarts(sanitized)
|
||||
for match in matcher.iterateMatches(query):
|
||||
if match is not None:
|
||||
|
||||
for match in matcher.iterateMatches(query):
|
||||
if match is not None:
|
||||
for atom in query.iterateAtoms():
|
||||
mappedAtom = match.mapAtom(atom)
|
||||
if mappedAtom is None or mappedAtom.index() in environment:
|
||||
continue
|
||||
|
||||
for atom in query.iterateAtoms():
|
||||
mappedAtom = match.mapAtom(atom)
|
||||
if mappedAtom is None or mappedAtom.index() in environment:
|
||||
continue
|
||||
counts[mappedAtom.index()] = max(v, counts[mappedAtom.index()])
|
||||
|
||||
counts[mappedAtom.index()] = max(v, counts[mappedAtom.index()])
|
||||
except IndigoException as e:
|
||||
logger.debug(f'Colorizing failed due to {e}')
|
||||
|
||||
for k, v in counts.items():
|
||||
if is_reaction:
|
||||
|
||||
Reference in New Issue
Block a user