ReactionMechanismGenerator / RMG-Py

Python version of the amazing Reaction Mechanism Generator (RMG).
http://reactionmechanismgenerator.github.io/RMG-Py/
Other
396 stars 228 forks source link

Reaction Degeneracy #977

Closed amarkpayne closed 7 years ago

amarkpayne commented 7 years ago

Same as the issue discussed at the end of #961.

Error: Reactant: Molecule(SMILES="CC1C=CC=CC=1")
Error: Reactant: Molecule(SMILES="CCCCCCCCC[CH]C1:C:C2C=CC:1:C:C:2")
Error: Product: Molecule(SMILES="CCCCCCCCCC(c1cc2C=Cc1cc2)C1C=CC=C[C]1C")
Traceback (most recent call last):
  File "/home/ampayne/RMG/RMG-Py/rmgpy/scoop_framework/util.py", line 112, in __
call__
    return self.myfn(*args, **kwargs)
  File "/home/ampayne/RMG/RMG-Py/rmgpy/rmg/react.py", line 96, in reactMolecules
    rxns = family.generateReactions(molecules)
  File "/home/ampayne/RMG/RMG-Py/rmgpy/data/kinetics/family.py", line 1376, in g
enerateReactions
    reactionList.extend(self.__generateReactions(reactants, forward=False))
  File "/home/ampayne/RMG/RMG-Py/rmgpy/data/kinetics/family.py", line 1627, in _
_generateReactions
    reaction.degeneracy = self.calculateDegeneracy(reaction)
  File "/home/ampayne/RMG/RMG-Py/rmgpy/data/kinetics/family.py", line 1393, in c
alculateDegeneracy
    'but generated {2}').format(reaction, self.label, len(reactions)))
KineticsError: Unable to calculate degeneracy for reaction <Molecule "CC1C=CC=CC
=1"> + <Molecule "CCCCCCCCC[CH]c1cc2C=Cc1cc2"> <=> <Molecule "CCCCCCCCCC(C1:C:C2
C=CC:1:C:C:2)C1C=CC=C[C]1C"> in reaction family R_Addition_MultipleBond. Expecte
d 1 reaction but generated 2

Traceback (most recent call last):
  File "/home/ampayne/RMG/RMG-Py/rmg.py", line 156, in <module>
    rmg.execute(**kwargs)
  File "/home/ampayne/RMG/RMG-Py/rmgpy/rmg/main.py", line 665, in execute
    bimolecularReact=self.bimolecularReact)
  File "/home/ampayne/RMG/RMG-Py/rmgpy/rmg/model.py", line 621, in enlarge
    rxns = reactAll(self.core.species, numOldCoreSpecies, unimolecularReact, bim
olecularReact)
  File "/home/ampayne/RMG/RMG-Py/rmgpy/rmg/react.py", line 155, in reactAll
    rxns = list(react(*spcTuples))
  File "/home/ampayne/RMG/RMG-Py/rmgpy/rmg/react.py", line 75, in react
    combos
  File "/home/ampayne/RMG/RMG-Py/rmgpy/scoop_framework/util.py", line 154, in map_
    return map(WorkerWrapper(args[0]), *args[1:], **kwargs)
  File "/opt/anaconda/envs/rmg_env/lib/python2.7/site-packages/scoop-0.7.2.0-py2.7.egg/scoop/fallbacks.py", line 49, in wrapper
  File "/home/ampayne/RMG/RMG-Py/rmgpy/scoop_framework/util.py", line 112, in __call__
    return self.myfn(*args, **kwargs)
  File "/home/ampayne/RMG/RMG-Py/rmgpy/rmg/react.py", line 96, in reactMolecules
    rxns = family.generateReactions(molecules)
  File "/home/ampayne/RMG/RMG-Py/rmgpy/data/kinetics/family.py", line 1376, in generateReactions
    reactionList.extend(self.__generateReactions(reactants, forward=False))
  File "/home/ampayne/RMG/RMG-Py/rmgpy/data/kinetics/family.py", line 1627, in __generateReactions
    reaction.degeneracy = self.calculateDegeneracy(reaction)
  File "/home/ampayne/RMG/RMG-Py/rmgpy/data/kinetics/family.py", line 1393, in calculateDegeneracy
    'but generated {2}').format(reaction, self.label, len(reactions)))
rmgpy.data.kinetics.common.KineticsError: Unable to calculate degeneracy for reaction <Molecule "CC1C=CC=CC=1"> + <Molecule "CCCCCCCCC[CH]c1cc2C=Cc1cc2"> <=> <Molecule "CCCCCCCCCC(C1:C:C2C=CC:1:C:C:2)C1C=CC=C[C]1C"> in reaction family R_Addition_MultipleBond. Expected 1 reaction but generated 2
mliu49 commented 7 years ago

See #876 for discussion related to this issue.

amarkpayne commented 7 years ago

This error went away when I cherry-picked the commits listed in #971, as erroneous species like this were never generated in the first place. Therefore, I'll close this issue.