Modifiers¶
Classes that modify the properties of existing building blocks, returning clones, to get a particular property.
Example:¶
These are most useful when you have a building block with more than the desired number of functional groups, and you want to simply pick the closest, furthest or random options.
Here, we have 3 C-N-C groups, but want the furthest 2.
import stk
import bbprepared
bb = stk.BuildingBlock(
smiles="C1=CC(=CN=C1)C2=NC=C(C=C2)C3=CC=NC=C3",
functional_groups=stk.SmartsFunctionalGroupFactory(
smarts="[#6]~[#7X2]~[#6]",
bonders=(1,),
deleters=(),
),
)
modified = bbprepared.FurthestFGs().modify(
building_block=bb,
desired_functional_groups=2,
)