ReactionMechanismGenerator / RMG-Py

Python version of the amazing Reaction Mechanism Generator (RMG).
http://reactionmechanismgenerator.github.io/RMG-Py/
Other
376 stars 226 forks source link

Runs fail due to Invalid k(E) values computed for path reaction. #2347

Closed kfir4444 closed 12 months ago

kfir4444 commented 1 year ago

Bug Description

Entire run fails due to Invalid k(E) values computed for path reaction. I was running a model in RMG, and recived the following traceback:

File "/home/kfir4444/Code/RMG-Py/rmgpy/pdep/network.py", line 841, in calculate_microcanonical_rates
    'Invalid k(E) values computed for path reaction "{0}".'.format(rxn), k_ratio, Keq_ratio)
rmgpy.exceptions.InvalidMicrocanonicalRateError: ('Invalid k(E) values computed for path reaction "[CH2]COCCOOC=COC=C(15350) <=> [CH2]COCCOOC(C=C)C=O(15448)".', 2.002077091766027, 1.0)

No, the model had core had 68 species and 1174 reactions, and the model edge had 15382 species and 32480 reactions prior to this, and I do not even know if that reaction would have made it to the core, which leads to wondering, whether this behavior is as intended.

How To Reproduce

Input file will be granted by request.

Expected Behavior

I would have wanted this reaction to be placed in the edge, and in another file, called requires_refinement.txt (or something of the sort) that I could use after this run.

Installation Information

Describe your installation method and system information.

Additional Context

I would like to suggest a fix for this problem myself, just need a developers opinion if it's a bug or a feature :)

mjohnson541 commented 1 year ago

What this error specifically means is that after using ILT to convert k(T) to k(E) the resulting k(E) values are inconsistent with the k(T) by at least a factor of 2. A similar check exists for Keq, however, the Keq check specifically exempts calculations run in RMG jobs. It seems like someone decided that failures in the rate coefficient check should stop the RMG job, but not the Keq check.

As I don't think we've seen this error before, and we usually hear about stuff that stops a run pretty quickly, I think it would be worth investigating why this specific reaction has this problem. It seems likely something interesting is at work in the generated pdep network, the estimated k(T)s used by the network or the thermochemistry estimates in the network.

kfir4444 commented 1 year ago

Thanks @mjohnson541! I will try to investigate further using the restart_from_seed, which also leads to the same error, but either way, stopping the whole run just for that seems problematic... I will save the failed files, so if you (or anyone else) would have better ideas for that than you might also want to take a look at it.

github-actions[bot] commented 1 year ago

This issue is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant issue, otherwise it will automatically be closed in 30 days.