Skip to content

Commit

Permalink
Remove unused private method
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwthompson committed Jan 2, 2025
1 parent c303f30 commit da889c1
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions openff/toolkit/utils/openeye_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit da889c1

Please sign in to comment.