stko.MoleculeSplitter

class stko.MoleculeSplitter(breaker_smarts, bond_deleter_ids)[source]

Bases: object

Split an stk.molecule into many with dummy atoms.

Parameters:
  • breaker_smarts (str) – SMARTS string used to find the substructure to break.

  • bond_deleter_ids (tuple[int, ...]) – Index of atoms in breaker_smarts to break bond between.

Examples

Given a molecule, this class allows you to break bonds based on breaker_smarts between the atoms in bond_deleter_ids.

import stk
import stko

full_mol = stk.BuildingBlock('C1=CC=NC(=C1)C=NC2=CC=C(C=C2)Br')

splitter = stko.MoleculeSplitter(
    breaker_smarts='[#6X3]~[#7X2]~[#6X3H1]~[#6X3!H1]',
    bond_deleter_ids=(0, 1),
)
split_mols = splitter.split(full_mol)

Methods

split

Split a molecule.

split(molecule)[source]

Split a molecule.

Parameters:

molecule (Molecule) – Molecule to modify.

Returns:

The resulting list of molecules.

Return type:

list[BuildingBlock]