Skip to content

Commit

Permalink
removed cuts_on_cycle_of_labeled_mol
Browse files Browse the repository at this point in the history
  • Loading branch information
kfir4444 committed Sep 26, 2023
1 parent a92ab7d commit f6807cb
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions arc/mapping/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f6807cb

Please sign in to comment.