Skip to content

Can I handle BuildingBlock during ConstructedMolecule process? #452

Answered by andrewtarzia
KeDUCK00 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @KeDUCK00 , welcome and thank you!

So, the main way to do this in stk is to set the vertex_alignments argument when initialising a topology graph, like in this example (in https://stk.readthedocs.io/en/stable/stk.molecular.topology_graphs.cage.cage.html):

import stk

bb1 = stk.BuildingBlock('NCCN', [stk.PrimaryAminoFactory()])
bb2 = stk.BuildingBlock(
    smiles='O=CC(C=O)C=O',
    functional_groups=[stk.AldehydeFactory()],
)

cage = stk.ConstructedMolecule(
    topology_graph=stk.cage.FourPlusSix(
        building_blocks=(bb1, bb2),
        vertex_alignments={0: 1, 1: 1, 2: 2},
    ),
)

In this instance, you are changing the orientation of the 0th, 1st and 2nd building blocks in this…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@KeDUCK00
Comment options

@andrewtarzia
Comment options

@KeDUCK00
Comment options

Answer selected by KeDUCK00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants