Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating an unmarked duplicate Disproportionation reactions #1823

Closed
rwest opened this issue Nov 18, 2019 · 4 comments
Closed

Generating an unmarked duplicate Disproportionation reactions #1823

rwest opened this issue Nov 18, 2019 · 4 comments
Labels
abandoned abandoned issue/PR as determined by actions bot stale stale issue/PR as determined by actions bot Topic: Duplicate Reactions Type: Bug

Comments

@rwest
Copy link
Member

rwest commented Nov 18, 2019

Bug Description

When converting a chemkin file generated by RMG into cantera using ck2cti I got this error:

***********************************************************************
CanteraError thrown by Kinetics::checkDuplicates:
Undeclared duplicate reactions detected:
Reaction 2619: HNO2(571) + HNO2(699) <=> H2NO2(172) + NO2(91)
Reaction 2498: HNO2(571) + HNO2(699) <=> H2NO2(172) + NO2(91)
***********************************************************************

Looking at the annotated chemkin file, sure enough these reactions are unmarked duplicates:

! Reaction index: Chemkin #2498; RMG #3394
! Template reaction: Disproportionation
! Estimated using an average for rate rule [Y_1centerbirad;N3H_s_Rrad]
! Euclidian distance = 0
! family: Disproportionation
HNO2(571)+HNO2(699)=NO2(91)+H2NO2(172)              2.645406e+08 1.500     -0.350   

! Reaction index: Chemkin #2619; RMG #26909
! Template reaction: Disproportionation
! Flux pairs: HNO2(699), NO2(91); HNO2(571), H2NO2(172); 
! Estimated using an average for rate rule [Y_1centerbirad;N3H_s_Rrad]
! Euclidian distance = 0
! family: Disproportionation
HNO2(699)+HNO2(571)=NO2(91)+H2NO2(172)              2.645406e+08 1.500     -0.350   

They even have exactly the same rate rules.
The reactants are listed in a different order, however.

How To Reproduce

The species in question are

HNO2(699)
multiplicity 3
1 O u1 p2 c0 {3,S}
2 O u1 p2 c0 {3,S}
3 N u0 p1 c0 {1,S} {2,S} {4,S}
4 H u0 p0 c0 {3,S}

HNO2(571)
multiplicity 3
1 O u0 p2 c0 {2,S} {3,S}
2 O u0 p2 c0 {1,S} {4,S}
3 N u2 p1 c0 {1,S}
4 H u0 p0 c0 {2,S}

NO2(91)
multiplicity 2
1 O u0 p3 c-1 {3,S}
2 O u0 p2 c0 {3,D}
3 N u1 p0 c+1 {1,S} {2,D}

H2NO2(172)
multiplicity 2
1 O u0 p2 c0 {2,S} {3,S}
2 O u0 p2 c0 {1,S} {4,S}
3 N u1 p1 c0 {1,S} {5,S}
4 H u0 p0 c0 {2,S}
5 H u0 p0 c0 {3,S}

So hopefully putting the two reactants in an input file will reproduce.

Expected Behavior

Duplicates would be eliminated, merged, or marked as DUPLICATE in the chemkin output.

Installation Information

Describe your installation method and system information.

  • OS (include version if known): CentOS 7
  • Installation method: from source in anaconda environment
  • RMG version information:
    • RMG-Py: 2.4.1-511-gd33df776a
    • RMG-database: 2.4.0-37-gcc0c77f9

Possible links

@rwest
Copy link
Member Author

rwest commented Nov 18, 2019

There was one other duplicate pair in the same model (ck2cti only reports them one at a time)

***********************************************************************
CanteraError thrown by Kinetics::checkDuplicates:
Undeclared duplicate reactions detected:
Reaction 2624: HNO2(699) + HNOO(572) <=> H2NO2(172) + NO2(91)
Reaction 2499: HNO2(699) + HNOO(572) <=> H2NO2(172) + NO2(91)
***********************************************************************

! Reaction index: Chemkin #2624; RMG #27079
! Template reaction: Disproportionation
! Flux pairs: HNO2(699), NO2(91); HNOO(572), H2NO2(172); 
! Estimated using an average for rate rule [O_rad/NonDeO;N3H_s_Rrad]
! Euclidian distance = 0
! family: Disproportionation
HNO2(699)+HNOO(572)=NO2(91)+H2NO2(172)              2.900000e+04 2.690     -1.600 

