-
Notifications
You must be signed in to change notification settings - Fork 229
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
Could improve diagnostic error messages to fix user/database errors #2030
Comments
Also error messages like "Reaction ___ in kinetics library ___ was not balanced!" could be much worse (yay!), but could be even better, eg. could state what the imbalance is, and/or print the adjacency lists. |
There are also different molecules errors: 1. If the reactant contained H2O: 2. If the reactant contained O2: |
Helps address #2030 which shows that sometimes you hit a DatabaseError bug and don't know where it came from.
If there's a problem making a species or estimating its thermochemistry it can be helpful to know where the species came from to help debugging. This will report the reaction that was being processed when the species was made and where it came from, e.g. the kinetics library, seed mechanism, or reaction family. Then it will raise the original error as if nothing happened. Helps address #2030.
Helps address #2030 which shows that sometimes you hit a DatabaseError bug and don't know where it came from.
If there's a problem making a species or estimating its thermochemistry it can be helpful to know where the species came from to help debugging. This will report the reaction that was being processed when the species was made and where it came from, e.g. the kinetics library, seed mechanism, or reaction family. Then it will raise the original error as if nothing happened. Helps address #2030.
Thanks! I really appreciate it! Error: Could not update atomtypes for this molecule:
multiplicity -187
1 *4 N u0 p1 c+1 {2,D}
2 *6 X u0 p0 c0 {1,D}
Error: Problem family: Surface_Adsorption_Abstraction_vdW
Error: Problem reactants: (Molecule(smiles="N#N.[Pt]"), Molecule(smiles="[Pt]N=N"))
Traceback (most recent call last):
File "/Users/lee.ting/Code/RMG-Py/rmg.py", line 118, in <module>
main()
File "/Users/lee.ting/Code/RMG-Py/rmg.py", line 112, in main
rmg.execute(**kwargs)
File "/Users/lee.ting/Code/RMG-Py/rmgpy/rmg/main.py", line 922, in execute
trimolecular_react=self.trimolecular_react)
File "/Users/lee.ting/Code/RMG-Py/rmgpy/rmg/model.py", line 595, in enlarge
procnum=procnum)
File "/Users/lee.ting/Code/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/lee.ting/Code/RMG-Py/rmgpy/rmg/react.py", line 66, in react
reactions = list(map(_react_species_star, spc_fam_tuples))
File "/Users/lee.ting/Code/RMG-Py/rmgpy/rmg/react.py", line 79, in _react_species_star
return react_species(*args)
File "/Users/lee.ting/Code/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/lee.ting/Code/RMG-Py/rmgpy/data/kinetics/database.py", line 534, in generate_reactions_from_families
prod_resonance=resonance))
File "/Users/lee.ting/Code/RMG-Py/rmgpy/data/kinetics/database.py", line 561, in react_molecules
prod_resonance=prod_resonance))
File "/Users/lee.ting/Code/RMG-Py/rmgpy/data/kinetics/family.py", line 1710, in generate_reactions
self._generate_reactions(reactants, products=products, forward=True, prod_resonance=prod_resonance))
File "/Users/lee.ting/Code/RMG-Py/rmgpy/data/kinetics/family.py", line 1993, in _generate_reactions
[map_b, map_a], forward)
File "/Users/lee.ting/Code/RMG-Py/rmgpy/data/kinetics/family.py", line 1588, in _generate_product_structures
product_structures = self.apply_recipe(reactant_structures, forward=forward)
File "/Users/lee.ting/Code/RMG-Py/rmgpy/data/kinetics/family.py", line 1517, in apply_recipe
struct.update(sort_atoms=not self.save_order)
File "rmgpy/molecule/molecule.py", line 1130, in rmgpy.molecule.molecule.Molecule.update
File "rmgpy/molecule/molecule.py", line 1355, in rmgpy.molecule.molecule.Molecule.update_atomtypes
File "rmgpy/molecule/molecule.py", line 1350, in rmgpy.molecule.molecule.Molecule.update_atomtypes
File "rmgpy/molecule/atomtype.py", line 729, in rmgpy.molecule.atomtype.get_atomtype
File "rmgpy/molecule/atomtype.py", line 757, in rmgpy.molecule.atomtype.get_atomtype
rmgpy.exceptions.AtomTypeError: Unable to determine atom type for atom N+, which has 0 single bonds, 1 double bonds (0 to O, 0 to S, 1 others), 0 triple bonds, 0 quadruple bonds, 0 benzene bonds, 1 lone pairs, and +1 charge. Is it similar to issues#213? (But the Nitrogen version) |
Could you include some earlier lines from the log, leading up to that message? The problem is in |
Sure! Some earlier lines...
|
If there's a problem making a species or estimating its thermochemistry it can be helpful to know where the species came from to help debugging. This will report the reaction that was being processed when the species was made and where it came from, e.g. the kinetics library, seed mechanism, or reaction family. Then it will raise the original error as if nothing happened. Helps address #2030.
Helps address #2030 which shows that sometimes you hit a DatabaseError bug and don't know where it came from.
If there's a problem making a species or estimating its thermochemistry it can be helpful to know where the species came from to help debugging. This will report the reaction that was being processed when the species was made and where it came from, e.g. the kinetics library, seed mechanism, or reaction family. Then it will raise the original error as if nothing happened. Helps address #2030.
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. |
Motivation or Problem
Error messages like this one
are not very helpful to fix the problem(s) in the database or input file (or RMG, if indeed that was the cause).
Desired Solution
Error handling in various strategic places could, when handling an exception and about to crash, report things like
The text was updated successfully, but these errors were encountered: