Skip to content

Commit 8e94c4a

Browse files
committed
Catch and avoid another "Unable to calculate degeneracy" error.
Hopefully this will be fixed one day... (ref #140 and #141)
1 parent 7620926 commit 8e94c4a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

importChemkin.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1548,7 +1548,11 @@ def saveReactionToKineticsInfoFile(self, chemkinReaction):
15481548
product_molecules = [s.molecule[0] for s in chemkinReaction.products if s.reactive]
15491549
f.flush()
15501550
# logging.info("Trying to generate reactions for " + str(chemkinReaction))
1551-
generated_reactions = self.rmg_object.database.kinetics.generateReactionsFromFamilies(reactant_molecules, product_molecules)
1551+
try:
1552+
generated_reactions = self.rmg_object.database.kinetics.generateReactionsFromFamilies(reactant_molecules, product_molecules)
1553+
except KineticsError as e:
1554+
f.write('{0!r}'.format('Bug!: ' + str(e)))
1555+
generated_reactions = []
15521556
for reaction in generated_reactions:
15531557
f.write('{0!r}, '.format(reaction.family.label))
15541558
f.write(' ],\n')

0 commit comments

Comments
 (0)