Skip to content

Commit

Permalink
check kinetics for pdep reactions before adding to core
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfarinajr authored and rwest committed Jun 5, 2023
1 parent 25d5912 commit 4c20f8c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rmgpy/rmg/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1929,6 +1929,13 @@ def update_unimolecular_reaction_networks(self):
while index < core_reaction_count:
reaction = self.core.reactions[index]
if isinstance(reaction, PDepReaction):
if np.isnan(reaction.kinetics.get_rate_coefficient(1000.0,1e5)):
# this reaction kinetics are undefined, dont add to the core
logging.warning(f"pdep reaction {reaction} has invalid kinetics and will be removed from the core: {reaction.kinetics}")
self.core.reactions.remove(reaction)
core_reaction_count -= 1
index += 1
continue
for reaction2 in self.core.reactions[index + 1:]:
if isinstance(reaction2,
PDepReaction) and reaction.reactants == reaction2.products and reaction.products == reaction2.reactants:
Expand Down

0 comments on commit 4c20f8c

Please sign in to comment.