Skip to content

Commit 50fdddd

Browse files
committed
KineticsDatabase.generateReactionsFromFamilies has new returnAllKinetics parameter.
This is passed through to each of the families' generateReactions functions. Default is False for RMG use. Call it with True from the website.
1 parent 03df87c commit 50fdddd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rmgpy/data/kinetics.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -2810,16 +2810,18 @@ def generateReactionsFromLibrary(self, reactants, products, library):
28102810
reactionList.append(reaction)
28112811
return filterReactions(reactants, products, reactionList)
28122812

2813-
def generateReactionsFromFamilies(self, reactants, products, only_families=None):
2813+
def generateReactionsFromFamilies(self, reactants, products, only_families=None, returnAllKinetics=False):
28142814
"""
28152815
Generate all reactions between the provided list of one or two
28162816
`reactants`, which should be :class:`Molecule` objects. This method
28172817
applies the reaction family.
2818+
If returnAllKinetics=True then a multiple duplicate reactions may be returned:
2819+
one for each possible kinetics source. If False, only the 'best' is returned.
28182820
"""
28192821
reactionList = []
28202822
for label, family in self.families.iteritems():
28212823
if only_families is None or label in only_families:
2822-
reactionList.extend(family.generateReactions(reactants))
2824+
reactionList.extend(family.generateReactions(reactants, returnAllKinetics=returnAllKinetics))
28232825
return filterReactions(reactants, products, reactionList)
28242826

28252827
def getForwardReactionForFamilyEntry(self, entry, family, thermoDatabase):

0 commit comments

Comments
 (0)