ReactionMechanismGenerator / RMG-Java

The Java version of RMG: Reaction Mechanism Generator
http://rmg.sourceforge.net/
MIT License
29 stars 36 forks source link

reaction no balanced error for intra_R_Add_endocyclic reactions #225

Closed ezanoelo closed 12 years ago

ezanoelo commented 12 years ago

One of my recent isobutanol jobs terminated with this error:

Created new species: C3HOJ(11865) Created new forwards Intra_R_Add_Endocyclic reaction: C3HOJ(6782) --> C3HOJ(11865) ERROR: Reaction is not balanced: SPC(6782)=SPC(11865) ERROR: Invalid Reaction Structure:SPC(6782)=SPC(11865) ERROR: jing.rxn.InvalidTemplateReactionException at jing.rxn.TemplateReaction.makeTemplateReaction(TemplateReaction.java:416) at jing.rxn.ReactionTemplate.reactOneReactant(ReactionTemplate.java:896) at jing.rxn.ReactionTemplate.reactOneReactant(ReactionTemplate.java:807) at jing.rxn.TemplateReactionGenerator.react(TemplateReactionGenerator.java:134) at jing.rxnSys.RateBasedRME.enlargeReactionModel(RateBasedRME.java:150) at jing.rxnSys.ReactionModelGenerator.enlargeReactionModel(ReactionModelGenerator.java:3938) at jing.rxnSys.ReactionModelGenerator.modelGeneration(ReactionModelGenerator.java:1487) at RMG.main(RMG.java:96)

gmagoon commented 12 years ago

I suspect that this may be related to an error in aromaticity perception, which has produced similar issues in the past. @nickvandewiele, do you agree?

Perhaps you could post the adjacency lists for SPC(6782) and SPC(11865)?

gmagoon commented 12 years ago

I just had a similar issue in my job with a C4H4J species. You can see that it was apparently incorrectly aromatized:

