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

DatabaseError: Unable to determine thermo parameters for <Molecule "C#CC=C[Ni]">: no data for node R* or any of its ancestors #70

Open
mazeau opened this issue Mar 23, 2019 · 9 comments

Comments

@mazeau
Copy link

mazeau commented Mar 23, 2019

Total error message:

Traceback (most recent call last):
  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 844, in execute
    trimolecularReact=self.trimolecularReact)
  File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/rmg/model.py", line 688, in enlarge
    self.processNewReactions([rxn], spc)
  File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/rmg/model.py", line 810, in processNewReactions
    rxn, isNew = self.makeNewReaction(rxn)
  File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/rmg/model.py", line 502, in makeNewReaction
    reactants = [self.makeNewSpecies(reactant)[0] for reactant in forward.reactants]
  File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/rmg/model.py", line 371, 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 1414, in getThermoDataForSurfaceSpecies
    self.__addGroupThermoData(adsorptionThermo, self.groups['adsorptionPt'], molecule, {})
  File "/scratch/westgroup/mazeau/Cat/RMG-Py/rmgpy/data/thermo.py", line 2186, 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 "C#CC=C[Ni]">: no data for node R* or any of its ancestors.

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

You must derive from this class and implement the loadEntry(), saveEntry(),
processOldLibraryEntry(), and generateOldLibraryEntry() methods in order to
load and save from the new and old database formats.

and I didn't feel like doing that so I couldn't test to see how far that molecule could descend the tree :(

@rwest rwest added this to the Merge to master hackathon milestone Apr 1, 2019
@mazeau
Copy link
Author

mazeau commented Apr 1, 2019

Untitled.ipynb.zip

this is the notebook I started working on

@mliu49
Copy link

mliu49 commented Apr 22, 2019

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.

@mazeau
Copy link
Author

mazeau commented Apr 24, 2019

same error for [CH2-][O+]=C=[Ni]

@mazeau
Copy link
Author

mazeau commented Jul 22, 2019

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.```

@rwest
Copy link
Collaborator

rwest commented Nov 16, 2019

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 rwest@270e5fc 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?

@mazeau
Copy link
Author

mazeau commented Nov 16, 2019

Yeah, what is going on with this?

@rwest
Copy link
Collaborator

rwest commented Nov 16, 2019

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.

@mazeau
Copy link
Author

mazeau commented Nov 16, 2019

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

@rwest
Copy link
Collaborator

rwest commented Nov 17, 2019

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. rwest@b6b8751 )

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants