@@ -1868,7 +1868,7 @@ def add_reverse_attribute(self, rxn, react_non_reactive=True):
18681868 "\n " .format (len (reactions ), self .label , str (rxn )))
18691869 # raise KineticsError("Did not find reverse reaction in reaction family {0} for reaction "
18701870 # "{1}.".format(self.label, str(rxn)))
1871- return False
1871+ return True
18721872 elif (len (reactions ) > 1 and
18731873 not all ([reactions [0 ].is_isomorphic (other , strict = False , check_template_rxn_products = True )
18741874 for other in reactions ])):
@@ -1931,7 +1931,9 @@ def calculate_degeneracy(self, reaction, resonance=True):
19311931 logging .error (('Unable to calculate degeneracy for reaction {0} '
19321932 'in reaction family {1}. Expected 1 reaction '
19331933 'but generated {2}' ).format (reaction , self .label , len (reactions )))
1934- return 1
1934+ if not len (reactions ):
1935+ return 1
1936+ reactions [0 ].degeneracy = 1
19351937 return reactions [0 ].degeneracy
19361938
19371939 def _generate_reactions (self , reactants , products = None , forward = True , prod_resonance = True ,
@@ -4760,7 +4762,7 @@ def average_kinetics(kinetics_list):
47604762 average log A (geometric average)
47614763 """
47624764 if type (kinetics_list [0 ]) not in [Arrhenius ,SurfaceChargeTransfer ,ArrheniusChargeTransfer ,Marcus ]:
4763- raise Exception ('Invalid kinetics type {0!r} for {1!r}.' . format ( type ( kinetics ), self ) )
4765+ raise Exception ('Invalid kinetics type' )
47644766
47654767 Aunits = kinetics_list [0 ].A .units
47664768 if Aunits in {'cm^3/(mol*s)' , 'cm^3/(molecule*s)' , 'm^3/(molecule*s)' }:
0 commit comments