@@ -1992,7 +1992,7 @@ def _generate_reactions(self, reactants, products=None, forward=True, prod_reson
19921992 specified reactants and products within this family.
19931993 Degenerate reactions are returned as separate reactions.
19941994 """
1995-
1995+ check_spin = True
19961996 rxn_list = []
19971997
19981998 # Wrap each reactant in a list if not already done (this is done to
@@ -2048,7 +2048,9 @@ def _generate_reactions(self, reactants, products=None, forward=True, prod_reson
20482048 pass
20492049 else :
20502050 if product_structures is not None :
2051- rxn = self ._create_reaction (reactant_structures , product_structures , forward )
2051+ if self .label in allowed_spin_violation_families :
2052+ check_spin = False
2053+ rxn = self ._create_reaction (reactant_structures , product_structures , forward , check_spin = check_spin )
20522054 if rxn :
20532055 rxn_list .append (rxn )
20542056 # Bimolecular reactants: A + B --> products
@@ -2091,7 +2093,9 @@ def _generate_reactions(self, reactants, products=None, forward=True, prod_reson
20912093 pass
20922094 else :
20932095 if product_structures is not None :
2094- rxn = self ._create_reaction (reactant_structures , product_structures , forward )
2096+ if self .label in allowed_spin_violation_families :
2097+ check_spin = False
2098+ rxn = self ._create_reaction (reactant_structures , product_structures , forward , check_spin = check_spin )
20952099 if rxn :
20962100 rxn_list .append (rxn )
20972101
@@ -2115,8 +2119,9 @@ def _generate_reactions(self, reactants, products=None, forward=True, prod_reson
21152119 pass
21162120 else :
21172121 if product_structures is not None :
2118- rxn = self ._create_reaction (reactant_structures , product_structures ,
2119- forward )
2122+ if self .label in allowed_spin_violation_families :
2123+ check_spin = False
2124+ rxn = self ._create_reaction (reactant_structures , product_structures , forward , check_spin = check_spin )
21202125 if rxn :
21212126 rxn_list .append (rxn )
21222127
@@ -2169,7 +2174,9 @@ def _generate_reactions(self, reactants, products=None, forward=True, prod_reson
21692174 pass
21702175 else :
21712176 if product_structures is not None :
2172- rxn = self ._create_reaction (reactant_structures , product_structures , forward )
2177+ if self .label in allowed_spin_violation_families :
2178+ check_spin = False
2179+ rxn = self ._create_reaction (reactant_structures , product_structures , forward , check_spin = check_spin )
21732180 if rxn :
21742181 rxn_list .append (rxn )
21752182 else :
@@ -2234,7 +2241,9 @@ def _generate_reactions(self, reactants, products=None, forward=True, prod_reson
22342241 pass
22352242 else :
22362243 if product_structures is not None :
2237- rxn = self ._create_reaction (reactant_structures , product_structures , forward )
2244+ if self .label in allowed_spin_violation_families :
2245+ check_spin = False
2246+ rxn = self ._create_reaction (reactant_structures , product_structures , forward , check_spin = check_spin )
22382247 if rxn :
22392248 rxn_list .append (rxn )
22402249
@@ -4926,3 +4935,5 @@ def get_site_solute_data(rxn):
49264935 return site_data
49274936 else :
49284937 return None
4938+
4939+ allowed_spin_violation_families = ['1,2-Birad_to_alkene' ,'1,4_Cyclic_birad_scission' ,'1,4_Linear_birad_scission' ]
0 commit comments