Bromo Factory

class BromoFactory(bonders=(0), deleters=(1), placers=None)[source]

Bases: stk.molecular.functional_groups.factories.functional_group_factory.FunctionalGroupFactory

Creates Bromo instances.

Creates functional groups from substructures, which match the [*][Br] functional group string.

Examples

Creating Functional Groups with the Factory

You want to create a building block which has Bromo functional groups. You want the atom bonded to the bromine to be the bonder atom, and the bromine atom to be the deleter atom.

import stk

building_block = stk.BuildingBlock(
    smiles='BrCCCBr',
    functional_groups=(stk.BromoFactory(), ),
)

See also

GenericFunctionalGroup

Defines bonders and deleters.

Methods

get_functional_groups(molecule)

Yield functional groups in molecule.

__init__(bonders=(0), deleters=(1), placers=None)[source]

Initialize a BromoFactory instance.

Parameters
  • bonders (tuple of int) – The indices of atoms in the functional group string, which are bonder atoms.

  • deleters (tuple of int) – The indices of atoms in the functional group string, which are deleter atoms.

  • placers (tuple of int, optional) – The indices of atoms in the functional group string, which are placer atoms. If None, bonders will be used.

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.

Examples

See FunctionalGroupFactory.