Open mazeau opened 5 years ago
this is the notebook I started working on
If you want to load the just the thermo groups file, you should create a ThermoGroups
instance: https://reactionmechanismgenerator.github.io/RMG-Py/reference/data/thermogroups.html#rmgpy.data.thermo.ThermoGroups. This is where the load and save entry methods are defined.
It might be easier to load the full thermo database though, which would also allow you to test getThermoData()
directly. See here for code snippets to load the database.
same error for [CH2-][O+]=C=[Ni]
Error after trying to run ethylene butene things
File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmg.py", line 173, in <module>
main()
File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmg.py", line 158, in main
cProfile.runctx(command, global_vars, local_vars, stats_file)
File "/home/mazeau.e/anaconda2/envs/rmg_env3/lib/python2.7/cProfile.py", line 49, in runctx
prof = prof.runctx(statement, globals, locals)
File "/home/mazeau.e/anaconda2/envs/rmg_env3/lib/python2.7/cProfile.py", line 140, in runctx
exec cmd in globals, locals
File "<string>", line 1, in <module>
File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/rmg/main.py", line 850, in execute
trimolecularReact=self.trimolecularReact)
File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/rmg/model.py", line 690, in enlarge
self.processNewReactions([rxn], spc)
File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/rmg/model.py", line 812, in processNewReactions
rxn, isNew = self.makeNewReaction(rxn)
File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/rmg/model.py", line 505, in makeNewReaction
products = [self.makeNewSpecies(product)[0] for product in forward.products ]
File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/rmg/model.py", line 373, in makeNewSpecies
submit(spec,self.solventName)
File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/thermo/thermoengine.py", line 188, in submit
spc.thermo = submit_(evaluator, spc, solventName= solventName)
File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/scoop_framework/util.py", line 171, in submit_
return func(*args, **kwargs)
File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/thermo/thermoengine.py", line 174, in evaluator
thermo = generateThermoData(spc,solventName=solventName)
File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/thermo/thermoengine.py", line 138, in generateThermoData
thermo0 = thermodb.getThermoData(spc)
File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/data/thermo.py", line 1130, in getThermoData
thermo0 = self.getThermoDataForSurfaceSpecies(species)
File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/data/thermo.py", line 1411, in getThermoDataForSurfaceSpecies
self.__addGroupThermoData(adsorptionThermo, self.groups['adsorptionPt'], molecule, {})
File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/data/thermo.py", line 2183, in __addGroupThermoData
raise DatabaseError('Unable to determine thermo parameters for {0}: no data for node {1} or any of its ancestors.'.format(molecule, node0) )
rmgpy.exceptions.DatabaseError: Unable to determine thermo parameters for <Molecule "[CH2]C(=C)[Pt]">: no data for node R* or any of its ancestors.```
Think I'm seeing something similar.
I was getting...
thermo0 = self.get_thermo_data_for_surface_species(species)
File "/scratch/r.west/RMG-Py/rmgpy/data/thermo.py", line 1500, in get_thermo_data_for_surface_species
self._add_group_thermo_data(adsorption_thermo, self.groups['adsorptionPt'], molecule, {})
File "/scratch/r.west/RMG-Py/rmgpy/data/thermo.py", line 2330, in _add_group_thermo_data
'any of its ancestors.'.format(molecule, node0) )
rmgpy.exceptions.DatabaseError: Unable to determine thermo parameters for <Molecule "*N=O">: no data for node R* or any of its ancestors.
so I added more informative error logging in https://github.com/rwest/RMG-Py/commit/270e5fc0788ded20f4192f096d5e7fa03c800ce6 to print the full adjacency list.
Generating thermo for new species...
Error: Couldn't find in adsorption thermo database:
Error: <Molecule "*N=O">
Error: multiplicity 2
1 O u0 p2 c0 {2,D}
2 N u0 p1 c0 {1,D} {3,S}
3 X u1 p0 c0 {2,S}
Why on earth does the X have an unpaired electron?
Yeah, what is going on with this?
Is some gas phase reaction family being applied and making the radical or something? Where does it come from? Need to see what made that species.
I can go back and rerun the last commit I made before July 22? Though I have a hunch it's one of the surface families that doesn't have any forbidden species I'll look at it tomorrow or the next day
Before just running something again, add extra debugging traps, like putting
assert not self.is_surface_site(), "Attempted to increment radical count of a surface site."
in Atom.increment_radical
. (eg. https://github.com/rwest/RMG-Py/commit/b6b8751ef53b0fa475ac40d4d9ae6b0c1f967419 )
I just ran it with that and got
Traceback (most recent call last):
File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/react.py", line 79, in _react_species_star
return react_species(*args)
File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/react.py", line 94, in react_species
reactions = get_db('kinetics').generate_reactions_from_families(species_tuple, only_families=only_families)
File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/database.py", line 543, in generate_reactions_from_families
successful = family.add_reverse_attribute(rxn)
File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 1721, in add_reverse_attribute
ensure_independent_atom_ids(rxn.products)
File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/common.py", line 214, in ensure_independent_atom_ids
species.generate_resonance_structures(keep_isomorphic=True)
File "rmgpy/species.py", line 266, in rmgpy.species.Species.generate_resonance_structures
File "rmgpy/species.py", line 276, in rmgpy.species.Species.generate_resonance_structures
File "rmgpy/molecule/molecule.py", line 2092, in rmgpy.molecule.molecule.Molecule.generate_resonance_structures
File "rmgpy/molecule/molecule.py", line 2094, in rmgpy.molecule.molecule.Molecule.generate_resonance_structures
File "rmgpy/molecule/resonance.py", line 150, in rmgpy.molecule.resonance.generate_resonance_structures
File "rmgpy/molecule/resonance.py", line 235, in rmgpy.molecule.resonance.generate_resonance_structures
File "rmgpy/molecule/resonance.py", line 244, in rmgpy.molecule.resonance._generate_resonance_structures
File "rmgpy/molecule/resonance.py", line 280, in rmgpy.molecule.resonance._generate_resonance_structures
File "rmgpy/molecule/resonance.py", line 311, in rmgpy.molecule.resonance.generate_allyl_delocalization_resonance_structures
File "rmgpy/molecule/resonance.py", line 328, in rmgpy.molecule.resonance.generate_allyl_delocalization_resonance_structures
File "rmgpy/molecule/molecule.py", line 414, in rmgpy.molecule.molecule.Atom.increment_radical
AssertionError: Attempted to increment radical count of a surface site.
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/rwest/Code/Cat/RMG-Py/rmg.py", line 111, in <module>
main()
File "/Users/rwest/Code/Cat/RMG-Py/rmg.py", line 96, in main
cProfile.runctx(command, global_vars, local_vars, stats_file)
File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/cProfile.py", line 20, in runctx
filename, sort)
File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/profile.py", line 62, in runctx
prof.runctx(statement, globals, locals)
File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/cProfile.py", line 100, in runctx
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/main.py", line 891, in execute
trimolecular_react=self.trimolecular_react)
File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/model.py", line 595, in enlarge
procnum=procnum)
File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/react.py", line 172, in react_all
return react(spc_fam_tuples, procnum), [fam_tuple[0] for fam_tuple in spc_fam_tuples]
File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/react.py", line 70, in react
reactions = p.map(_react_species_star, spc_fam_tuples)
File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/pool.py", line 268, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/Users/rwest/anaconda/envs/rmg3/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
AssertionError: Attempted to increment radical count of a surface site.
which reveals it's not a reaction recipe that's making the radical surface but the resonance structure generation, specifically rmgpy.molecule.resonance.generate_allyl_delocalization_resonance_structures
Total error message:
This has happened in 7 models... and it's always only for that one molecule. However, putting that species in the list of species to include in the core in the Pt(111)/base input file does not raise this error. It should definitely match the C-*R3 node in the adsorptionPt tree.
I tried to see if it was a problem with the tree itself in a jupyter notebook, but it turns out, according to the RMG website
and I didn't feel like doing that so I couldn't test to see how far that molecule could descend the tree :(