stk.SecondaryAminoFactory
- class stk.SecondaryAminoFactory(bonders=(1,), deleters=(0,), placers=None)[source]
Bases:
FunctionalGroupFactoryCreates
SecondaryAminoinstances.Creates functional groups from substructures, which match the
[H][N]([#6])[#6]functional group string.Examples
Creating Functional Groups with the Factory
You want to create a building block which has
SecondaryAminofunctional groups. You want the nitrogen atom in those functional groups to be the bonder atom, and the hydrogen atom to be the deleter atom.import stk building_block = stk.BuildingBlock( smiles='N(CCCC)CCCC', functional_groups=(stk.SecondaryAminoFactory(), ), )
Changing the Bonder and Deleter Atoms
You want to create a building block which has
SecondaryAminofunctional groups. You want the nitrogen atom to be the bonder atom and one of the carbon atoms to be the deleter atom.import stk secondary_amino_factory = stk.SecondaryAminoFactory( # The index of the nitrogen atom in the functional # group string (see docstring) is 1. bonders=(1, ), # The index of one of the carbon atoms in the functional # group string (see docstring) is 2. deleters=(2, ), ) building_block = stk.BuildingBlock( smiles='N(CCCC)CCCC', functional_groups=(secondary_amino_factory, ), )
See also
GenericFunctionalGroupDefines bonders and deleters.
Initialize a
SecondaryAminoFactoryinstance.- Parameters:
bonders (
tupleofint) – The indices of atoms in the functional group string, which are bonder atoms.deleters (
tupleofint) – The indices of atoms in the functional group string, which are deleter atoms.placers (
tupleofint, 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