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

AssertionError: Expecting one matching reverse reaction, not 0 (in methylformate example) #104

Closed
faribas opened this issue Nov 29, 2012 · 2 comments

Comments

@faribas
Copy link
Contributor

faribas commented Nov 29, 2012

Running the methylformate example I get this on the first iteration:

AssertionError: Expecting one matching reverse reaction, not 0. Forward reaction <Molecule "COC=O"> + <Molecule "[O]"> <=> <Molecule "[OH]"> + <Molecule "[CH2]OC=O"> : Reaction(reactants=[Molecule(SMILES="COC=O"), Molecule(SMILES="[O]")], products=[Molecule(SMILES="[OH]"), Molecule(SMILES="[CH2]OC=O")], degeneracy=3)

Full traceback:

Traceback (most recent call last):
  File "rmg.py", line 144, in <module>
    rmg.execute(args)
  File "/Users/fariba/Code/RMG-Py/rmgpy/rmg/main.py", line 340, in execute
    self.initialize(args)
  File "/Users/fariba/Code/RMG-Py/rmgpy/rmg/main.py", line 305, in initialize
    self.reactionModel.enlarge([spec for spec in self.initialSpecies if spec.reactive])
  File "/Users/fariba/Code/RMG-Py/rmgpy/rmg/model.py", line 551, in enlarge
    newReactions.extend(self.react(database, newSpecies, coreSpecies))
  File "/Users/fariba/Code/RMG-Py/rmgpy/rmg/model.py", line 500, in react
    reactionList.extend(database.kinetics.generateReactions([moleculeA, moleculeB]))
  File "/Users/fariba/Code/RMG-Py/rmgpy/data/kinetics.py", line 3623, in generateReactions
    reactionList.extend(self.generateReactionsFromFamilies(reactants, products))
  File "/Users/fariba/Code/RMG-Py/rmgpy/data/kinetics.py", line 3671, in generateReactionsFromFamilies
    reactionList.extend(family.generateReactions(reactants))
  File "/Users/fariba/Code/RMG-Py/rmgpy/data/kinetics.py", line 2830, in generateReactions
    assert len(reactions) == 1, "Expecting one matching reverse reaction, not {0}. Forward reaction {1!s} : {1!r}".format(len(reactions), rxn)

1,3-hexadiene example (with no oxygen atoms) works OK

@jwallen
Copy link
Contributor

jwallen commented Nov 29, 2012

Whoops, I had fixed this a few days ago - encountered while trying to run DIPK in RMG-Py - but forgot to push the fix to official. Update your RMG-Py and RMG-database to the current official master and try again.

When I run the methylformate example, I get the invalid k(E) error still, which I am looking into. My DIPK model does finish successfully if I restrict pdep to small molecules (below 20 atoms) only, but I'm not sure you have that option for methylformate.

@rwest
Copy link
Member

rwest commented Nov 29, 2012

Thanks. Your update to the database fixed it.

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