From da889c1b9bc95d426d43bee4b74c4d29c539fc09 Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Thu, 2 Jan 2025 16:16:42 -0600 Subject: [PATCH] Remove unused private method --- openff/toolkit/utils/openeye_wrapper.py | 32 ------------------------- 1 file changed, 32 deletions(-) diff --git a/openff/toolkit/utils/openeye_wrapper.py b/openff/toolkit/utils/openeye_wrapper.py index 3e902ec52..fa87a1018 100644 --- a/openff/toolkit/utils/openeye_wrapper.py +++ b/openff/toolkit/utils/openeye_wrapper.py @@ -840,38 +840,6 @@ def _read_oemolistream_molecules( return mols - def _smarts_to_networkx(self, substructure_smarts): - import networkx as nx - from openeye import oechem - - qmol = oechem.OEQMol() - if not oechem.OEParseSmiles(qmol, substructure_smarts): - raise SMILESParseError(f"Error parsing SMARTS '{substructure_smarts}'") - - oechem.OEAssignHybridization(qmol) - - graph: nx.classes.graph.Graph = nx.Graph() - for atom in qmol.GetAtoms(): - atomic_number = atom.GetAtomicNum() - - graph.add_node( - atom.GetIdx(), - atomic_number=atomic_number, - formal_charge=atom.GetFormalCharge(), - map_index=atom.GetMapIdx(), - ) - for bond in qmol.GetBonds(): - bond_order = bond.GetOrder() - if bond_order == 0: - raise SMILESParseError(f"A bond in '{substructure_smarts} has order 0") - - graph.add_edge( - bond.GetBgnIdx(), - bond.GetEndIdx(), - bond_order=bond_order, - ) - return graph - def _assign_aromaticity_and_stereo_from_3d(self, offmol): from openeye import oechem