@@ -47,7 +47,7 @@ from rmgpy.data.kinetics.library import LibraryReaction
4747from rmgpy.exceptions import ChemkinError
4848from rmgpy.molecule.element import get_element
4949from rmgpy.molecule.util import get_element_count
50- from rmgpy.quantity import Quantity
50+ from rmgpy.quantity import Quantity, QuantityError
5151from rmgpy.reaction import Reaction
5252from rmgpy.rmg.pdep import PDepNetwork, PDepReaction
5353from rmgpy.species import Species
@@ -397,7 +397,7 @@ def _read_kinetics_reaction(line, species_dict, Aunits, Aunits_surf, Eunits):
397397 # this identifies reactions like 'H+H+M=H2+M' as opposed to 'H+H(+M)=H2(+M)' as identified above
398398 third_body = True
399399 elif reactant not in species_dict:
400- raise ChemkinError(' Unexpected reactant "{0}" in reaction {1}.' .format(reactant, reaction ))
400+ raise ChemkinError(' Unexpected reactant "{0}" in reaction line {1}.' .format(reactant, line ))
401401 else :
402402 reactant_species = species_dict[reactant]
403403 if not reactant_species.reactive:
@@ -1405,13 +1405,15 @@ def read_reactions_block(f, species_dict, read_comments=True):
14051405 ' {0}^3/({1}*{2})' .format(volume_units, molecule_units, time_units), # Second-order
14061406 ' {0}^6/({1}^2*{2})' .format(volume_units, molecule_units, time_units), # Third-order
14071407 ' {0}^9/({1}^3*{2})' .format(volume_units, molecule_units, time_units), # Fourth-order
1408+ f" {volume_units}^12/({molecule_units}^4*{time_units})" , # Fifth-order
14081409 ]
14091410
14101411 Aunits_surf = [
14111412 ' ' , # Zeroth-order
14121413 ' s^-1' .format(time_units), # First-order
14131414 ' {0}^2/({1}*{2})' .format(area_units, molecule_units, time_units), # Second-order
14141415 ' {0}^4/({1}^2*{2})' .format(area_units, molecule_units, time_units), # Third-order
1416+ ' {0}^6/({1}^3*{2})' .format(area_units, molecule_units, time_units), # Fourth-order
14151417 ]
14161418 Eunits = energy_units
14171419
@@ -1481,10 +1483,13 @@ def read_reactions_block(f, species_dict, read_comments=True):
14811483 reaction = read_reaction_comments(reaction, comments, read = read_comments)
14821484 except ChemkinError as e:
14831485 if " Skip reaction!" in str (e):
1484- logging.warning(" Skipping the reaction {0!r}" .format(kinetics))
1486+ logging.warning(" Skipping the reaction {0!r} because of {e!s} " .format(kinetics))
14851487 continue
14861488 else :
14871489 raise
1490+ except QuantityError as e:
1491+ logging.warning(f" Skipping the reaction {kinetics!r} due to units error: {e}" )
1492+ continue
14881493 reaction_list.append(reaction)
14891494
14901495 return reaction_list
0 commit comments