RMG-Py icon indicating copy to clipboard operation
RMG-Py copied to clipboard

An error when run a case about pyrolysis of CH4+H2S. KeyError: 'Node not found for atom {\'*\': <Atom \'S....-\'>} in molecule <Molecule "[S-](=C)[SH+]#C"> in thermo database radical.'

Open ZhouDongXi opened this issue 3 years ago • 1 comments

Bug Description

Here is the error information. After model enlargement: The model core has 39 species and 474 reactions The model edge has 266 species and 7388 reactions For reaction generation 1 process is used. Generating thermo for new species... Error: Couldn't find in radical thermo database: Error: <Molecule "S-[SH+]#C"> Error: multiplicity 5 1 S u0 p0 c+1 {2,S} {4,T} {5,S} 2 S u4 p0 c-1 {1,S} {3,D} 3 C u0 p0 c0 {2,D} {6,S} {7,S} 4 C u0 p0 c0 {1,T} {8,S} 5 H u0 p0 c0 {1,S} 6 H u0 p0 c0 {3,S} 7 H u0 p0 c0 {3,S} 8 H u0 p0 c0 {4,S} Traceback (most recent call last): File "/home/zhou/anaconda3/envs/rmg_env/bin/rmg.py", line 118, in main() File "/home/zhou/anaconda3/envs/rmg_env/bin/rmg.py", line 112, in main rmg.execute(**kwargs) File "/home/zhou/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/rmg/main.py", line 923, in execute trimolecular_react=self.trimolecular_react) File "/home/zhou/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/zhou/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/zhou/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/zhou/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/zhou/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/zhou/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/zhou/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/data/thermo.py", line 1402, in get_thermo_data thermo0 = self.get_thermo_data_from_groups(species) File "/home/zhou/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/data/thermo.py", line 1872, in get_thermo_data_from_groups tdata = self.estimate_thermo_via_group_additivity(molecule) File "/home/zhou/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/data/thermo.py", line 2108, in estimate_thermo_via_group_additivity thermo_data = self.estimate_radical_thermo_via_hbi(molecule, self.compute_group_additivity_thermo) File "/home/zhou/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/zhou/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 'S....-'>} in molecule <Molecule "S-[SH+]#C"> in thermo database radical.'

How To Reproduce

Here is the input.py. database( thermoLibraries = ['primaryThermoLibrary','SulfurLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = 'default', kineticsEstimator = 'rate rules', ) species( label='H2S', reactive=True, structure=adjacencyList( """ 1 S u0 p2 c0 {2,S} {3,S} 2 H u0 p0 c0 {1,S} 3 H u0 p0 c0 {1,S} """ ), ) species( label='CH4', reactive=True,
structure=SMILES("[CH4]"), ) species( label='N2', reactive=False, structure=SMILES('N#N'), ) simpleReactor( temperature=(1400,'K'), pressure=(1,'bar'), initialMoleFractions={ "H2S": 0.0175, "CH4": 0.0245, "N2": 0.958, }, terminationConversion={ 'H2S': 0.85, }, terminationTime=(1000,'s'), ) simulator( atol=1e-16, rtol=1e-8, ) model( toleranceKeepInEdge=1E-8, toleranceMoveToCore=0.01, toleranceInterruptSimulation=0.01, maximumEdgeSpecies=100000 ) options( units='si', saveRestartPeriod=None, generateOutputHTML=True, generatePlots=False, saveEdgeSpecies=False, saveSimulationProfiles=False, ) generatedSpeciesConstraints( allowed=['input species','seed mechanisms','reaction libraries'], maximumCarbonAtoms=12, maximumSulfurAtoms=2, #maximumHeavyAtoms=10, #maximumRadicalElectrons=10, )

Installation Information

  • OS (include version if known): Ubuntu 18 in VMware
  • Installation method: installation from binary , with anaconda)
    • RMG-Py: 3.1.0
    • RMG-database: 3.1.0

ZhouDongXi avatar Jan 10 '22 06:01 ZhouDongXi

I'm honestly more amazed that whatever made this species made it into core than that this species existed. Are you sure you need a 1.0e-8 tolerance? I think that's causing it to add some crazy species that are reacting to make this super crazy species RMG can't handle.

mjohnson541 avatar Jan 13 '22 14:01 mjohnson541

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[bot] avatar Jun 21 '23 22:06 github-actions[bot]