*****Error in Gaussian log file: Error termination via Lnk1e in /opt/g03/l1.exe at Thu Nov  3 17:33:36 2011.
*****Final attempt (#36) on species ITPIBAHFTRGDDL-UHFFFAOYAZ (InChI=1/C4H5/c1-4-2-3-4/h2-3H,1H3) failed.
ChemFormula: C4H4J
1  C 0 {2,S} {5,S} {6,S} {9,S}
2  C 0 {3,B} {4,B} {1,S}
3  C 0 {2,B} {4,B} {8,S}
4  C 0 {3,B} {2,B} {7,S}
5  H 0 {1,S}
6  H 0 {1,S}
7  H 0 {4,S}
8  H 0 {3,S}
9  H 0 {1,S}

HBI-based thermo for GOSMMPKSWSOPRZ-UHFFFAOYAD(InChI=1/C4H4/c1-4-2-3-4/h2-3H,1H2): 1036.4       -4.74   0.75    0.6     0.13    -0.42       -1.41   -2.18   -2.18
Warning: Falling back to group additivity due to repeated failure in QMTP calculations
Warning: Transport group not found: 2
Warning: Transport group not found: 3
Warning: Transport group not found: 4
Created new species: C4H3J(733)
Created new forwards Intra_R_Add_Endocyclic reaction: H2CCCCH(27) --> C4H3J(733)
ERROR: Reaction is not balanced: SPC(27)=C4H3J(733)
ERROR: Invalid Reaction Structure:SPC(27)=C4H3J(733)
ERROR: jing.rxn.InvalidTemplateReactionException
    at jing.rxn.TemplateReaction.makeTemplateReaction(TemplateReaction.java:416)
    at jing.rxn.ReactionTemplate.reactOneReactant(ReactionTemplate.java:896)
    at jing.rxn.ReactionTemplate.reactOneReactant(ReactionTemplate.java:807)
    at jing.rxn.TemplateReactionGenerator.react(TemplateReactionGenerator.java:134)
    at jing.rxn.TemplateReactionGenerator.react(TemplateReactionGenerator.java:79)
    at jing.rxnSys.ReactionModelGenerator.initializeCoreEdgeModel(ReactionModelGenerator.java:3642)
    at jing.rxnSys.ReactionModelGenerator.initializeCoreEdgeReactionModel(ReactionModelGenerator.java:3917)
    at jing.rxnSys.ReactionModelGenerator.modelGeneration(ReactionModelGenerator.java:1331)
    at RMG.main(RMG.java:96)

Any ideas for fixes, @mrharper and @nickvandewiele? If not, I'm thinking about trying to resurrect Sandeep's aromaticity perception approach.

ezanoelo commented 12 years ago

Greg, Thank you for your answer. I am just trying to understand the nomenclature used in the RMG to define the chemical structure of a specie. However, because I believe this specie is not important in our model, I removed it and its entire family from the model. Perhaps, I will have to fix the error in the future.


From: gmagoon [reply@reply.github.com] Sent: Thursday, November 03, 2011 6:32 PM To: Everton Zanoelo Subject: Re: [RMG-Java] reaction no balanced error for intra_R_Add_endocyclic reactions (#225)

I just had a similar issue in my job with a C4H4J species. You can see that it was apparently incorrectly aromatized:

*****Error in Gaussian log file: Error termination via Lnk1e in /opt/g03/l1.exe at Thu Nov  3 17:33:36 2011.
*****Final attempt (#36) on species ITPIBAHFTRGDDL-UHFFFAOYAZ (InChI=1/C4H5/c1-4-2-3-4/h2-3H,1H3) failed.
ChemFormula: C4H4J
1  C 0 {2,S} {5,S} {6,S} {9,S}
2  C 0 {3,B} {4,B} {1,S}
3  C 0 {2,B} {4,B} {8,S}
4  C 0 {3,B} {2,B} {7,S}
5  H 0 {1,S}
6  H 0 {1,S}
7  H 0 {4,S}
8  H 0 {3,S}
9  H 0 {1,S}

HBI-based thermo for GOSMMPKSWSOPRZ-UHFFFAOYAD(InChI=1/C4H4/c1-4-2-3-4/h2-3H,1H2): 1036.4       -4.74   0.75    0.6     0.13    -0.42       -1.41   -2.18   -2.18
Warning: Falling back to group additivity due to repeated failure in QMTP calculations
Warning: Transport group not found: 2
Warning: Transport group not found: 3
Warning: Transport group not found: 4
Created new species: C4H3J(733)
Created new forwards Intra_R_Add_Endocyclic reaction: H2CCCCH(27) --> C4H3J(733)
ERROR: Reaction is not balanced: SPC(27)=C4H3J(733)
ERROR: Invalid Reaction Structure:SPC(27)=C4H3J(733)
ERROR: jing.rxn.InvalidTemplateReactionException
    at jing.rxn.TemplateReaction.makeTemplateReaction(TemplateReaction.java:416)
    at jing.rxn.ReactionTemplate.reactOneReactant(ReactionTemplate.java:896)
    at jing.rxn.ReactionTemplate.reactOneReactant(ReactionTemplate.java:807)
    at jing.rxn.TemplateReactionGenerator.react(TemplateReactionGenerator.java:134)
    at jing.rxn.TemplateReactionGenerator.react(TemplateReactionGenerator.java:79)
    at jing.rxnSys.ReactionModelGenerator.initializeCoreEdgeModel(ReactionModelGenerator.java:3642)
    at jing.rxnSys.ReactionModelGenerator.initializeCoreEdgeReactionModel(ReactionModelGenerator.java:3917)
    at jing.rxnSys.ReactionModelGenerator.modelGeneration(ReactionModelGenerator.java:1331)
    at RMG.main(RMG.java:96)

Any ideas for fixes, @mrharper and @nickvandewiele? If not, I'm thinking about trying to resurrect Sandeep's aromaticity perception approach.


Reply to this email directly or view it on GitHub: https://github.com/GreenGroup/RMG-Java/issues/225#issuecomment-2624191

nickvandewiele commented 12 years ago

If the error is thrown based on RMG-Java at the latest commit, the "Reaction not balanced" error definitely smells like an aromaticity perception error due to the incorrect addition/deletion of implicit hydrogens.

Anyways, the aro percept. algo was never tested for C4s; only for a couple of C6/C7/C5s. See previous commit messages / issues for this.

I will have a look at it in the coming days.

nickvandewiele commented 12 years ago

@gmagoon,

I just tried InChI=1/C4H5/c1-4-2-3-4/h2-3H,1H3 with the adjacency list:

C4H5 1 C 0 {2,S} 2 C 1 {1,S} {3,S} {4,S} 3 C 0 {2,S} {4,D} 4 C 0 {2,S} {3,D}

and it returned the following (succesful) ThermoDataEstimator job:


[Console output redirected to file:C:\Documents and Settings\nmvdewie\My Documents\workspaces\myForkedProjectsWorkspace\RMG-Java\propellanes.log]
Note: Overriding default MAX_CARBON_NUM with user-defined value: 10
Note: Overriding default MAX_OXYGEN_NUM with user-defined value: 10
Note: Overriding default MAX_RADICAL_NUM with user-defined value: 10
Note: Overriding default MAX_SULFUR_NUM with user-defined value: 10
Note: Overriding default MAX_SILICON_NUM with user-defined value: 10
Note: Overriding default MAX_HEAVYATOM_NUM with user-defined value: 100
Note: Overriding default MAX_CYCLE_NUM with user-defined value: 10
Reading Primary Thermo Library: RMG-minimal

Reading thermo database from C:\Documents and Settings\nmvdewie\My Documents\workspaces\myForkedProjectsWorkspace\RMG-Java/databases/RMG_database/thermo_groups\
Reading thermochemistry groups
Reading radical correction groups
Reading ring correction groups
Reading other correction groups
Reading gauche and 1/5 correction groups
ThreeMember
ThreeMember
Cyclopropene
Value for Stack: 1
ThreeMember
Cyclopropene
ThreeMember
Value for Stack: 1

Reading Lennard-Jones database from C:\Documents and Settings\nmvdewie\My Documents\workspaces\myForkedProjectsWorkspace\RMG-Java/databases/RMG_database/transport_groups\

Created new species: C4H5(1)
ChemFormula: C4H5J
1  C 0 {2,S} {5,S} {6,S} {7,S}
2  C 0 {3,S} {4,D} {1,S}
3  C 1 {2,S} {4,S} {8,S}
4  C 0 {2,D} {3,S} {9,S}
5  H 0 {1,S}
6  H 0 {1,S}
7  H 0 {1,S}
8  H 0 {3,S}
9  H 0 {4,S}

The number of resonance isomers is 2
The NASA data is 
!Estimated by RMG using Group Additivity
!Group:Cs-(Cds-Cds)HHH  Group:Cds-CdsCsCs   Group:Cs-(Cds-Cds)(Cds-Cds)HH   Group:Cds-CdsCsH    Radical:C=CCJC=C    
C4H5(1)                 C   4H   5          G   250.000  5000.000   995.043    1

 9.77543771E+00 1.26618417E-02-3.79923427E-06 5.25625568E-10-2.77831705E-14    2

 3.75393292E+04-3.03944038E+01 3.20244423E+00 2.02452677E-03 6.81035865E-05    3

-8.50788533E-08 3.08841880E-11 4.06820987E+04 1.05029646E+01                   4

ThermoData is 
83.81   62.97   16.55   21.53   25.77   29.15   34.12   37.6    43.64   
 symmetry number = 3
C4H5J  H = 83.81022422

Done!

I am working with the latest version of RMG-Java...
Could you check if your TDE still generates the error for C4H5 after merging in the latest version on github (GreenGroup)
gmagoon commented 12 years ago

Sorry for the delay in getting back to you...the e-mail notification got lost in a deluge of e-mails. I think the species in question is actually C4H3? (whatever the product of intra r-add endocyclic on H2CCCH is). I'll try to figure out what the C3HO species is...

gmagoon commented 12 years ago

OK...figured out the problematic C4H3 case:

Note: Overriding default MAX_CARBON_NUM with user-defined value: 10
Note: Overriding default MAX_OXYGEN_NUM with user-defined value: 10
Note: Overriding default MAX_RADICAL_NUM with user-defined value: 10
Note: Overriding default MAX_SULFUR_NUM with user-defined value: 10
Note: Overriding default MAX_SILICON_NUM with user-defined value: 10
Note: Overriding default MAX_HEAVYATOM_NUM with user-defined value: 100
Note: Overriding default MAX_CYCLE_NUM with user-defined value: 10
Reading Primary Thermo Library: RMG-minimal

Reading thermo database from c:\Users\User1\RMG-Java/databases/RMG_database/thermo_groups\
Reading thermochemistry groups
Reading radical correction groups
Reading ring correction groups
Reading other correction groups
Reading gauche and 1/5 correction groups

Reading Lennard-Jones database from c:\Users\User1\RMG-Java/databases/RMG_database/transport_groups\

Warning: Transport group not found: 1
Warning: Transport group not found: 2
Warning: Transport group not found: 3
Created new species: C4H3J(1)
ChemFormula: C4H4J
1  C 0 {2,B} {3,B} {8,S}
2  C 0 {1,B} {3,B} {5,S}
3  C 0 {1,B} {2,B} {4,S}
4  C 1 {3,S} {6,S} {7,S}
5  H 0 {2,S}
6  H 0 {4,S}
7  H 0 {4,S}
8  H 0 {1,S}

The number of resonance isomers is 2
The NASA data is 
!Estimated by RMG using Group Additivity
!Group:Cb-H        Group:Cb-H        Group:Cb-Cs        Group:Cs-CbHHH        Radical:Benzyl_P        
C4H3J(1)                C   4H   4          G   250.000  5000.000   995.043    1
 8.51865999E+00 1.24568770E-02-3.68580599E-06 4.96527830E-10-2.55261901E-14    2
 1.52737047E+04-3.50229311E+01 3.21941814E+00 4.54425669E-03 5.22833599E-05    3
-6.65091484E-08 2.42228499E-11 1.77746120E+04-2.21589645E+00                   4

ThermoData is 
38.31        38.29        16.09        20.46        24.13        27.12        31.65        34.85        40.84        
 symmetry number = 4
C4H4J  H = 38.309999999999995

Done!
gmagoon commented 12 years ago

PS...here's what I specified in the input file:

Database: RMG_database

//QM? true/false
false
//method: both/gaussian03/mopac/mm4/mm4hr 
gaussian03
//ForCyclicsOnly? true/false
true
//maxradnumforQM?
0
//CheckConnectivity? off/check/confirm
check

MaxCarbonNumberPerSpecies:     10
MaxOxygenNumberPerSpecies:     10
MaxRadicalNumberPerSpecies:    10
MaxSulfurNumberPerSpecies:     10
MaxSiliconNumberPerSpecies:    10
MaxHeavyAtomNumberPerSpecies: 100
MaxCycleNumberPerSpecies:      10
END

PrimaryThermoLibrary:
Name: RMG-minimal
Location: primaryThermoLibrary
END

C4H3J
1 C 1 {2,D} {3,S}
2 C 0 {1,D} {3,S}
3 C 0 {1,S} {2,S} {4,D}
4 C 0 {3,D}
gmagoon commented 12 years ago

I suspect Everton's C3HOJ species may be this very similar species, which has similar problems:

C3HOJ
1 C 1 {2,D} {3,S}
2 C 0 {1,D} {3,S}
3 C 0 {1,S} {2,S} {4,D}
4 O 0 {3,D}
Created new species: C3HOJ(1)
ChemFormula: C3H2OJ
1  C 0 {2,B} {3,B} {6,S}
2  C 0 {1,B} {3,B} {5,S}
3  C 0 {1,B} {2,B} {4,S}
4  O 1 {3,S}
5  H 0 {2,S}
6  H 0 {1,S}

The number of resonance isomers is 2
The NASA data is 
!Estimated by RMG using Group Additivity
!Group:Cb-H        Group:Cb-H        Group:Cb-Os        Group:Os-CbH        Radical:COJ        
C3HOJ(1)                C   3H   2O   1     G   250.000  5000.000   995.043    1
 9.71629545E+00 5.84107186E-03-1.80011389E-06 2.52488393E-10-1.34284779E-14    2
 5.76099575E+03-3.97684481E+01 3.41098331E+00-5.10190594E-04 5.55583603E-05    3
-7.01917812E-08 2.57289454E-11 8.58504034E+03-1.49503980E+00                   4

ThermoData is 
19.76        39.12        13.7        17.38        20.33        22.54        25.62        27.53        30.38        
 symmetry number = 2
C3H2OJ  H = 19.759999999999998
gmagoon commented 12 years ago

In case it helps, there didn't seem to be an issue when I tried without the substituent on the C3 ring (C3H3J)

gmagoon commented 12 years ago

@ezanoelo , I'm going to merge in the "aromaticityAlt" branch which should hopefully address this; you can turn your intra_R_Add_endocyclic family back on and if you still have problems, please let me know and/or post a new issue.

ezanoelo commented 12 years ago

Thank you. I am going to try to run the model turning the intra_R_Add_endocyclic family on.