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

1,2_NH3_elimination calls decrementLonePairs on atom without any lone pairs? #1706

Closed
rwest opened this issue Aug 26, 2019 · 3 comments
Closed
Labels
abandoned abandoned issue/PR as determined by actions bot stale stale issue/PR as determined by actions bot

Comments

@rwest
Copy link
Member

rwest commented Aug 26, 2019

Bug Description

A job crashed with:

Error: Could not generate product structures for reaction family 1,2_NH3_elimination in forward direction
Reactant structures:
<Molecule "NN[NH+](N)[O-]">
1     O u0 p3 c-1 {2,S}
2  *3 N u0 p0 c+1 {1,S} {3,S} {4,S} {6,S}
3  *2 N u0 p1 c0 {2,S} {5,S} {7,S}
4     N u0 p1 c0 {2,S} {8,S} {9,S}
5  *1 N u0 p1 c0 {3,S} {10,S} {11,S}
6     H u0 p0 c0 {2,S}
7  *4 H u0 p0 c0 {3,S}
8     H u0 p0 c0 {4,S}
9     H u0 p0 c0 {4,S}
10    H u0 p0 c0 {5,S}
11    H u0 p0 c0 {5,S}


Traceback (most recent call last):
  File "/Users/rwest/Code/Cat/RMG-Py/rmg.py", line 185, in <module>
    main()
  File "/Users/rwest/Code/Cat/RMG-Py/rmg.py", line 170, in main
    cProfile.runctx(command, global_vars, local_vars, stats_file)
  File "/Users/rwest/anaconda/envs/rmg241/lib/python2.7/cProfile.py", line 49, in runctx
    prof = prof.runctx(statement, globals, locals)
  File "/Users/rwest/anaconda/envs/rmg241/lib/python2.7/cProfile.py", line 140, in runctx
    exec cmd in globals, locals
  File "<string>", line 1, in <module>
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/main.py", line 866, in execute
    trimolecularReact=self.trimolecularReact)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/model.py", line 590, 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 66, in react
    reactions = map(_react_species_star, spc_fam_tuples)
  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 = getDB('kinetics').generate_reactions_from_families(species_tuple, only_families=only_families)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/database.py", line 527, in generate_reactions_from_families
    reaction_list = find_degenerate_reactions(reaction_list, same_reactants, kinetics_database=self)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/common.py", line 344, in find_degenerate_reactions
    rxn.degeneracy = family.calculateDegeneracy(rxn)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 1821, in calculateDegeneracy
    react_non_reactive=True))
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 1908, in __generateReactions
    productStructures = self.__generateProductStructures(reactantStructures, [map], forward)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 1560, in __generateProductStructures
    productStructures = self.applyRecipe(reactantStructures, forward=forward)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 1349, in applyRecipe
    self.forwardRecipe.applyForward(reactantStructure, unique)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 379, in applyForward
    return self.__apply(struct, True, unique)
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/data/kinetics/family.py", line 369, in __apply
    atom.applyAction(['LOSE_PAIR', label, 1])
  File "rmgpy/molecule/molecule.py", line 458, in rmgpy.molecule.molecule.Atom.applyAction
  File "rmgpy/molecule/molecule.py", line 422, in rmgpy.molecule.molecule.Atom.decrementLonePairs
rmgpy.exceptions.ActionError: Unable to update Atom due to LOSE_PAIR action: Invalid lone electron pairs set "-1".

H6N4O

The species NN[NH+](N)[O-] was made via radical recombination of NN[O] + N[NH]:
NH2NHOJ(36) + NH2NHJ(37) <=> NN[NH+](N)[O-](1574)

How To Reproduce

Try to generate reactions of NN[NH+](N)[O-].
(A quick kinetics search on the website will confirm the error)

Expected Behavior

It wouldn't crash.

Installation Information

Describe your installation method and system information.

@alongd
Copy link
Member

alongd commented Aug 26, 2019

Thanks!
The fix should be this: ReactionMechanismGenerator/RMG-database#350. @mjohnson541, let's get it in

@rwest
Copy link
Member Author

rwest commented Aug 26, 2019

Thanks! I should have checked the database for issues.

@github-actions
Copy link

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 github-actions bot added the stale stale issue/PR as determined by actions bot label Jun 21, 2023
@github-actions github-actions bot added the abandoned abandoned issue/PR as determined by actions bot label Jul 22, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned abandoned issue/PR as determined by actions bot stale stale issue/PR as determined by actions bot
Projects
None yet
Development

No branches or pull requests

2 participants