From f6807cb5e84c5ceab8524f7fdfa58e76f389986d Mon Sep 17 00:00:00 2001 From: kfir4444 Date: Tue, 26 Sep 2023 12:14:48 +0300 Subject: [PATCH] removed cuts_on_cycle_of_labeled_mol --- arc/mapping/engine.py | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/arc/mapping/engine.py b/arc/mapping/engine.py index 5263962f19..dd7959e6b8 100644 --- a/arc/mapping/engine.py +++ b/arc/mapping/engine.py @@ -1194,33 +1194,6 @@ def glue_maps(maps, pairs_of_reactant_and_products): return [val for _, val in sorted(am_dict.items(), key=lambda item: item[0])] -def cuts_on_cycle_of_labeled_mol(spc: 'ARCSpecies')-> bool: - """A helper function determining whether or not the scission site opens a cycle. - - Args: - spc1: ARCSpecies with a bdes - - Returns: - True if the scission site is on a ring, None if the speceis is unlabeled, False otherwise""" - if not any([atom.label for atom in spc.mol.atoms]): - raise ValueError("cuts_on_cycle_of_labeled_mol recives labeled ARCSpecies only, got an unlabeld species") - - if not spc.mol.is_cyclic(): - return False - - k = spc.mol.get_deterministic_sssr() - labels = [[] for i in range(len(k))] - for index, cycle in enumerate(k): - for atom in cycle: - labels[index].append(int(atom.label)) - - for bde in spc.bdes: - for cycle in labels: - if bde[0]-1 in cycle and bde[1]-1 in cycle: - return True - return False - - def determine_bdes_on_spc_based_on_atom_labels(spc: "ARCSpecies", bde: Tuple(int)) -> bool: """ A function for determining whether or not the species in question containt the bond specified by the bond dissociation indices.