Skip to content

Commit

Permalink
skip generation in autogenerated trees if # tree reactants != # given…
Browse files Browse the repository at this point in the history
… reactants
  • Loading branch information
mjohnson541 committed Aug 7, 2019
1 parent 5f95c4d commit dc12acd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rmgpy/data/kinetics/family.py
Original file line number Diff line number Diff line change
Expand Up @@ -1873,11 +1873,16 @@ def __generateReactions(self, reactants, products=None, forward=True, prod_reson

if forward:
template = self.forwardTemplate
reactantNum = self.reactantNum
elif self.reverseTemplate is None:
return []
else:
template = self.reverseTemplate

reactantNum = self.productNum

if self.autoGenerated and reactantNum != len(reactants):
return []

if len(reactants) > len(template.reactants): #if the family has one template and is bimolecular split template into multiple reactants
try:
grps = template.reactants[0].item.split()
Expand Down

0 comments on commit dc12acd

Please sign in to comment.