From 5678d236f40362b9cb886939828f027f41983f56 Mon Sep 17 00:00:00 2001 From: Anna Doner Date: Mon, 12 Aug 2024 16:59:46 -0400 Subject: [PATCH 1/5] reset to main, then added check for reversibility before treating a reaction as pdep --- rmgpy/rmg/model.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rmgpy/rmg/model.py b/rmgpy/rmg/model.py index ee6795806b..1b77a4b929 100644 --- a/rmgpy/rmg/model.py +++ b/rmgpy/rmg/model.py @@ -858,6 +858,8 @@ def process_new_reactions(self, new_reactions, new_species, pdep_network=None, g pdep = rxn.generate_high_p_limit_kinetics() elif any([any([x.is_subgraph_isomorphic(q) for q in self.unrealgroups]) for y in rxn.reactants + rxn.products for x in y.molecule]): pdep = False + elif not rxn.reversible: + pdep = False # If pressure dependence is on, we only add reactions that are not unimolecular; # unimolecular reactions will be added after processing the associated networks From e7df20b3488142b79cb884f73fdc3eba9455a004 Mon Sep 17 00:00:00 2001 From: Anna Doner Date: Tue, 17 Dec 2024 15:24:00 -0500 Subject: [PATCH 2/5] resolved merge conflict --- rmgpy/data/kinetics/family.py | 33 +++++++++++++++++++++++++++-- rmgpy/molecule/molecule.py | 15 ++++++++++++++ rmgpy/molecule/util.py | 39 +++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+), 2 deletions(-) diff --git a/rmgpy/data/kinetics/family.py b/rmgpy/data/kinetics/family.py index 43e3836169..1a339bebdf 100644 --- a/rmgpy/data/kinetics/family.py +++ b/rmgpy/data/kinetics/family.py @@ -213,6 +213,31 @@ def copy(self): other.is_forward = self.is_forward return other + + def check_if_spin_allowed(self): + # get the combined spin for reactants and products + reactants_combined_spin, products_combined_spin = self.calculate_combined_spin() + # check if there are any matches for combined spin between reactants and products + if reactants_combined_spin.intersection(products_combined_spin) != set([]): + return True + else: + logging.debug(f"Reactants combined spin is {reactants_combined_spin}, but the products combined spin is {products_combined_spin}") + return False + + def calculate_combined_spin(self): + if len(self.reactants) == 1: + reactant_combined_spin = {self.reactants[0].multiplicity} + elif len(self.reactants) == 2: + reactant_combined_spin = set([self.reactants[0].multiplicity + self.reactants[1].multiplicity -1, np.abs(self.reactants[0].multiplicity-self.reactants[1].multiplicity)+1]) + else: + return None + if len(self.products) == 1: + product_combined_spin = {self.products[0].multiplicity} + elif len(self.products) == 2: + product_combined_spin = set([self.products[0].multiplicity + self.products[1].multiplicity -1, np.abs(self.products[0].multiplicity-self.products[1].multiplicity)+1]) + else: + return None + return reactant_combined_spin, product_combined_spin def apply_solvent_correction(self, solvent): """ @@ -1678,7 +1703,7 @@ def is_molecule_forbidden(self, molecule): return False - def _create_reaction(self, reactants, products, is_forward): + def _create_reaction(self, reactants, products, is_forward, check_spin = True): """ Create and return a new :class:`Reaction` object containing the provided `reactants` and `products` as lists of :class:`Molecule` @@ -1713,7 +1738,11 @@ def _create_reaction(self, reactants, products, is_forward): for key, species_list in zip(['reactants', 'products'], [reaction.reactants, reaction.products]): for species in species_list: reaction.labeled_atoms[key] = dict(reaction.labeled_atoms[key], **species.get_all_labeled_atoms()) - + if check_spin: + if not reaction.check_if_spin_allowed(): + logging.warn("Did not create the following reaction, which violates conservation of spin...") + logging.warn(str(reaction)) + return None return reaction def _match_reactant_to_template(self, reactant, template_reactant): diff --git a/rmgpy/molecule/molecule.py b/rmgpy/molecule/molecule.py index 5e02476550..dd9fc1afac 100644 --- a/rmgpy/molecule/molecule.py +++ b/rmgpy/molecule/molecule.py @@ -59,6 +59,7 @@ from rmgpy.molecule.kekulize import kekulize from rmgpy.molecule.pathfinder import find_shortest_path from rmgpy.molecule.fragment import CuttingLabel +from rmgpy.molecule.util import generate_closed_shell_singlet, generate_singlet_diradicals ################################################################################ @@ -3005,6 +3006,20 @@ def get_desorbed_molecules(self): logging.debug("After removing from surface:\n" + desorbed_molecule.to_adjacency_list()) return desorbed_molecules + def update_to_closed_shell_singlet(self): + for i in range(len(self.atoms)): + self.atoms[i].id = i + assert self.multiplicity == 1 and self.get_radical_count()>0 + radical_center_ids = [x.id for x in self.atoms if x.radical_electrons > 0] + # remove radicals from radical centers (2) + for radical_center_id in radical_center_ids: + self.atoms[radical_center_id].decrement_radical() + # add removed radicals (2) to one of the radical sites as a lone pair (1) + self.atoms[radical_center_ids[0]].increment_lone_pairs() + # pick the best resonance structure + self.generate_resonance_structures() + self.reactive = True + # this variable is used to name atom IDs so that there are as few conflicts by # using the entire space of integer objects diff --git a/rmgpy/molecule/util.py b/rmgpy/molecule/util.py index d1093f4582..1c3da1653b 100644 --- a/rmgpy/molecule/util.py +++ b/rmgpy/molecule/util.py @@ -179,3 +179,42 @@ def swap(to_be_swapped, sample): new_partner = (to_be_swapped - sample).pop() return central, original, new_partner + +def generate_closed_shell_singlet(m: Molecule): + for i in range(len(m.atoms)): + m.atoms[i].id = i + assert m.multiplicity == 1 and m.get_radical_count()>0 + radical_center_ids = [x.id for x in m.atoms if x.radical_electrons > 0] + # remove radicals from radical centers (2) + for radical_center_id in radical_center_ids: + m.atoms[radical_center_id].decrement_radical() + # add removed radicals (2) to one of the radical sites as a lone pair (1) + m.atoms[radical_center_ids[0]].increment_lone_pairs() + # pick the best resonance structure + print([x.smiles for x in m.generate_resonance_structures()]) + return m.generate_resonance_structures()[0] + +def generate_singlet_diradicals(m: Molecule): + for i in range(len(m.atoms)): + m.atoms[i].id = i + + singlet_diradicals = [] + for edge in m.get_all_edges(): + + M = m.copy(deep=True) + if edge.get_order_num() > 1: # find a pi bond + atom1_id = edge.atom1.id + atom2_id = edge.atom2.id + M.atoms[atom1_id].increment_radical() # add a radical to each atom of the pi bond + M.atoms[atom2_id].increment_radical() + M.get_bond(M.atoms[atom1_id], M.atoms[atom2_id]).decrement_order() # remove 1 pi bond + potential_singlet_diradicals = M.generate_resonance_structures() # generate resonance structures + + for potential_singlet_diradical in potential_singlet_diradicals: # find all resonance structures with non-neighboring radical sites + radical_center_ids = sorted([x.id for x in potential_singlet_diradical.atoms if x.radical_electrons==1]) + potential_singlet_diradical_edges = potential_singlet_diradical.get_all_edges() + potential_singlet_diradical_edge_ids = [sorted([x.atom1.id, x.atom2.id]) for x in potential_singlet_diradical_edges] + if radical_center_ids not in potential_singlet_diradical_edge_ids: + if potential_singlet_diradical not in singlet_diradicals: + singlet_diradicals.append(potential_singlet_diradical) + return singlet_diradicals \ No newline at end of file From 207dac0bef49c5bc57e2915debf857ce2e038791 Mon Sep 17 00:00:00 2001 From: Anna Doner Date: Fri, 23 Aug 2024 17:18:23 -0400 Subject: [PATCH 3/5] added exception families --- rmgpy/data/kinetics/family.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/rmgpy/data/kinetics/family.py b/rmgpy/data/kinetics/family.py index 1a339bebdf..456085fb81 100644 --- a/rmgpy/data/kinetics/family.py +++ b/rmgpy/data/kinetics/family.py @@ -1992,7 +1992,7 @@ def _generate_reactions(self, reactants, products=None, forward=True, prod_reson specified reactants and products within this family. Degenerate reactions are returned as separate reactions. """ - + check_spin = True rxn_list = [] # 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 pass else: if product_structures is not None: - rxn = self._create_reaction(reactant_structures, product_structures, forward) + if self.label in allowed_spin_violation_families: + check_spin = False + rxn = self._create_reaction(reactant_structures, product_structures, forward, check_spin = check_spin) if rxn: rxn_list.append(rxn) # Bimolecular reactants: A + B --> products @@ -2091,7 +2093,9 @@ def _generate_reactions(self, reactants, products=None, forward=True, prod_reson pass else: if product_structures is not None: - rxn = self._create_reaction(reactant_structures, product_structures, forward) + if self.label in allowed_spin_violation_families: + check_spin = False + rxn = self._create_reaction(reactant_structures, product_structures, forward, check_spin = check_spin) if rxn: rxn_list.append(rxn) @@ -2115,8 +2119,9 @@ def _generate_reactions(self, reactants, products=None, forward=True, prod_reson pass else: if product_structures is not None: - rxn = self._create_reaction(reactant_structures, product_structures, - forward) + if self.label in allowed_spin_violation_families: + check_spin = False + rxn = self._create_reaction(reactant_structures, product_structures, forward, check_spin = check_spin) if rxn: rxn_list.append(rxn) @@ -2169,7 +2174,9 @@ def _generate_reactions(self, reactants, products=None, forward=True, prod_reson pass else: if product_structures is not None: - rxn = self._create_reaction(reactant_structures, product_structures, forward) + if self.label in allowed_spin_violation_families: + check_spin = False + rxn = self._create_reaction(reactant_structures, product_structures, forward, check_spin = check_spin) if rxn: rxn_list.append(rxn) else: @@ -2234,7 +2241,9 @@ def _generate_reactions(self, reactants, products=None, forward=True, prod_reson pass else: if product_structures is not None: - rxn = self._create_reaction(reactant_structures, product_structures, forward) + if self.label in allowed_spin_violation_families: + check_spin = False + rxn = self._create_reaction(reactant_structures, product_structures, forward, check_spin = check_spin) if rxn: rxn_list.append(rxn) @@ -4926,3 +4935,5 @@ def get_site_solute_data(rxn): return site_data else: return None + +allowed_spin_violation_families =['1,2-Birad_to_alkene','1,4_Cyclic_birad_scission','1,4_Linear_birad_scission'] \ No newline at end of file From eb901ecd1dc3c4f1c49bd87f0e1b39850a1698e4 Mon Sep 17 00:00:00 2001 From: Anna Doner Date: Tue, 17 Sep 2024 11:45:00 -0400 Subject: [PATCH 4/5] added decay for 26 nonphysical species --- rmgpy/rmg/decay.py | 456 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 455 insertions(+), 1 deletion(-) diff --git a/rmgpy/rmg/decay.py b/rmgpy/rmg/decay.py index 4ffd821514..2b05e8765e 100644 --- a/rmgpy/rmg/decay.py +++ b/rmgpy/rmg/decay.py @@ -47,7 +47,461 @@ ['LOSE_RADICAL', '*1','1'], ['GAIN_RADICAL','*3','1'] ])), - ] + +(Group().from_adjacency_list(""" +multiplicity [3] +1 O u0 p3 c-1 {2,S} +2 *1 N u0 p0 c+1 {1,S} {3,S} {5,S} {6,S} +3 *2 N u1 p1 c0 {2,S} {4,S} +4 O u0 p2 c0 {3,S} {7,S} +5 *3 N u1 p1 c0 {2,S} {8,S} +6 H u0 p0 c0 {2,S} +7 H u0 p0 c0 {4,S} +8 H u0 p0 c0 {5,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*1', 1, '*2'], + ['CHANGE_BOND', '*1', 1, '*3'], + ['LOSE_RADICAL', '*3','1'], + ['GAIN_RADICAL','*2','1'] + ])), + + +(Group().from_adjacency_list(""" +multiplicity [1] +1 *3 O u0 p3 c-1 {2,S} +2 *5 N u0 p0 c+1 {1,S} {3,S} {5,S} {6,S} +3 *4 N u0 p1 c0 {2,S} {4,D} +4 *1 N u0 p1 c0 {3,D} {7,S} +5 H u0 p0 c0 {2,S} +6 H u0 p0 c0 {2,S} +7 *2 H u0 p0 c0 {4,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*1', 1, '*2'], + ['BREAK_BOND', '*4', 1, '*5'], + ['FORM_BOND', '*2', 1, '*3'], + ['CHANGE_BOND', '*1', 1, '*4'], + ['LOSE_PAIR', '*3', 1], + ['GAIN_PAIR', '*5', 1], + + ])), +(Group().from_adjacency_list(""" +multiplicity [1] +1 *5 N u0 p2 c-1 {2,S} {5,S} +2 *4 O u0 p2 c0 {1,S} {3,S} +3 *3 O u0 p2 c0 {2,S} {4,S} +4 *2 N u0 p1 c0 {3,S} {5,S} {6,S} +5 *1 N u0 p0 c+1 {1,S} {4,S} {7,S} {8,S} +6 H u0 p0 c0 {4,S} +7 H u0 p0 c0 {5,S} +8 H u0 p0 c0 {5,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*3', 1, '*4'], + ['BREAK_BOND', '*1', 1, '*2'], + ['CHANGE_BOND', '*2', 1, '*3'], + ['CHANGE_BOND', '*5', 1, '*4'], + ['LOSE_PAIR', '*5', 1], + ['GAIN_PAIR', '*1', 1], + + ])), + +(Group().from_adjacency_list(""" +multiplicity [2] +1 *4 O u0 p2 c0 {2,S} {6,S} +2 *3 N u0 p1 c0 {1,S} {3,D} +3 *1 N u0 p0 c+1 {2,D} {4,S} {5,S} +4 *6 O u0 p2 c0 {3,S} {7,S} +5 *2 N u1 p2 c-1 {3,S} +6 *5 H u0 p0 c0 {1,S} +7 H u0 p0 c0 {4,S} +"""), + ReactionRecipe(actions=[ + ['FORM_BOND', '*5', 1, '*6'], + ['BREAK_BOND', '*1', 1, '*6'], + ['BREAK_BOND', '*1', 2, '*3'], + ['BREAK_BOND', '*4', 1, '*5'], + ['CHANGE_BOND', '*3', 1, '*4'], + ['CHANGE_BOND', '*1', 2, '*2'], + ['GAIN_RADICAL', '*3', '1'], + ['LOSE_RADICAL', '*2', '1'], + ['LOSE_PAIR', '*2', 1], + ['GAIN_PAIR', '*1', 1], + + + ])), + +(Group().from_adjacency_list(""" +multiplicity [3] +1 *1 N u2 p1 c0 {2,S} +2 *2 N u0 p1 c0 {1,S} {3,S} {5,S} +3 *3 N u0 p1 c0 {2,S} {4,S} {6,S} +4 O u0 p2 c0 {3,S} {5,S} +5 *4 O u0 p2 c0 {2,S} {4,S} +6 H u0 p0 c0 {3,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*2', 1, '*3'], + ['BREAK_BOND', '*2', 1, '*4'], + ['CHANGE_BOND', '*1',2,'*2'], + ['LOSE_RADICAL','*1',2], + ['GAIN_RADICAL','*3',1], + ['GAIN_RADICAL','*4',1], + + + ])), +(Group().from_adjacency_list(""" +multiplicity [3] +1 *1 N u2 p1 c0 {2,S} +2 *2 O u0 p2 c0 {1,S} {3,S} +3 *3 O u0 p2 c0 {2,S} {4,S} +4 H u0 p0 c0 {3,S} +"""), + ReactionRecipe(actions=[ + ['CHANGE_BOND', '*1',1,'*2'], + ['BREAK_BOND', '*2',1,'*3'], + ['LOSE_RADICAL','*1',1], + ['GAIN_RADICAL','*3',1], + ])), + + +(Group().from_adjacency_list(""" +multiplicity [1] +1 *1 N u0 p2 c-1 {2,D} +2 *2 N u0 p0 c+1 {1,D} {3,S} {4,S} +3 *4 O u0 p2 c0 {2,S} {4,S} +4 *3 N u0 p1 c0 {2,S} {3,S} {5,S} +5 O u0 p2 c0 {4,S} {6,S} +6 H u0 p0 c0 {5,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*2',1,'*4'], + ['CHANGE_BOND','*3',1,'*4'], + ['GAIN_PAIR','*2',1], + ['LOSE_PAIR','*3',1], + + ])), + +(Group().from_adjacency_list(""" +multiplicity [1] +1 *1 N u0 p2 c-1 {2,S} {5,S} +2 *2 N u0 p0 c+1 {1,S} {3,S} {4,S} {6,S} +3 *3 N u0 p1 c0 {2,S} {4,S} {7,S} +4 *4 O u0 p2 c0 {2,S} {3,S} +5 H u0 p0 c0 {1,S} +6 H u0 p0 c0 {2,S} +7 H u0 p0 c0 {3,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*2',1,'*4'], + ['CHANGE_BOND','*3',1,'*4'], + ['GAIN_PAIR','*2',1], + ['LOSE_PAIR','*3',1], + + ])), + +(Group().from_adjacency_list(""" +multiplicity [1] +1 *1 O u0 p3 c-1 {2,S} +2 *2 N u0 p0 c+1 {1,S} {3,S} {5,S} {6,S} +3 *3 N u0 p1 c0 {2,S} {4,D} +4 *4 N u0 p1 c0 {3,D} {7,S} +5 O u0 p2 c0 {2,S} {8,S} +6 H u0 p0 c0 {2,S} +7 *5 H u0 p0 c0 {4,S} +8 H u0 p0 c0 {5,S} +"""), + ReactionRecipe(actions=[ + ['FORM_BOND', '*1',1,'*5'], + ['BREAK_BOND','*4',1,'*5'], + ['CHANGE_BOND','*3',1,'*4'], + ['BREAK_BOND','*2',1,'*3'], + ['GAIN_PAIR','*2',1], + ['LOSE_PAIR','*1',1], + + ])), + +(Group().from_adjacency_list(""" +multiplicity [3] +1 *1 N u1 p2 c-1 {2,S} +2 *2 N u0 p0 c+1 {1,S} {3,S} {4,S} {5,S} +3 O u1 p2 c0 {2,S} +4 N u0 p1 c0 {2,S} {5,S} {6,S} +5 *3 O u0 p2 c0 {2,S} {4,S} +6 H u0 p0 c0 {4,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND','*2',1,'*3'], + ['CHANGE_BOND', '*1',1,'*2'], + ['GAIN_RADICAL','*3',1], + ['LOSE_RADICAL','*1',1], + + ])), + +(Group().from_adjacency_list(""" +multiplicity [1] +1 *1 N u0 p1 c0 {2,D} {6,S} +2 *5 N u0 p1 c0 {1,D} {3,S} +3 *4 O u0 p2 c0 {2,S} {4,S} +4 *3 N u0 p1 c0 {3,S} {5,D} +5 O u0 p2 c0 {4,D} +6 *2 H u0 p0 c0 {1,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND','*4',1,'*5'], + ['BREAK_BOND', '*1',1,'*2'], + ['FORM_BOND','*2',1,'*3'], + ['GAIN_PAIR','*4',1], + ['CHANGE_BOND','*1',1,'*5'], + ['LOSE_PAIR','*3',1], + + ])), + +(Group().from_adjacency_list(""" +multiplicity [1] +1 N u0 p2 c-1 {2,D} +2 *1 N u0 p0 c+1 {1,D} {3,S} {4,S} +3 *2 N u0 p1 c0 {2,S} {4,S} {5,S} +4 *3 O u0 p2 c0 {2,S} {3,S} +5 H u0 p0 c0 {3,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND','*1',1,'*3'], + ['CHANGE_BOND','*2',1,'*3'], + ['GAIN_PAIR','*1',1], + ['LOSE_PAIR','*2',1], + + ])), +(Group().from_adjacency_list(""" +multiplicity [3] +1 *1 N u1 p1 c0 {2,S} {5,S} +2 *2 N u0 p1 c0 {1,S} {3,D} +3 *3 N u0 p1 c0 {2,D} {4,S} +4 *4 O u1 p2 c0 {3,S} +5 H u0 p0 c0 {1,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND','*2',2,'*3'], + ['CHANGE_BOND','*4',1,'*3'], + ['CHANGE_BOND','*1',1,'*2'], + ['GAIN_RADICAL','*3',1], + ['LOSE_RADICAL','*4',1], + ['GAIN_RADICAL','*2',1], + ['LOSE_RADICAL','*1',1], + + ])), +(Group().from_adjacency_list(""" +multiplicity [1] +1 *1 O u0 p3 c-1 {2,S} +2 *2 N u0 p0 c+1 {1,S} {3,S} {4,S} {6,S} +3 *3 O u0 p2 c0 {2,S} {4,S} +4 *4 N u0 p1 c0 {2,S} {3,S} {5,S} +5 *5 N u0 p1 c0 {4,S} {7,S} {8,S} +6 H u0 p0 c0 {2,S} +7 H u0 p0 c0 {5,S} +8 H u0 p0 c0 {5,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*2',1,'*3'], + ['BREAK_BOND', '*2',1,'*4'], + ['CHANGE_BOND', '*3',1,'*4'], + ['CHANGE_BOND', '*1',1,'*2'], + ['LOSE_PAIR','*1',1], + ['GAIN_PAIR','*2',1], + + ])), +(Group().from_adjacency_list(""" +multiplicity [2] +1 *2 N u0 p2 c-1 {2,S} {4,S} +2 *3 N u0 p0 c+1 {1,S} {3,S} {5,S} {6,S} +3 N u0 p1 c0 {2,S} {7,S} {8,S} +4 *1 O u1 p2 c0 {1,S} +5 H u0 p0 c0 {2,S} +6 H u0 p0 c0 {2,S} +7 H u0 p0 c0 {3,S} +8 H u0 p0 c0 {3,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*2',1,'*3'], + ['CHANGE_BOND', '*1',1,'*2'], + ['LOSE_RADICAL','*1',1], + ['GAIN_RADICAL','*2',1], + ['LOSE_PAIR','*2',1], + ['GAIN_PAIR','*3',1], + ])), +(Group().from_adjacency_list(""" +multiplicity [1] +1 *1 N u0 p2 c-1 {2,S} {6,S} +2 *2 N u0 p0 c+1 {1,S} {3,S} {7,S} {8,S} +3 *4 O u0 p2 c0 {2,S} {4,S} +4 N u0 p1 c0 {3,S} {5,D} +5 O u0 p2 c0 {4,D} +6 H u0 p0 c0 {1,S} +7 *3 H u0 p0 c0 {2,S} +8 H u0 p0 c0 {2,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*2',1,'*3'], + ['BREAK_BOND', '*2',1,'*4'], + ['FORM_BOND','*3',1,'*4'], + ['CHANGE_BOND', '*1',1,'*2'], + ['LOSE_PAIR','*1',1], + ['GAIN_PAIR','*2',1], + ])), +(Group().from_adjacency_list(""" +multiplicity [3] +1 *3 N u2 p1 c0 {2,S} +2 *2 N u0 p1 c0 {1,S} {3,S} {5,S} +3 *4 N u0 p1 c0 {2,S} {4,D} +4 O u0 p2 c0 {3,D} +5 *1 O u0 p2 c0 {2,S} {6,S} +6 H u0 p0 c0 {5,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*2',1,'*1'], + ['BREAK_BOND', '*2',1,'*4'], + ['CHANGE_BOND', '*3',2,'*2'], + ['LOSE_RADICAL','*3',2], + ['GAIN_RADICAL','*1',1], + ['GAIN_RADICAL','*4',1], + ])), + +(Group().from_adjacency_list(""" +multiplicity [1] +1 *2 N u0 p2 c-1 {2,S} {5,S} +2 *3 O u0 p2 c0 {1,S} {3,S} +3 *4 N u0 p1 c0 {2,S} {4,S} {6,S} +4 *5 O u0 p2 c0 {3,S} {5,S} +5 *1 N u0 p0 c+1 {1,S} {4,S} {7,S} {8,S} +6 H u0 p0 c0 {3,S} +7 H u0 p0 c0 {5,S} +8 H u0 p0 c0 {5,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*5',1,'*1'], + ['BREAK_BOND', '*3',1,'*4'], + ['CHANGE_BOND', '*4',1,'*5'], + ['CHANGE_BOND', '*2',1,'*3'], + ['LOSE_PAIR','*2',1], + ['GAIN_PAIR','*1',1], + ])), + +(Group().from_adjacency_list(""" +multiplicity [1] +1 *1 O u0 p3 c-1 {2,S} +2 *2 N u0 p0 c+1 {1,S} {3,S} {4,S} {5,S} +3 N u0 p1 c0 {2,S} {6,S} {7,S} +4 *3 N u0 p1 c0 {2,S} {5,S} {8,S} +5 *4 O u0 p2 c0 {2,S} {4,S} +6 H u0 p0 c0 {3,S} +7 H u0 p0 c0 {3,S} +8 H u0 p0 c0 {4,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*2',1,'*3'], + ['BREAK_BOND', '*2',1,'*4'], + ['CHANGE_BOND', '*1',1,'*2'], + ['CHANGE_BOND', '*4',1,'*3'], + ['LOSE_PAIR','*1',1], + ['GAIN_PAIR','*2',1], + ])), +(Group().from_adjacency_list(""" +multiplicity [3] +1 *4 N u1 p1 c0 {2,S} {5,S} +2 *3 N u0 p1 c0 {1,S} {3,S} {6,S} +3 *2 O u0 p2 c0 {2,S} {4,S} +4 *1 O u1 p2 c0 {3,S} +5 H u0 p0 c0 {1,S} +6 H u0 p0 c0 {2,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*2',1,'*3'], + ['CHANGE_BOND', '*4',1,'*3'], + ['LOSE_RADICAL','*4',1], + ['GAIN_RADICAL','*2',1], + ])), +(Group().from_adjacency_list(""" +multiplicity [2] +1 *1 O u0 p3 c-1 {2,S} +2 *2 O u0 p2 c0 {1,S} {3,S} +3 *3 N u0 p0 c+1 {2,S} {4,D} {5,S} +4 N u1 p1 c0 {3,D} +5 N u0 p1 c0 {3,S} {6,S} {7,S} +6 H u0 p0 c0 {5,S} +7 H u0 p0 c0 {5,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*2',1,'*3'], + ['LOSE_PAIR','*1',1], + ['GAIN_PAIR','*3',1], + ['GAIN_RADICAL','*2',1], + ['GAIN_RADICAL','*1',1], + ])), +(Group().from_adjacency_list(""" +multiplicity [3] +1 *1 N u1 p1 c0 {2,S} {5,S} +2 *2 O u0 p2 c0 {1,S} {3,S} +3 *3 N u0 p1 c0 {2,S} {4,D} +4 *4 N u1 p1 c0 {3,D} +5 H u0 p0 c0 {1,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*2',1,'*3'], + ['CHANGE_BOND', '*3',1,'*4'], + ['LOSE_RADICAL','*4',1], + ['GAIN_RADICAL','*2',1], + ])), + +(Group().from_adjacency_list(""" +multiplicity [2] +1 *1 O u0 p2 c0 {2,S} {4,S} +2 *2 N u0 p1 c0 {1,S} {3,D} +3 *3 N u1 p1 c0 {2,D} +4 H u0 p0 c0 {1,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*2',1,'*1'], + ['CHANGE_BOND', '*3',1,'*2'], + ['LOSE_RADICAL','*3',1], + ['GAIN_RADICAL','*1',1], + ])), + +(Group().from_adjacency_list(""" +multiplicity [3] +1 *2 N u0 p2 c-1 {2,S} {4,S} +2 *3 N u0 p0 c+1 {1,S} {3,S} {5,S} {6,S} +3 N u1 p1 c0 {2,S} {7,S} +4 *1 O u1 p2 c0 {1,S} +5 H u0 p0 c0 {2,S} +6 H u0 p0 c0 {2,S} +7 H u0 p0 c0 {3,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*2',1,'*3'], + ['CHANGE_BOND', '*1',1,'*2'], + ['LOSE_RADICAL','*1',1], + ['GAIN_RADICAL','*2',1], + ['LOSE_PAIR','*2',1], + ['GAIN_PAIR','*3',1], + ])), + +(Group().from_adjacency_list(""" +multiplicity [2] +1 *1 N u1 p2 c-1 {2,S} +2 *2 O u0 p2 c0 {1,S} {3,S} +3 *3 N u0 p0 c+1 {2,S} {4,S} {5,S} {6,S} +4 H u0 p0 c0 {3,S} +5 H u0 p0 c0 {3,S} +6 H u0 p0 c0 {3,S} +"""), + ReactionRecipe(actions=[ + ['BREAK_BOND', '*2',1,'*3'], + ['CHANGE_BOND', '*1',1,'*2'], + ['LOSE_PAIR','*1',1], + ['GAIN_PAIR','*3',1], + ])), +] def decay_species(spc, check_deterministic=True): """ From 520b0cf46dfaa45f7152f7c7f82abfaadedf1f0c Mon Sep 17 00:00:00 2001 From: Anna Doner Date: Fri, 22 Nov 2024 11:36:49 -0500 Subject: [PATCH 5/5] spin conservation check Nov 22 2024 --- rmgpy/data/kinetics/database.py | 1 + rmgpy/data/kinetics/family.py | 28 +- rmgpy/rmg/decay.py | 846 ++++++++++++++++---------------- 3 files changed, 447 insertions(+), 428 deletions(-) diff --git a/rmgpy/data/kinetics/database.py b/rmgpy/data/kinetics/database.py index 6650a532cc..9076881c3c 100644 --- a/rmgpy/data/kinetics/database.py +++ b/rmgpy/data/kinetics/database.py @@ -436,6 +436,7 @@ def generate_reactions(self, reactants, products=None, only_families=None, reson reaction_list = [] if only_families is None: reaction_list.extend(self.generate_reactions_from_libraries(reactants, products)) + reaction_list.extend(self.generate_reactions_from_families(reactants, products, only_families=only_families, resonance=resonance)) return reaction_list diff --git a/rmgpy/data/kinetics/family.py b/rmgpy/data/kinetics/family.py index 456085fb81..7cbbeb0185 100644 --- a/rmgpy/data/kinetics/family.py +++ b/rmgpy/data/kinetics/family.py @@ -228,13 +228,15 @@ def calculate_combined_spin(self): if len(self.reactants) == 1: reactant_combined_spin = {self.reactants[0].multiplicity} elif len(self.reactants) == 2: - reactant_combined_spin = set([self.reactants[0].multiplicity + self.reactants[1].multiplicity -1, np.abs(self.reactants[0].multiplicity-self.reactants[1].multiplicity)+1]) + reactant_spin_string = "+".join(sorted([str(reactant.multiplicity) for reactant in self.reactants])) + reactant_combined_spin = allowed_spin[reactant_spin_string] else: return None if len(self.products) == 1: product_combined_spin = {self.products[0].multiplicity} elif len(self.products) == 2: - product_combined_spin = set([self.products[0].multiplicity + self.products[1].multiplicity -1, np.abs(self.products[0].multiplicity-self.products[1].multiplicity)+1]) + product_spin_string = "+".join(sorted([str(product.multiplicity) for product in self.products])) + product_combined_spin = allowed_spin[product_spin_string] else: return None return reactant_combined_spin, product_combined_spin @@ -1678,6 +1680,7 @@ def _generate_product_structures(self, reactant_structures, maps, forward, relab # Apply the generated species constraints (if given) for struct in product_structures: if self.is_molecule_forbidden(struct): + # logging.info(f"{str(struct)} is forbidden!") raise ForbiddenStructureException() if fails_species_constraints(struct): raise ForbiddenStructureException() @@ -1740,8 +1743,8 @@ def _create_reaction(self, reactants, products, is_forward, check_spin = True): reaction.labeled_atoms[key] = dict(reaction.labeled_atoms[key], **species.get_all_labeled_atoms()) if check_spin: if not reaction.check_if_spin_allowed(): - logging.warn("Did not create the following reaction, which violates conservation of spin...") - logging.warn(str(reaction)) + logging.info("Did not create the following reaction, which violates conservation of spin...") + logging.info(str(reaction)) return None return reaction @@ -2011,6 +2014,7 @@ def _generate_reactions(self, reactants, products=None, forward=True, prod_reson reactant_num = self.product_num if self.auto_generated and reactant_num != len(reactants): + # logging.info("self.auto_generated and reactant_num != len(reactants)") return [] if len(reactants) > len(template.reactants): @@ -4936,4 +4940,18 @@ def get_site_solute_data(rxn): else: return None -allowed_spin_violation_families =['1,2-Birad_to_alkene','1,4_Cyclic_birad_scission','1,4_Linear_birad_scission'] \ No newline at end of file +allowed_spin_violation_families =['1,2-Birad_to_alkene','1,4_Cyclic_birad_scission','1,4_Linear_birad_scission'] +allowed_spin = { + "1+1": set([1]), + "1+2": set([2]), + "1+3": set([3]), + "1+4": set([4]), + "1+5": set([5]), + "2+2": set([1,3]), + "2+3": set([2,4]), + "2+4": set([3,5]), + "2+5": set([4,6]), + "3+3": set([1,3,5]), + "3+4": set([2,4,6]), + "3+5": set([3,5,7]), +} \ No newline at end of file diff --git a/rmgpy/rmg/decay.py b/rmgpy/rmg/decay.py index 2b05e8765e..884c5b9fae 100644 --- a/rmgpy/rmg/decay.py +++ b/rmgpy/rmg/decay.py @@ -48,459 +48,459 @@ ['GAIN_RADICAL','*3','1'] ])), -(Group().from_adjacency_list(""" -multiplicity [3] -1 O u0 p3 c-1 {2,S} -2 *1 N u0 p0 c+1 {1,S} {3,S} {5,S} {6,S} -3 *2 N u1 p1 c0 {2,S} {4,S} -4 O u0 p2 c0 {3,S} {7,S} -5 *3 N u1 p1 c0 {2,S} {8,S} -6 H u0 p0 c0 {2,S} -7 H u0 p0 c0 {4,S} -8 H u0 p0 c0 {5,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*1', 1, '*2'], - ['CHANGE_BOND', '*1', 1, '*3'], - ['LOSE_RADICAL', '*3','1'], - ['GAIN_RADICAL','*2','1'] - ])), +# (Group().from_adjacency_list(""" +# multiplicity [3] +# 1 O u0 p3 c-1 {2,S} +# 2 *1 N u0 p0 c+1 {1,S} {3,S} {5,S} {6,S} +# 3 *2 N u1 p1 c0 {2,S} {4,S} +# 4 O u0 p2 c0 {3,S} {7,S} +# 5 *3 N u1 p1 c0 {2,S} {8,S} +# 6 H u0 p0 c0 {2,S} +# 7 H u0 p0 c0 {4,S} +# 8 H u0 p0 c0 {5,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*1', 1, '*2'], +# ['CHANGE_BOND', '*1', 1, '*3'], +# ['LOSE_RADICAL', '*3','1'], +# ['GAIN_RADICAL','*2','1'] +# ])), -(Group().from_adjacency_list(""" -multiplicity [1] -1 *3 O u0 p3 c-1 {2,S} -2 *5 N u0 p0 c+1 {1,S} {3,S} {5,S} {6,S} -3 *4 N u0 p1 c0 {2,S} {4,D} -4 *1 N u0 p1 c0 {3,D} {7,S} -5 H u0 p0 c0 {2,S} -6 H u0 p0 c0 {2,S} -7 *2 H u0 p0 c0 {4,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*1', 1, '*2'], - ['BREAK_BOND', '*4', 1, '*5'], - ['FORM_BOND', '*2', 1, '*3'], - ['CHANGE_BOND', '*1', 1, '*4'], - ['LOSE_PAIR', '*3', 1], - ['GAIN_PAIR', '*5', 1], +# (Group().from_adjacency_list(""" +# multiplicity [1] +# 1 *3 O u0 p3 c-1 {2,S} +# 2 *5 N u0 p0 c+1 {1,S} {3,S} {5,S} {6,S} +# 3 *4 N u0 p1 c0 {2,S} {4,D} +# 4 *1 N u0 p1 c0 {3,D} {7,S} +# 5 H u0 p0 c0 {2,S} +# 6 H u0 p0 c0 {2,S} +# 7 *2 H u0 p0 c0 {4,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*1', 1, '*2'], +# ['BREAK_BOND', '*4', 1, '*5'], +# ['FORM_BOND', '*2', 1, '*3'], +# ['CHANGE_BOND', '*1', 1, '*4'], +# ['LOSE_PAIR', '*3', 1], +# ['GAIN_PAIR', '*5', 1], - ])), -(Group().from_adjacency_list(""" -multiplicity [1] -1 *5 N u0 p2 c-1 {2,S} {5,S} -2 *4 O u0 p2 c0 {1,S} {3,S} -3 *3 O u0 p2 c0 {2,S} {4,S} -4 *2 N u0 p1 c0 {3,S} {5,S} {6,S} -5 *1 N u0 p0 c+1 {1,S} {4,S} {7,S} {8,S} -6 H u0 p0 c0 {4,S} -7 H u0 p0 c0 {5,S} -8 H u0 p0 c0 {5,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*3', 1, '*4'], - ['BREAK_BOND', '*1', 1, '*2'], - ['CHANGE_BOND', '*2', 1, '*3'], - ['CHANGE_BOND', '*5', 1, '*4'], - ['LOSE_PAIR', '*5', 1], - ['GAIN_PAIR', '*1', 1], +# ])), +# (Group().from_adjacency_list(""" +# multiplicity [1] +# 1 *5 N u0 p2 c-1 {2,S} {5,S} +# 2 *4 O u0 p2 c0 {1,S} {3,S} +# 3 *3 O u0 p2 c0 {2,S} {4,S} +# 4 *2 N u0 p1 c0 {3,S} {5,S} {6,S} +# 5 *1 N u0 p0 c+1 {1,S} {4,S} {7,S} {8,S} +# 6 H u0 p0 c0 {4,S} +# 7 H u0 p0 c0 {5,S} +# 8 H u0 p0 c0 {5,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*3', 1, '*4'], +# ['BREAK_BOND', '*1', 1, '*2'], +# ['CHANGE_BOND', '*2', 1, '*3'], +# ['CHANGE_BOND', '*5', 1, '*4'], +# ['LOSE_PAIR', '*5', 1], +# ['GAIN_PAIR', '*1', 1], - ])), +# ])), -(Group().from_adjacency_list(""" -multiplicity [2] -1 *4 O u0 p2 c0 {2,S} {6,S} -2 *3 N u0 p1 c0 {1,S} {3,D} -3 *1 N u0 p0 c+1 {2,D} {4,S} {5,S} -4 *6 O u0 p2 c0 {3,S} {7,S} -5 *2 N u1 p2 c-1 {3,S} -6 *5 H u0 p0 c0 {1,S} -7 H u0 p0 c0 {4,S} -"""), - ReactionRecipe(actions=[ - ['FORM_BOND', '*5', 1, '*6'], - ['BREAK_BOND', '*1', 1, '*6'], - ['BREAK_BOND', '*1', 2, '*3'], - ['BREAK_BOND', '*4', 1, '*5'], - ['CHANGE_BOND', '*3', 1, '*4'], - ['CHANGE_BOND', '*1', 2, '*2'], - ['GAIN_RADICAL', '*3', '1'], - ['LOSE_RADICAL', '*2', '1'], - ['LOSE_PAIR', '*2', 1], - ['GAIN_PAIR', '*1', 1], +# (Group().from_adjacency_list(""" +# multiplicity [2] +# 1 *4 O u0 p2 c0 {2,S} {6,S} +# 2 *3 N u0 p1 c0 {1,S} {3,D} +# 3 *1 N u0 p0 c+1 {2,D} {4,S} {5,S} +# 4 *6 O u0 p2 c0 {3,S} {7,S} +# 5 *2 N u1 p2 c-1 {3,S} +# 6 *5 H u0 p0 c0 {1,S} +# 7 H u0 p0 c0 {4,S} +# """), +# ReactionRecipe(actions=[ +# ['FORM_BOND', '*5', 1, '*6'], +# ['BREAK_BOND', '*1', 1, '*6'], +# ['BREAK_BOND', '*1', 2, '*3'], +# ['BREAK_BOND', '*4', 1, '*5'], +# ['CHANGE_BOND', '*3', 1, '*4'], +# ['CHANGE_BOND', '*1', 2, '*2'], +# ['GAIN_RADICAL', '*3', '1'], +# ['LOSE_RADICAL', '*2', '1'], +# ['LOSE_PAIR', '*2', 1], +# ['GAIN_PAIR', '*1', 1], - ])), +# ])), -(Group().from_adjacency_list(""" -multiplicity [3] -1 *1 N u2 p1 c0 {2,S} -2 *2 N u0 p1 c0 {1,S} {3,S} {5,S} -3 *3 N u0 p1 c0 {2,S} {4,S} {6,S} -4 O u0 p2 c0 {3,S} {5,S} -5 *4 O u0 p2 c0 {2,S} {4,S} -6 H u0 p0 c0 {3,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*2', 1, '*3'], - ['BREAK_BOND', '*2', 1, '*4'], - ['CHANGE_BOND', '*1',2,'*2'], - ['LOSE_RADICAL','*1',2], - ['GAIN_RADICAL','*3',1], - ['GAIN_RADICAL','*4',1], +# (Group().from_adjacency_list(""" +# multiplicity [3] +# 1 *1 N u2 p1 c0 {2,S} +# 2 *2 N u0 p1 c0 {1,S} {3,S} {5,S} +# 3 *3 N u0 p1 c0 {2,S} {4,S} {6,S} +# 4 O u0 p2 c0 {3,S} {5,S} +# 5 *4 O u0 p2 c0 {2,S} {4,S} +# 6 H u0 p0 c0 {3,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*2', 1, '*3'], +# ['BREAK_BOND', '*2', 1, '*4'], +# ['CHANGE_BOND', '*1',2,'*2'], +# ['LOSE_RADICAL','*1',2], +# ['GAIN_RADICAL','*3',1], +# ['GAIN_RADICAL','*4',1], - ])), -(Group().from_adjacency_list(""" -multiplicity [3] -1 *1 N u2 p1 c0 {2,S} -2 *2 O u0 p2 c0 {1,S} {3,S} -3 *3 O u0 p2 c0 {2,S} {4,S} -4 H u0 p0 c0 {3,S} -"""), - ReactionRecipe(actions=[ - ['CHANGE_BOND', '*1',1,'*2'], - ['BREAK_BOND', '*2',1,'*3'], - ['LOSE_RADICAL','*1',1], - ['GAIN_RADICAL','*3',1], - ])), +# ])), +# (Group().from_adjacency_list(""" +# multiplicity [3] +# 1 *1 N u2 p1 c0 {2,S} +# 2 *2 O u0 p2 c0 {1,S} {3,S} +# 3 *3 O u0 p2 c0 {2,S} {4,S} +# 4 H u0 p0 c0 {3,S} +# """), +# ReactionRecipe(actions=[ +# ['CHANGE_BOND', '*1',1,'*2'], +# ['BREAK_BOND', '*2',1,'*3'], +# ['LOSE_RADICAL','*1',1], +# ['GAIN_RADICAL','*3',1], +# ])), -(Group().from_adjacency_list(""" -multiplicity [1] -1 *1 N u0 p2 c-1 {2,D} -2 *2 N u0 p0 c+1 {1,D} {3,S} {4,S} -3 *4 O u0 p2 c0 {2,S} {4,S} -4 *3 N u0 p1 c0 {2,S} {3,S} {5,S} -5 O u0 p2 c0 {4,S} {6,S} -6 H u0 p0 c0 {5,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*2',1,'*4'], - ['CHANGE_BOND','*3',1,'*4'], - ['GAIN_PAIR','*2',1], - ['LOSE_PAIR','*3',1], +# (Group().from_adjacency_list(""" +# multiplicity [1] +# 1 *1 N u0 p2 c-1 {2,D} +# 2 *2 N u0 p0 c+1 {1,D} {3,S} {4,S} +# 3 *4 O u0 p2 c0 {2,S} {4,S} +# 4 *3 N u0 p1 c0 {2,S} {3,S} {5,S} +# 5 O u0 p2 c0 {4,S} {6,S} +# 6 H u0 p0 c0 {5,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*2',1,'*4'], +# ['CHANGE_BOND','*3',1,'*4'], +# ['GAIN_PAIR','*2',1], +# ['LOSE_PAIR','*3',1], - ])), +# ])), -(Group().from_adjacency_list(""" -multiplicity [1] -1 *1 N u0 p2 c-1 {2,S} {5,S} -2 *2 N u0 p0 c+1 {1,S} {3,S} {4,S} {6,S} -3 *3 N u0 p1 c0 {2,S} {4,S} {7,S} -4 *4 O u0 p2 c0 {2,S} {3,S} -5 H u0 p0 c0 {1,S} -6 H u0 p0 c0 {2,S} -7 H u0 p0 c0 {3,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*2',1,'*4'], - ['CHANGE_BOND','*3',1,'*4'], - ['GAIN_PAIR','*2',1], - ['LOSE_PAIR','*3',1], +# (Group().from_adjacency_list(""" +# multiplicity [1] +# 1 *1 N u0 p2 c-1 {2,S} {5,S} +# 2 *2 N u0 p0 c+1 {1,S} {3,S} {4,S} {6,S} +# 3 *3 N u0 p1 c0 {2,S} {4,S} {7,S} +# 4 *4 O u0 p2 c0 {2,S} {3,S} +# 5 H u0 p0 c0 {1,S} +# 6 H u0 p0 c0 {2,S} +# 7 H u0 p0 c0 {3,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*2',1,'*4'], +# ['CHANGE_BOND','*3',1,'*4'], +# ['GAIN_PAIR','*2',1], +# ['LOSE_PAIR','*3',1], - ])), +# ])), -(Group().from_adjacency_list(""" -multiplicity [1] -1 *1 O u0 p3 c-1 {2,S} -2 *2 N u0 p0 c+1 {1,S} {3,S} {5,S} {6,S} -3 *3 N u0 p1 c0 {2,S} {4,D} -4 *4 N u0 p1 c0 {3,D} {7,S} -5 O u0 p2 c0 {2,S} {8,S} -6 H u0 p0 c0 {2,S} -7 *5 H u0 p0 c0 {4,S} -8 H u0 p0 c0 {5,S} -"""), - ReactionRecipe(actions=[ - ['FORM_BOND', '*1',1,'*5'], - ['BREAK_BOND','*4',1,'*5'], - ['CHANGE_BOND','*3',1,'*4'], - ['BREAK_BOND','*2',1,'*3'], - ['GAIN_PAIR','*2',1], - ['LOSE_PAIR','*1',1], +# (Group().from_adjacency_list(""" +# multiplicity [1] +# 1 *1 O u0 p3 c-1 {2,S} +# 2 *2 N u0 p0 c+1 {1,S} {3,S} {5,S} {6,S} +# 3 *3 N u0 p1 c0 {2,S} {4,D} +# 4 *4 N u0 p1 c0 {3,D} {7,S} +# 5 O u0 p2 c0 {2,S} {8,S} +# 6 H u0 p0 c0 {2,S} +# 7 *5 H u0 p0 c0 {4,S} +# 8 H u0 p0 c0 {5,S} +# """), +# ReactionRecipe(actions=[ +# ['FORM_BOND', '*1',1,'*5'], +# ['BREAK_BOND','*4',1,'*5'], +# ['CHANGE_BOND','*3',1,'*4'], +# ['BREAK_BOND','*2',1,'*3'], +# ['GAIN_PAIR','*2',1], +# ['LOSE_PAIR','*1',1], - ])), +# ])), -(Group().from_adjacency_list(""" -multiplicity [3] -1 *1 N u1 p2 c-1 {2,S} -2 *2 N u0 p0 c+1 {1,S} {3,S} {4,S} {5,S} -3 O u1 p2 c0 {2,S} -4 N u0 p1 c0 {2,S} {5,S} {6,S} -5 *3 O u0 p2 c0 {2,S} {4,S} -6 H u0 p0 c0 {4,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND','*2',1,'*3'], - ['CHANGE_BOND', '*1',1,'*2'], - ['GAIN_RADICAL','*3',1], - ['LOSE_RADICAL','*1',1], +# (Group().from_adjacency_list(""" +# multiplicity [3] +# 1 *1 N u1 p2 c-1 {2,S} +# 2 *2 N u0 p0 c+1 {1,S} {3,S} {4,S} {5,S} +# 3 O u1 p2 c0 {2,S} +# 4 N u0 p1 c0 {2,S} {5,S} {6,S} +# 5 *3 O u0 p2 c0 {2,S} {4,S} +# 6 H u0 p0 c0 {4,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND','*2',1,'*3'], +# ['CHANGE_BOND', '*1',1,'*2'], +# ['GAIN_RADICAL','*3',1], +# ['LOSE_RADICAL','*1',1], - ])), +# ])), -(Group().from_adjacency_list(""" -multiplicity [1] -1 *1 N u0 p1 c0 {2,D} {6,S} -2 *5 N u0 p1 c0 {1,D} {3,S} -3 *4 O u0 p2 c0 {2,S} {4,S} -4 *3 N u0 p1 c0 {3,S} {5,D} -5 O u0 p2 c0 {4,D} -6 *2 H u0 p0 c0 {1,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND','*4',1,'*5'], - ['BREAK_BOND', '*1',1,'*2'], - ['FORM_BOND','*2',1,'*3'], - ['GAIN_PAIR','*4',1], - ['CHANGE_BOND','*1',1,'*5'], - ['LOSE_PAIR','*3',1], +# (Group().from_adjacency_list(""" +# multiplicity [1] +# 1 *1 N u0 p1 c0 {2,D} {6,S} +# 2 *5 N u0 p1 c0 {1,D} {3,S} +# 3 *4 O u0 p2 c0 {2,S} {4,S} +# 4 *3 N u0 p1 c0 {3,S} {5,D} +# 5 O u0 p2 c0 {4,D} +# 6 *2 H u0 p0 c0 {1,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND','*4',1,'*5'], +# ['BREAK_BOND', '*1',1,'*2'], +# ['FORM_BOND','*2',1,'*3'], +# ['GAIN_PAIR','*4',1], +# ['CHANGE_BOND','*1',1,'*5'], +# ['LOSE_PAIR','*3',1], - ])), +# ])), -(Group().from_adjacency_list(""" -multiplicity [1] -1 N u0 p2 c-1 {2,D} -2 *1 N u0 p0 c+1 {1,D} {3,S} {4,S} -3 *2 N u0 p1 c0 {2,S} {4,S} {5,S} -4 *3 O u0 p2 c0 {2,S} {3,S} -5 H u0 p0 c0 {3,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND','*1',1,'*3'], - ['CHANGE_BOND','*2',1,'*3'], - ['GAIN_PAIR','*1',1], - ['LOSE_PAIR','*2',1], +# (Group().from_adjacency_list(""" +# multiplicity [1] +# 1 N u0 p2 c-1 {2,D} +# 2 *1 N u0 p0 c+1 {1,D} {3,S} {4,S} +# 3 *2 N u0 p1 c0 {2,S} {4,S} {5,S} +# 4 *3 O u0 p2 c0 {2,S} {3,S} +# 5 H u0 p0 c0 {3,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND','*1',1,'*3'], +# ['CHANGE_BOND','*2',1,'*3'], +# ['GAIN_PAIR','*1',1], +# ['LOSE_PAIR','*2',1], - ])), -(Group().from_adjacency_list(""" -multiplicity [3] -1 *1 N u1 p1 c0 {2,S} {5,S} -2 *2 N u0 p1 c0 {1,S} {3,D} -3 *3 N u0 p1 c0 {2,D} {4,S} -4 *4 O u1 p2 c0 {3,S} -5 H u0 p0 c0 {1,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND','*2',2,'*3'], - ['CHANGE_BOND','*4',1,'*3'], - ['CHANGE_BOND','*1',1,'*2'], - ['GAIN_RADICAL','*3',1], - ['LOSE_RADICAL','*4',1], - ['GAIN_RADICAL','*2',1], - ['LOSE_RADICAL','*1',1], +# ])), +# (Group().from_adjacency_list(""" +# multiplicity [3] +# 1 *1 N u1 p1 c0 {2,S} {5,S} +# 2 *2 N u0 p1 c0 {1,S} {3,D} +# 3 *3 N u0 p1 c0 {2,D} {4,S} +# 4 *4 O u1 p2 c0 {3,S} +# 5 H u0 p0 c0 {1,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND','*2',2,'*3'], +# ['CHANGE_BOND','*4',1,'*3'], +# ['CHANGE_BOND','*1',1,'*2'], +# ['GAIN_RADICAL','*3',1], +# ['LOSE_RADICAL','*4',1], +# ['GAIN_RADICAL','*2',1], +# ['LOSE_RADICAL','*1',1], - ])), -(Group().from_adjacency_list(""" -multiplicity [1] -1 *1 O u0 p3 c-1 {2,S} -2 *2 N u0 p0 c+1 {1,S} {3,S} {4,S} {6,S} -3 *3 O u0 p2 c0 {2,S} {4,S} -4 *4 N u0 p1 c0 {2,S} {3,S} {5,S} -5 *5 N u0 p1 c0 {4,S} {7,S} {8,S} -6 H u0 p0 c0 {2,S} -7 H u0 p0 c0 {5,S} -8 H u0 p0 c0 {5,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*2',1,'*3'], - ['BREAK_BOND', '*2',1,'*4'], - ['CHANGE_BOND', '*3',1,'*4'], - ['CHANGE_BOND', '*1',1,'*2'], - ['LOSE_PAIR','*1',1], - ['GAIN_PAIR','*2',1], +# ])), +# (Group().from_adjacency_list(""" +# multiplicity [1] +# 1 *1 O u0 p3 c-1 {2,S} +# 2 *2 N u0 p0 c+1 {1,S} {3,S} {4,S} {6,S} +# 3 *3 O u0 p2 c0 {2,S} {4,S} +# 4 *4 N u0 p1 c0 {2,S} {3,S} {5,S} +# 5 *5 N u0 p1 c0 {4,S} {7,S} {8,S} +# 6 H u0 p0 c0 {2,S} +# 7 H u0 p0 c0 {5,S} +# 8 H u0 p0 c0 {5,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*2',1,'*3'], +# ['BREAK_BOND', '*2',1,'*4'], +# ['CHANGE_BOND', '*3',1,'*4'], +# ['CHANGE_BOND', '*1',1,'*2'], +# ['LOSE_PAIR','*1',1], +# ['GAIN_PAIR','*2',1], - ])), -(Group().from_adjacency_list(""" -multiplicity [2] -1 *2 N u0 p2 c-1 {2,S} {4,S} -2 *3 N u0 p0 c+1 {1,S} {3,S} {5,S} {6,S} -3 N u0 p1 c0 {2,S} {7,S} {8,S} -4 *1 O u1 p2 c0 {1,S} -5 H u0 p0 c0 {2,S} -6 H u0 p0 c0 {2,S} -7 H u0 p0 c0 {3,S} -8 H u0 p0 c0 {3,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*2',1,'*3'], - ['CHANGE_BOND', '*1',1,'*2'], - ['LOSE_RADICAL','*1',1], - ['GAIN_RADICAL','*2',1], - ['LOSE_PAIR','*2',1], - ['GAIN_PAIR','*3',1], - ])), -(Group().from_adjacency_list(""" -multiplicity [1] -1 *1 N u0 p2 c-1 {2,S} {6,S} -2 *2 N u0 p0 c+1 {1,S} {3,S} {7,S} {8,S} -3 *4 O u0 p2 c0 {2,S} {4,S} -4 N u0 p1 c0 {3,S} {5,D} -5 O u0 p2 c0 {4,D} -6 H u0 p0 c0 {1,S} -7 *3 H u0 p0 c0 {2,S} -8 H u0 p0 c0 {2,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*2',1,'*3'], - ['BREAK_BOND', '*2',1,'*4'], - ['FORM_BOND','*3',1,'*4'], - ['CHANGE_BOND', '*1',1,'*2'], - ['LOSE_PAIR','*1',1], - ['GAIN_PAIR','*2',1], - ])), -(Group().from_adjacency_list(""" -multiplicity [3] -1 *3 N u2 p1 c0 {2,S} -2 *2 N u0 p1 c0 {1,S} {3,S} {5,S} -3 *4 N u0 p1 c0 {2,S} {4,D} -4 O u0 p2 c0 {3,D} -5 *1 O u0 p2 c0 {2,S} {6,S} -6 H u0 p0 c0 {5,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*2',1,'*1'], - ['BREAK_BOND', '*2',1,'*4'], - ['CHANGE_BOND', '*3',2,'*2'], - ['LOSE_RADICAL','*3',2], - ['GAIN_RADICAL','*1',1], - ['GAIN_RADICAL','*4',1], - ])), +# ])), +# (Group().from_adjacency_list(""" +# multiplicity [2] +# 1 *2 N u0 p2 c-1 {2,S} {4,S} +# 2 *3 N u0 p0 c+1 {1,S} {3,S} {5,S} {6,S} +# 3 N u0 p1 c0 {2,S} {7,S} {8,S} +# 4 *1 O u1 p2 c0 {1,S} +# 5 H u0 p0 c0 {2,S} +# 6 H u0 p0 c0 {2,S} +# 7 H u0 p0 c0 {3,S} +# 8 H u0 p0 c0 {3,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*2',1,'*3'], +# ['CHANGE_BOND', '*1',1,'*2'], +# ['LOSE_RADICAL','*1',1], +# ['GAIN_RADICAL','*2',1], +# ['LOSE_PAIR','*2',1], +# ['GAIN_PAIR','*3',1], +# ])), +# (Group().from_adjacency_list(""" +# multiplicity [1] +# 1 *1 N u0 p2 c-1 {2,S} {6,S} +# 2 *2 N u0 p0 c+1 {1,S} {3,S} {7,S} {8,S} +# 3 *4 O u0 p2 c0 {2,S} {4,S} +# 4 N u0 p1 c0 {3,S} {5,D} +# 5 O u0 p2 c0 {4,D} +# 6 H u0 p0 c0 {1,S} +# 7 *3 H u0 p0 c0 {2,S} +# 8 H u0 p0 c0 {2,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*2',1,'*3'], +# ['BREAK_BOND', '*2',1,'*4'], +# ['FORM_BOND','*3',1,'*4'], +# ['CHANGE_BOND', '*1',1,'*2'], +# ['LOSE_PAIR','*1',1], +# ['GAIN_PAIR','*2',1], +# ])), +# (Group().from_adjacency_list(""" +# multiplicity [3] +# 1 *3 N u2 p1 c0 {2,S} +# 2 *2 N u0 p1 c0 {1,S} {3,S} {5,S} +# 3 *4 N u0 p1 c0 {2,S} {4,D} +# 4 O u0 p2 c0 {3,D} +# 5 *1 O u0 p2 c0 {2,S} {6,S} +# 6 H u0 p0 c0 {5,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*2',1,'*1'], +# ['BREAK_BOND', '*2',1,'*4'], +# ['CHANGE_BOND', '*3',2,'*2'], +# ['LOSE_RADICAL','*3',2], +# ['GAIN_RADICAL','*1',1], +# ['GAIN_RADICAL','*4',1], +# ])), -(Group().from_adjacency_list(""" -multiplicity [1] -1 *2 N u0 p2 c-1 {2,S} {5,S} -2 *3 O u0 p2 c0 {1,S} {3,S} -3 *4 N u0 p1 c0 {2,S} {4,S} {6,S} -4 *5 O u0 p2 c0 {3,S} {5,S} -5 *1 N u0 p0 c+1 {1,S} {4,S} {7,S} {8,S} -6 H u0 p0 c0 {3,S} -7 H u0 p0 c0 {5,S} -8 H u0 p0 c0 {5,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*5',1,'*1'], - ['BREAK_BOND', '*3',1,'*4'], - ['CHANGE_BOND', '*4',1,'*5'], - ['CHANGE_BOND', '*2',1,'*3'], - ['LOSE_PAIR','*2',1], - ['GAIN_PAIR','*1',1], - ])), +# (Group().from_adjacency_list(""" +# multiplicity [1] +# 1 *2 N u0 p2 c-1 {2,S} {5,S} +# 2 *3 O u0 p2 c0 {1,S} {3,S} +# 3 *4 N u0 p1 c0 {2,S} {4,S} {6,S} +# 4 *5 O u0 p2 c0 {3,S} {5,S} +# 5 *1 N u0 p0 c+1 {1,S} {4,S} {7,S} {8,S} +# 6 H u0 p0 c0 {3,S} +# 7 H u0 p0 c0 {5,S} +# 8 H u0 p0 c0 {5,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*5',1,'*1'], +# ['BREAK_BOND', '*3',1,'*4'], +# ['CHANGE_BOND', '*4',1,'*5'], +# ['CHANGE_BOND', '*2',1,'*3'], +# ['LOSE_PAIR','*2',1], +# ['GAIN_PAIR','*1',1], +# ])), -(Group().from_adjacency_list(""" -multiplicity [1] -1 *1 O u0 p3 c-1 {2,S} -2 *2 N u0 p0 c+1 {1,S} {3,S} {4,S} {5,S} -3 N u0 p1 c0 {2,S} {6,S} {7,S} -4 *3 N u0 p1 c0 {2,S} {5,S} {8,S} -5 *4 O u0 p2 c0 {2,S} {4,S} -6 H u0 p0 c0 {3,S} -7 H u0 p0 c0 {3,S} -8 H u0 p0 c0 {4,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*2',1,'*3'], - ['BREAK_BOND', '*2',1,'*4'], - ['CHANGE_BOND', '*1',1,'*2'], - ['CHANGE_BOND', '*4',1,'*3'], - ['LOSE_PAIR','*1',1], - ['GAIN_PAIR','*2',1], - ])), -(Group().from_adjacency_list(""" -multiplicity [3] -1 *4 N u1 p1 c0 {2,S} {5,S} -2 *3 N u0 p1 c0 {1,S} {3,S} {6,S} -3 *2 O u0 p2 c0 {2,S} {4,S} -4 *1 O u1 p2 c0 {3,S} -5 H u0 p0 c0 {1,S} -6 H u0 p0 c0 {2,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*2',1,'*3'], - ['CHANGE_BOND', '*4',1,'*3'], - ['LOSE_RADICAL','*4',1], - ['GAIN_RADICAL','*2',1], - ])), -(Group().from_adjacency_list(""" -multiplicity [2] -1 *1 O u0 p3 c-1 {2,S} -2 *2 O u0 p2 c0 {1,S} {3,S} -3 *3 N u0 p0 c+1 {2,S} {4,D} {5,S} -4 N u1 p1 c0 {3,D} -5 N u0 p1 c0 {3,S} {6,S} {7,S} -6 H u0 p0 c0 {5,S} -7 H u0 p0 c0 {5,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*2',1,'*3'], - ['LOSE_PAIR','*1',1], - ['GAIN_PAIR','*3',1], - ['GAIN_RADICAL','*2',1], - ['GAIN_RADICAL','*1',1], - ])), -(Group().from_adjacency_list(""" -multiplicity [3] -1 *1 N u1 p1 c0 {2,S} {5,S} -2 *2 O u0 p2 c0 {1,S} {3,S} -3 *3 N u0 p1 c0 {2,S} {4,D} -4 *4 N u1 p1 c0 {3,D} -5 H u0 p0 c0 {1,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*2',1,'*3'], - ['CHANGE_BOND', '*3',1,'*4'], - ['LOSE_RADICAL','*4',1], - ['GAIN_RADICAL','*2',1], - ])), +# (Group().from_adjacency_list(""" +# multiplicity [1] +# 1 *1 O u0 p3 c-1 {2,S} +# 2 *2 N u0 p0 c+1 {1,S} {3,S} {4,S} {5,S} +# 3 N u0 p1 c0 {2,S} {6,S} {7,S} +# 4 *3 N u0 p1 c0 {2,S} {5,S} {8,S} +# 5 *4 O u0 p2 c0 {2,S} {4,S} +# 6 H u0 p0 c0 {3,S} +# 7 H u0 p0 c0 {3,S} +# 8 H u0 p0 c0 {4,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*2',1,'*3'], +# ['BREAK_BOND', '*2',1,'*4'], +# ['CHANGE_BOND', '*1',1,'*2'], +# ['CHANGE_BOND', '*4',1,'*3'], +# ['LOSE_PAIR','*1',1], +# ['GAIN_PAIR','*2',1], +# ])), +# (Group().from_adjacency_list(""" +# multiplicity [3] +# 1 *4 N u1 p1 c0 {2,S} {5,S} +# 2 *3 N u0 p1 c0 {1,S} {3,S} {6,S} +# 3 *2 O u0 p2 c0 {2,S} {4,S} +# 4 *1 O u1 p2 c0 {3,S} +# 5 H u0 p0 c0 {1,S} +# 6 H u0 p0 c0 {2,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*2',1,'*3'], +# ['CHANGE_BOND', '*4',1,'*3'], +# ['LOSE_RADICAL','*4',1], +# ['GAIN_RADICAL','*2',1], +# ])), +# (Group().from_adjacency_list(""" +# multiplicity [2] +# 1 *1 O u0 p3 c-1 {2,S} +# 2 *2 O u0 p2 c0 {1,S} {3,S} +# 3 *3 N u0 p0 c+1 {2,S} {4,D} {5,S} +# 4 N u1 p1 c0 {3,D} +# 5 N u0 p1 c0 {3,S} {6,S} {7,S} +# 6 H u0 p0 c0 {5,S} +# 7 H u0 p0 c0 {5,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*2',1,'*3'], +# ['LOSE_PAIR','*1',1], +# ['GAIN_PAIR','*3',1], +# ['GAIN_RADICAL','*2',1], +# ['GAIN_RADICAL','*1',1], +# ])), +# (Group().from_adjacency_list(""" +# multiplicity [3] +# 1 *1 N u1 p1 c0 {2,S} {5,S} +# 2 *2 O u0 p2 c0 {1,S} {3,S} +# 3 *3 N u0 p1 c0 {2,S} {4,D} +# 4 *4 N u1 p1 c0 {3,D} +# 5 H u0 p0 c0 {1,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*2',1,'*3'], +# ['CHANGE_BOND', '*3',1,'*4'], +# ['LOSE_RADICAL','*4',1], +# ['GAIN_RADICAL','*2',1], +# ])), -(Group().from_adjacency_list(""" -multiplicity [2] -1 *1 O u0 p2 c0 {2,S} {4,S} -2 *2 N u0 p1 c0 {1,S} {3,D} -3 *3 N u1 p1 c0 {2,D} -4 H u0 p0 c0 {1,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*2',1,'*1'], - ['CHANGE_BOND', '*3',1,'*2'], - ['LOSE_RADICAL','*3',1], - ['GAIN_RADICAL','*1',1], - ])), +# (Group().from_adjacency_list(""" +# multiplicity [2] +# 1 *1 O u0 p2 c0 {2,S} {4,S} +# 2 *2 N u0 p1 c0 {1,S} {3,D} +# 3 *3 N u1 p1 c0 {2,D} +# 4 H u0 p0 c0 {1,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*2',1,'*1'], +# ['CHANGE_BOND', '*3',1,'*2'], +# ['LOSE_RADICAL','*3',1], +# ['GAIN_RADICAL','*1',1], +# ])), -(Group().from_adjacency_list(""" -multiplicity [3] -1 *2 N u0 p2 c-1 {2,S} {4,S} -2 *3 N u0 p0 c+1 {1,S} {3,S} {5,S} {6,S} -3 N u1 p1 c0 {2,S} {7,S} -4 *1 O u1 p2 c0 {1,S} -5 H u0 p0 c0 {2,S} -6 H u0 p0 c0 {2,S} -7 H u0 p0 c0 {3,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*2',1,'*3'], - ['CHANGE_BOND', '*1',1,'*2'], - ['LOSE_RADICAL','*1',1], - ['GAIN_RADICAL','*2',1], - ['LOSE_PAIR','*2',1], - ['GAIN_PAIR','*3',1], - ])), +# (Group().from_adjacency_list(""" +# multiplicity [3] +# 1 *2 N u0 p2 c-1 {2,S} {4,S} +# 2 *3 N u0 p0 c+1 {1,S} {3,S} {5,S} {6,S} +# 3 N u1 p1 c0 {2,S} {7,S} +# 4 *1 O u1 p2 c0 {1,S} +# 5 H u0 p0 c0 {2,S} +# 6 H u0 p0 c0 {2,S} +# 7 H u0 p0 c0 {3,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*2',1,'*3'], +# ['CHANGE_BOND', '*1',1,'*2'], +# ['LOSE_RADICAL','*1',1], +# ['GAIN_RADICAL','*2',1], +# ['LOSE_PAIR','*2',1], +# ['GAIN_PAIR','*3',1], +# ])), -(Group().from_adjacency_list(""" -multiplicity [2] -1 *1 N u1 p2 c-1 {2,S} -2 *2 O u0 p2 c0 {1,S} {3,S} -3 *3 N u0 p0 c+1 {2,S} {4,S} {5,S} {6,S} -4 H u0 p0 c0 {3,S} -5 H u0 p0 c0 {3,S} -6 H u0 p0 c0 {3,S} -"""), - ReactionRecipe(actions=[ - ['BREAK_BOND', '*2',1,'*3'], - ['CHANGE_BOND', '*1',1,'*2'], - ['LOSE_PAIR','*1',1], - ['GAIN_PAIR','*3',1], - ])), +# (Group().from_adjacency_list(""" +# multiplicity [2] +# 1 *1 N u1 p2 c-1 {2,S} +# 2 *2 O u0 p2 c0 {1,S} {3,S} +# 3 *3 N u0 p0 c+1 {2,S} {4,S} {5,S} {6,S} +# 4 H u0 p0 c0 {3,S} +# 5 H u0 p0 c0 {3,S} +# 6 H u0 p0 c0 {3,S} +# """), +# ReactionRecipe(actions=[ +# ['BREAK_BOND', '*2',1,'*3'], +# ['CHANGE_BOND', '*1',1,'*2'], +# ['LOSE_PAIR','*1',1], +# ['GAIN_PAIR','*3',1], +# ])), ] def decay_species(spc, check_deterministic=True):