ReactionMechanismGenerator / AutoTST

AutoTST: A framework to perform automated transition state theory calculations
Other
32 stars 16 forks source link

`ActionError` and `IndexError` while trying to get transition states of H abstraction reactions from importer #47

Closed skrsna closed 4 years ago

skrsna commented 4 years ago

I'm getting the following errors while trying to get a TS object. Action Error for this reaction CC1=C[CH]C=CC1=O+CCCCO_CC1=CC=CC=C1O+CCC[CH]O1

ActionError                               Traceback (most recent call last)
<ipython-input-160-bddd08767730> in <module>
----> 1 rxn.get_labeled_reaction()

~/Code/RMG-Py3/AutoTST/autotst/reaction.py in get_labeled_reaction(self)
    337                 try:
    338                     labeled_r, labeled_p = family.get_labeled_reactants_and_products(
--> 339                         test_reaction.reactants, test_reaction.products)
    340                 except ValueError:
    341                     continue

~/Code/RMG-Py3/RMG-Py/rmgpy/data/kinetics/family.py in get_labeled_reactants_and_products(self, reactants, products)
   2672         # raise exception
   2673         if num_mappings > 0:
-> 2674             raise ActionError('Something wrong with products that RMG cannot find a match!')
   2675 
   2676         return None, None

ActionError: Something wrong with products that RMG cannot find a match!

while IndexError for this reaction C1=CC=C(C=CC2=CC=CC=C2)C=C1+[O]O_C(=CC1=CC=CC=C1)=C1C=C[CH]C=C1+OO

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-164-a9a69e534d3e> in <module>
----> 1 rxn.ts

~/Code/RMG-Py3/AutoTST/autotst/reaction.py in ts(self)
    116         if self._ts is None:
    117             ts_dict = {}
--> 118             for direction, complex in self.get_rmg_complexes().items():
    119                 ts = TS(
    120                     reaction_label=self.label,

~/Code/RMG-Py3/AutoTST/autotst/reaction.py in get_rmg_complexes(self)
    521 
    522         if self.rmg_reaction is None:
--> 523             self.get_labeled_reaction()
    524 
    525         reactant_complex = RMGMolecule()

~/Code/RMG-Py3/AutoTST/autotst/reaction.py in get_labeled_reaction(self)
    337                 try:
    338                     labeled_r, labeled_p = family.get_labeled_reactants_and_products(
--> 339                         test_reaction.reactants, test_reaction.products)
    340                 except ValueError:
    341                     continue

~/Code/RMG-Py3/RMG-Py/rmgpy/data/kinetics/family.py in get_labeled_reactants_and_products(self, reactants, products)
   2631             # get mappings in forward direction
   2632             mappings_a = self._match_reactant_to_template(molecule_a, template.reactants[0].item)
-> 2633             mappings_b = self._match_reactant_to_template(molecule_b, template.reactants[1].item)
   2634             mappings = list(itertools.product(mappings_a, mappings_b))
   2635             # get 
mappings in the reverse direction

IndexError: list index out of range

Both of these errors can be traced back to family.py in rmgpy. The reactions in question are scraped from importer project and were able to make a transition state in py2. I'm seeing these errors after we updated to py3.

nateharms commented 4 years ago

Addressed in #48.