! Reaction index: Chemkin #2499; RMG #3395
! Template reaction: Disproportionation
! Estimated using an average for rate rule [O_rad/NonDeO;N3H_s_Rrad]
! Euclidian distance = 0
! family: Disproportionation
HNOO(572)+HNO2(699)=NO2(91)+H2NO2(172)              2.900000e+04 2.690     -1.600   

@mliu49
Copy link
Contributor

mliu49 commented Nov 18, 2019

I think #1336 is related.

rwest added a commit to rwest/RMG-Py that referenced this issue Dec 30, 2019
Hopefully fixes ReactionMechanismGenerator#1823 and ReactionMechanismGenerator#1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
rwest added a commit that referenced this issue Dec 30, 2019
Hopefully fixes #1823 and #1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
@rwest
Copy link
Member Author

rwest commented Dec 30, 2019

All recent examples of this have either the reactants or the products in a different order.
eg. A + B = C + D is not detected as a duplicate of A + B = D + C.

The chemkin.mark_duplicate_reaction function does not sort the reactant or product lists before comparing them.

After fixing this, there's a residual problem. The function REMOVES duplicate flags if it thinks they don't belong, but they might belong for a different reason than the one being checked.

Attempts to fix these are in PR #1856

mazeau pushed a commit to mazeau/RMG-Py that referenced this issue Feb 4, 2020
Hopefully fixes ReactionMechanismGenerator#1823 and ReactionMechanismGenerator#1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
mazeau pushed a commit to mazeau/RMG-Py that referenced this issue Feb 20, 2020
Hopefully fixes ReactionMechanismGenerator#1823 and ReactionMechanismGenerator#1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
rwest added a commit to rwest/RMG-Py that referenced this issue Mar 9, 2020
Hopefully fixes ReactionMechanismGenerator#1823 and ReactionMechanismGenerator#1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
rwest added a commit to rwest/RMG-Py that referenced this issue Apr 30, 2020
Hopefully fixes ReactionMechanismGenerator#1823 and ReactionMechanismGenerator#1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
rwest added a commit to rwest/RMG-Py that referenced this issue May 22, 2020
Hopefully fixes ReactionMechanismGenerator#1823 and ReactionMechanismGenerator#1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
rwest added a commit to rwest/RMG-Py that referenced this issue May 22, 2020
Hopefully fixes ReactionMechanismGenerator#1823 and ReactionMechanismGenerator#1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
rwest added a commit to rwest/RMG-Py that referenced this issue May 26, 2020
Hopefully fixes ReactionMechanismGenerator#1823 and ReactionMechanismGenerator#1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
rwest added a commit to rwest/RMG-Py that referenced this issue Jun 11, 2020
Hopefully fixes ReactionMechanismGenerator#1823 and ReactionMechanismGenerator#1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
rwest added a commit to rwest/RMG-Py that referenced this issue Aug 18, 2020
Hopefully fixes ReactionMechanismGenerator#1823 and ReactionMechanismGenerator#1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
rwest added a commit that referenced this issue Aug 18, 2020
Hopefully fixes #1823 and #1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
@github-actions
Copy link

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.

@github-actions github-actions bot added the stale stale issue/PR as determined by actions bot label Jun 21, 2023
rwest added a commit that referenced this issue Jul 22, 2023
Hopefully fixes #1823 and #1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
@github-actions github-actions bot added the abandoned abandoned issue/PR as determined by actions bot label Jul 22, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2023
rwest added a commit that referenced this issue Jul 23, 2023
Hopefully fixes #1823 and #1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
rwest added a commit that referenced this issue Jul 24, 2023
Hopefully fixes #1823 and #1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
rwest added a commit that referenced this issue Aug 10, 2023
Hopefully fixes #1823 and #1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
rwest added a commit that referenced this issue Aug 17, 2023
Hopefully fixes #1823 and #1336

This whole procedure is probably a bit slow and could 
probably be optimized, or done less often. 
If it matters (don't do it before profiling).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned abandoned issue/PR as determined by actions bot stale stale issue/PR as determined by actions bot Topic: Duplicate Reactions Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants