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 #140 and #141)
  • Loading branch information
rwest committed Oct 19, 2019
1 parent cc0521f commit aaecae3
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 aaecae3

Please sign in to comment.