stk.TerminalAlkyneFactory
- class stk.TerminalAlkyneFactory(bonders=(1,), deleters=(2, 3), placers=None)[source]
Bases:
FunctionalGroupFactory
Creates
Alkyne
instances.Creates functional groups from substructures, which match the
[*][C]#[C][H]
functional group string.Examples
Creating Functional Groups with the Factory
You want to create a building block which has
Alkyne
functional groups, but only if they are terminal. You want the non-terminal carbon atom in those functional groups to be the bonder atom, and the terminal CH group to be the deleter atoms.import stk building_block = stk.BuildingBlock( smiles='C#CCCCCC#C', functional_groups=(stk.TerminalAlkyneFactory(), ), )
Changing the Bonder and Deleter Atoms
You want to create a building block which has
Alkyne
functional groups. You want the carbon atoms to be the bonder atoms and you don’t want any deleter atoms.import stk terminal_alkyne_factory = stk.TerminalAlkyneFactory( # The indices of the carbon atoms in the functional # group string (see docstring) are 1 and 2. bonders=(1, 2), deleters=(), ) building_block = stk.BuildingBlock( smiles='C#CCCCCC#C', functional_groups=(terminal_alkyne_factory, ), )
See also
GenericFunctionalGroup
Defines bonders and deleters.
Initialize a
TerminalAlkyneFactory
instance.- Parameters:
bonders (
tuple
ofint
) – The indices of atoms in the functional group string, which are bonder atoms.deleters (
tuple
ofint
) – The indices of atoms in the functional group string, which are deleter atoms.placers (
tuple
ofint
, optional) – The indices of atoms in the functional group string, which are placer atoms. IfNone
, bonders will be used.
Methods
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.
Examples