Skip to content

Commit

Permalink
Catch and avoid another "Unable to calculate degeneracy" error.
Browse files Browse the repository at this point in the history
Hopefully this will be fixed one day...
(ref ReactionMechanismGenerator#140 and ReactionMechanismGenerator#141)
  • Loading branch information
rwest committed Apr 16, 2020
1 parent 70034d7 commit f17980f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion importChemkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,11 @@ def saveReactionToKineticsInfoFile(self, chemkinReaction):
product_molecules = [s.molecule[0] for s in chemkinReaction.products if s.reactive]
f.flush()
# logging.info("Trying to generate reactions for " + str(chemkinReaction))
generated_reactions = self.rmg_object.database.kinetics.generateReactionsFromFamilies(reactant_molecules, product_molecules)
try:
generated_reactions = self.rmg_object.database.kinetics.generateReactionsFromFamilies(reactant_molecules, product_molecules)
except KineticsError as e:
f.write('{0!r}'.format('Bug!: ' + str(e)))
generated_reactions = []
for reaction in generated_reactions:
f.write('{0!r}, '.format(reaction.family.label))
f.write(' ],\n')
Expand Down

0 comments on commit f17980f

Please sign in to comment.