Skip to content

Commit

Permalink
change generateReactions processing to use a list of groups/logic nod…
Browse files Browse the repository at this point in the history
…es instead of entries
  • Loading branch information
mjohnson541 committed Jan 20, 2019
1 parent a3edb67 commit e59fcb6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions rmgpy/data/kinetics/family.py
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,7 @@ def __matchReactantToTemplate(self, reactant, templateReactant):
"""

if isinstance(templateReactant, list): templateReactant = templateReactant[0]
struct = templateReactant.item
struct = templateReactant

if isinstance(struct, LogicNode):
mappings = []
Expand Down Expand Up @@ -1804,14 +1804,12 @@ def __generateReactions(self, reactants, products=None, forward=True, prod_reson
grps = template.reactants[0].item.split()
template_reactants = []
for grp in grps:
entry = deepcopy(template.reactants[0])
entry.item = grp
template_reactants.append(entry)
template_reactants.append(grp)
except AttributeError:
template_reactants = template.reactants
template_reactants = [x.item for x in template.reactants]
else:
template_reactants = template.reactants
template_reactants = [x.item for x in template.reactants]

# Unimolecular reactants: A --> products
if len(reactants) == 1 and len(template_reactants) == 1:

Expand Down

0 comments on commit e59fcb6

Please sign in to comment.