stko.functional_groups.ThreeSiteFactory

class stko.functional_groups.ThreeSiteFactory(smarts, bonders=(1,), deleters=())[source]

Bases: FunctionalGroupFactory

Find ThreeSite functional groups in molecules.

Warning

This code is only present in the latest versions of stko that require Python 3.11!

Parameters:
  • smarts (str) – SMARTS string to use to find functional group. Of form [neighbour][binder][neighbour].

  • bonders (tuple[int, ...]) – The bonder atoms, this should be the same ID as binder.

  • deleters (tuple[int, ...]) – The deleter atoms, there should be none.

Methods

get_functional_groups

Yield functional groups in molecule.

get_functional_groups(molecule)[source]

Yield functional groups in molecule.

Parameters:

molecule (Molecule) – The molecule, whose functional groups are to be found.

Yields:

FunctionalGroup – A functional group in molecule.

Return type:

Iterable[ThreeSiteFG]

Examples

See FunctionalGroupFactory.