ReactionMechanismGenerator / RMG-Py

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

KeyError: 'Node not found for atom {\'*\': <Atom \'C....\'>} in molecule <Molecule "[C]"> in thermo database radical.' #2332

Closed Fraixxer closed 2 years ago

Fraixxer commented 2 years ago

This error is occurring for the methylformate example

Reading input file "/home/francis/RMG/OW/methylformate1/input.py"...

Data sources

database( thermoLibraries = ['primaryThermoLibrary','DFT_QCI_thermo','GRI-Mech3.0'], reactionLibraries = [('Methylformate',False),('Glarborg/highP',False)], seedMechanisms = ['Glarborg/C2'], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O','!surface','!surface_development'], kineticsEstimator = 'rate rules', )

generatedSpeciesConstraints( allowed = ['seed mechanisms','reaction libraries', 'input species'], )

List of species

species( label='Mfmt', reactive=True, structure=SMILES("COC=O"), ) species( label='O2', reactive=True, structure=SMILES("[O][O]"), ) species( label='C2H', reactive=True, structure=SMILES("C#[C]"), )

Note that CH is globally forbidden in the reaction families. However this species will

react if it is found in one of the reaction libraries or seed mechanisms. It is explicitly

allowed in the generatedSpeciesConstraints.

species( label='CH', reactive=True, structure=adjacencyList( """ 1 C u3 p0 {2,S} 2 H u0 p0 {1,S} """), ) species( label='H2O', reactive=True, structure=SMILES("O"), ) species( label='H2', reactive=True, structure=SMILES("[H][H]"), ) species( label='CO', reactive=True, structure=SMILES("[C-]#[O+]"), ) species( label='CO2', reactive=True, structure=SMILES("C(=O)=O"), ) species( label='CH4', reactive=True, structure=SMILES("C"), ) species( label='CH3', reactive=True, structure=SMILES("[CH3]"), ) species( label='CH3OH', reactive=True, structure=SMILES("CO"), ) species( label='C2H4', reactive=True, structure=SMILES("C=C"), ) species( label='C2H2', reactive=True, structure=SMILES("C#C"), ) species( label='CH2O', reactive=True, structure=SMILES("C=O"), ) species( label='CH3CHO', reactive=True, structure=SMILES("CC=O"), )

Bath gas

species( label='Ar', reactive=False, structure=InChI("InChI=1S/Ar"), )

Reaction systems

simpleReactor( temperature=(650,'K'), pressure=(1.0,'bar'), initialMoleFractions={ "Mfmt": 0.01, "O2": 0.02, "Ar": 0.08, }, terminationTime=(0.5,'s'), ) simpleReactor( temperature=(1350,'K'), pressure=(3.0,'bar'), initialMoleFractions={ "Mfmt": 0.01, "O2": 0.02, "Ar": 0.97, }, terminationTime=(0.5,'s'), ) simpleReactor( temperature=(1950,'K'), pressure=(10.0,'bar'), initialMoleFractions={ "Mfmt": 0.01, "O2": 0.02, "Ar": 0.97, }, terminationTime=(0.5,'s'), )

simulator( atol=1e-22, rtol=1e-8, )

model( toleranceKeepInEdge=1e-5, toleranceMoveToCore=0.0005, toleranceInterruptSimulation=1.0, maximumEdgeSpecies=100000 )

pressureDependence( method='modified strong collision', # 'reservoir state' maximumGrainSize=(1.0,'kcal/mol'), minimumNumberOfGrains=200, temperatures=(290,3500,'K',8), pressures=(0.02,100,'bar',5), interpolation=('Chebyshev', 6, 4), maximumAtoms=16, )

options( units='si', generateOutputHTML=False, generatePlots=False, saveSimulationProfiles=False, saveEdgeSpecies=True, )

Warning: Initial mole fractions do not sum to one; normalizing.

Original composition: Mfmt = 0.01 O2 = 0.02 Ar = 0.08

Normalized mole fractions: Mfmt = 0.09090909090909091 O2 = 0.18181818181818182 Ar = 0.7272727272727273

Warning: Edge species saving was turned on. This will slow down model generation for large simulations.

650 K 1350 K 1950 K Loading transport library from NOx2018.py in /home/francis/anaconda3/envs/rmg_env/share/rmgdatabase/transport/libraries...Loading transport library from After model enlargement: The model core has 57 species and 389 reactions The model edge has 15 species and 103 reactions

Initialization complete. Starting model generation.

Generating initial reactions... For reaction generation 1 process is used. Generating thermo for new species... Species [CH]C renamed CHCH3(T) based on thermo library name Species [CH2][CH2] renamed C2H4(T) based on thermo library name Species [CH]O renamed HCOH(T) based on thermo library name Species [C]=C renamed H2CC(T) based on thermo library name Species [CH]=[CH] renamed C2H2(T) based on thermo library name Species [CH]C=O renamed ketene(T) based on thermo library name Species C=[C]O renamed CH2COH based on thermo library name Species O renamed O(S) based on thermo library name Species [CH]=COO renamed CHCHOOH based on thermo library name Species C1=CO1 renamed oxirene based on thermo library name Species O=[C]C=O renamed OCHCO based on thermo library name Species O=C=CO renamed hydroxyketene based on thermo library name Species [O]CCO renamed HOCH2CH2O based on thermo library name Species O=CCO renamed HOCH2CHO based on thermo library name Species O=CO renamed formic_acid based on thermo library name Species [CH]C renamed CHCH3(S) based on thermo library name Species [O]CC=O renamed OCH2CHO based on thermo library name Species CO[CH]O renamed CH3OCHOH based on thermo library name Species COC[O] renamed CH3OCH2O based on thermo library name Error: Couldn't find in radical thermo database: Error: <Molecule "[C]"> Error: multiplicity 5 1 C u4 p0 c0

Traceback (most recent call last): File "/home/francis/anaconda3/envs/rmg_env/bin/rmg.py", line 118, in main() File "/home/francis/anaconda3/envs/rmg_env/bin/rmg.py", line 112, in main rmg.execute(*kwargs) File "/home/francis/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/rmg/main.py", line 733, in execute trimolecular_react=self.trimolecular_react) File "/home/francis/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/rmg/model.py", line 614, in enlarge self.apply_thermo_to_species(procnum) File "/home/francis/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/rmg/model.py", line 824, in apply_thermo_to_species self.generate_thermo(spc, rename=True) File "/home/francis/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/rmg/model.py", line 831, in generate_thermo submit(spc, self.solvent_name) File "/home/francis/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/thermo/thermoengine.py", line 175, in submit spc.thermo = evaluator(spc, solvent_name=solvent_name) File "/home/francis/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/thermo/thermoengine.py", line 160, in evaluator thermo = generate_thermo_data(spc, solvent_name=solvent_name) File "/home/francis/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/thermo/thermoengine.py", line 125, in generate_thermo_data thermo0 = thermodb.get_thermo_data(spc) File "/home/francis/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/data/thermo.py", line 1365, in get_thermo_data tdata = self.estimate_radical_thermo_via_hbi(molecule, self.get_thermo_data_from_libraries) File "/home/francis/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/data/thermo.py", line 2051, in estimate_radical_thermo_via_hbi self._add_group_thermo_data(thermo_data, self.groups['radical'], saturated_struct, {'': atom}) File "/home/francis/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/data/thermo.py", line 2511, in _add_group_thermo_data raise KeyError(f'Node not found for atom {atom} in molecule {molecule} in thermo database {database.label}.') KeyError: 'Node not found for atom {\'*\': <Atom \'C....\'>} in molecule <Molecule "[C]"> in thermo database radical.'

mjohnson541 commented 2 years ago

This is occurring because RMG's group additivity algorithm isn't suitable for estimating the thermochemistry of a quad-rad like [C]. You need to include a thermo library that has [C] in it.

Fraixxer commented 2 years ago

Thanks