ReactionMechanismGenerator / RMG-Py

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

Duplicate family reaction #1336

Closed alongd closed 1 year ago

alongd commented 6 years ago

I got the two following identical duplicate H_Abstraction reactions:

! Template reaction: H_Abstraction
! Flux pairs: HO2(11), O2(2); SO(15), HSO(19); 
! Estimated using template [Orad_O_H;Y_rad] for rate rule [Orad_O_H;Y_2centeradjbirad]
! Euclidian distance = 1.0
! family: H_Abstraction
HO2(11)+SO(15)=HSO(19)+O2(2)                        1.750000e+10 0.000     -3.275   
DUPLICATE

! Reaction index: Chemkin #123; RMG #1075
! Template reaction: H_Abstraction
! Flux pairs: HO2(11), O2(2); SO(15), HSO(19); 
! Estimated using template [Orad_O_H;Y_rad] for rate rule [Orad_O_H;Y_2centeradjbirad]
! Euclidian distance = 1.0
! family: H_Abstraction
HO2(11)+SO(15)=HSO(19)+O2(2)                        1.750000e+10 0.000     -3.275   
DUPLICATE

As @mjohnson541 noted correctly, the reverse direction has a degeneracy of 2, but it's unclear to me why RMG duplicated this reaction.

@goldmanm and @mliu49, could you take a look and tell me what you think?

(SO is isoelectronic with O2 - both are birads, HSO has two resonance structures with SLIMES S[O] and [SH]=O)

mliu49 commented 6 years ago

This is extremely odd. From what I can tell, these two reactions are completely identical. I thought that we should only have duplicate reactions from libraries or families with different templates. I will try to debug this.

mliu49 commented 6 years ago

Do you upload your input file? I can't reproduce it just by running generateReactions.

alongd commented 6 years ago

I couldn't replicate this behaviour on master. I'm closing the issue for now.

alongd commented 4 years ago

I'm reopening the issue, just had this problem again. RMG generated two identical reactions from the Disprop template on the current master (after the Py3 transition). I attach an input file that replicates this on master (I actually ran on a branch with some Arkane additions for TeraChem, I don't think it should matter). It takes ~30 min to run.

In the attached chemkin file, I relocated the problematic reactions to the top of the reactions block. Here they are:


! Reaction index: Chemkin #1188; RMG #6983
! Template reaction: Disproportionation
! Flux pairs: C2H4N(164), C2H5N(196); C2H6N(12), C2H5N(23); 
! Estimated using template [C_sec_rad;Cpri_Rrad] for rate rule [C_rad/H/NonDeN;Cpri_Rrad]
! Euclidian distance = 1.0
! Multiplied by reaction path degeneracy 2.0
! family: Disproportionation
C2H4N(164)+C2H6N(12)=C2H5N(196)+C2H5N(23)           2.529580e+08 1.000     0.238    

! Reaction index: Chemkin #1157; RMG #2894
! Template reaction: Disproportionation
! Flux pairs: C2H6N(12), C2H5N(23); C2H4N(164), C2H5N(196); 
! Estimated using template [C_sec_rad;Cpri_Rrad] for rate rule [C_rad/H/NonDeN;Cpri_Rrad]
! Euclidian distance = 1.0
! Multiplied by reaction path degeneracy 2.0
! family: Disproportionation
C2H4N(164)+C2H6N(12)=C2H5N(23)+C2H5N(196)           2.529580e+08 1.000     0.238    

Both have the same template. The rates are the same per reaction as the value the RMG website says under kinetics search. The lesser issue is that they are not marked as DUPs. The bigger issue is that this reaction should appear twice in the model.

The reaction here is: image

input.txt chem_annotated.txt species_dictionary.txt

mliu49 commented 4 years ago

I ran your input file on current master of both py and database and got a different model.

After model enlargement:
    The model core has 82 species and 2306 reactions
    The model edge has 258 species and 10380 reactions

Saving current model core to Chemkin file...
Chemkin file contains 2313 reactions.
Saving annotated version of Chemkin file...
Chemkin file contains 2313 reactions.
Updating RMG execution statistics...
    Execution time (DD:HH:MM:SS): 00:00:59:44
    Memory used: 890.70 MB

The reaction you mentioned is not duplicated. The job crashed when generating the cantera file due to a different unmarked duplicate:

! Reaction index: Chemkin #1335; RMG #236
! Library reaction: FFCM1(-)
! Flux pairs: CH2CHO(51), CO(30); CH2CHO(51), CH3(15);
CH2CHO(51)(+M)=CO(30)+CH3(15)(+M)                   2.930e+12 0.290     40.326
H2(7)/2.00/ H2O(8)/6.00/ CO(30)/1.50/ CO2(31)/2.00/ CH4(16)/2.00/ CH2O(36)/2.50/ C2H2(39)/3.00/ C2H4(24)/3.00/ C2H6(47)/3.00/
    LOW/ 2.340e+27 -3.180    33.445   /
    TROE/ 2.110e-01 199       2.03e+03  1.12e+05 /

