RMG-Py
RMG-Py copied to clipboard
Non-declared duplicate reactions
Bug Description
Duplicate reactions can happen when one of the reactions is reversible and the other one is irreversible. However, currently, RMG won't mark them as duplicate on purpose (see the comments in rmgpy/chemkin.pyx). This results in RMG-Py, CHEMKIN, and Cantera have trouble loading/converting the generated mechanism file from RMG.
How To Reproduce
In a model generation job, RMG may find the following reaction:

and there are two matched reaction families for this reaction:
- Intra_Disproportionation (reversible)
- 1,2-Birad_to_alkene (irreversible)
When loading a mechanism with both rates in RMG-Py:

In Chemkin

In Cantera

Expected Behavior
Therefore the correct behavior is marking them as duplicate reactions even if they have different reversibility.
According to my test:
If 1 reversible + 1 non-irreversible,
Same direction: Needs to be marked as duplicate
Different direction:
For RMG-Py, both marked or not marked won't raise any error.
For CHEMKIN and Cantera, they need to be marked.
If both non-irreversible, Same direction: Needs to be marked. Different direction: For RMG-Py and Cantera, both marked or not marked won't raise any error. For CHEMKIN, they should NOT be marked as duplicate.
If 1 reversible + 1 irreversible-forward + 1 irreversible-backward For RMG, as long as reversible and irreversible-forward are marked is fine. For Cantera, it needs to mark all three reactions as duplicate For CHEMKIN, there might be a bug... It depends on the sequence of those entries showing up in the file. If reversible first, then all need to be marked; if irreversible-forward first, then reversible and irreversible forward need to be marked and the other shouldn't...
[WIP] Need to come up with a good strategy...