! Reaction index: Chemkin #1353; RMG #8781
! PDep reaction: PDepNetwork #303
! Flux pairs: CH2CHO(51), CO(30); CH2CHO(51), CH3(15);
CH2CHO(51)(+M)=CO(30)+CH3(15)(+M)                   1.000e+00 0.000     0.000
    TCHEB/ 298.000   2500.000 /
    PCHEB/ 0.099     9.869    /
    CHEB/ 6 4/
    CHEB/ -2.899e+00   2.102e-01    -1.569e-02   1.216e-03   /
    CHEB/ 1.116e+01    3.418e-01    -1.697e-02   7.032e-04   /
    CHEB/ -3.183e-01   1.826e-01    2.574e-03    -1.110e-03  /
    CHEB/ -2.304e-01   5.780e-02    8.974e-03    -6.004e-04  /
    CHEB/ -1.024e-01   2.467e-03    5.055e-03    2.246e-04   /
    CHEB/ -2.807e-02   -7.797e-03   6.772e-04    2.430e-04   /

I think this may have a separate cause though, unrelated to the reaction you posted.

What commits were you running on?

rwest commented 4 years ago

I am getting duplicate H abstraction reactions.

Cantera is giving

***********************************************************************
CanteraError thrown by Kinetics::checkDuplicates:
Undeclared duplicate reactions detected:
Reaction 2967: HNOO(1050) + HONO(91) <=> H2NO2(195) + NO2(92)
Reaction 2829: HNOO(1050) + HONO(91) <=> H2NO2(195) + NO2(92)
***********************************************************************

Sure enough

! Reaction index: Chemkin #2829; RMG #4697
! Template reaction: H_Abstraction
! Flux pairs: HONO(91), NO2(92); HNOO(1050), H2NO2(195); 
! Estimated using average of templates [O_sec;O_rad/NonDeO] + [O/H/OneDeN;O_rad] for rate rule [O/H/OneDeN;O_rad/NonDeO]
! Euclidian distance = 2.0
! family: H_Abstraction
HONO(91)+HNOO(1050)=NO2(92)+H2NO2(195)              4.486829e+03 2.720     5.736    

and

! Reaction index: Chemkin #2967; RMG #28747
! Template reaction: H_Abstraction
! Flux pairs: HNOO(1050), H2NO2(195); HONO(91), NO2(92); 
! Estimated using average of templates [O_sec;O_rad/NonDeO] + [O/H/OneDeN;O_rad] for rate rule [O/H/OneDeN;O_rad/NonDeO]
! Euclidian distance = 2.0
! family: H_Abstraction
HNOO(1050)+HONO(91)=NO2(92)+H2NO2(195)              4.486829e+03 2.720     5.736    

Not sure why the reactants are listed the other way, but it's the same reaction.

They first showed up in a chemkin file when adding HNOO(1050) to the core, step 168.

In the Cantera file

Reaction 2829 reaction('HONO(91) + HNOO(1050) <=> NO2(92) + H2NO2(195)', [4.486829e+03, 2.72, 5.736], id='gas-2829') Reaction 2967 reaction('HNOO(1050) + HONO(91) <=> NO2(92) + H2NO2(195)', [4.486829e+03, 2.72, 5.736], id='gas-2967')

In the RMG log for that step

Adding species HNOO(1050) to model core

Summary of Model Enlargement
---------------------------------
Added 1 new core species
    HNOO(1050)
Created 0 new edge species
Moved 147 reactions from edge to core 
   <snip>
    HONO(91) + HNOO(1050) <=> NO2(92) + [NH]OO(195)

only one reaction is listed. The other reaction HNOO(1050) + HONO(91) <=> NO2(92) + [NH]OO(195) was added to the core immediately afterwards, in the Summary of Secondary Model Edge Enlargement step.

Added 20 new core reactions
   <snip>
    HNOO(1050) + HONO(91) <=> NO2(92) + [NH]OO(195)

The first reactionHONO(91) + HNOO(1050) <=> NO2(92) + [NH]OO(195) was created as an edge reaction back at step 47 when [NH]OO(195) was added to the core. Then when HNOO(1050) was moved to the core, the reaction was moved from the edge to the core, then the other reaction was generated in the core. And not identified as a duplicate.

For what it's worth, I was running with -n 4, i.e. For reaction generation 4 processes are used.

Possible duplicate of #1823. Not sure which issue should be used for further discussion.

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.