stko.topology_functions.UnreactedTopologyGraph
- class stko.topology_functions.UnreactedTopologyGraph(topology_graph)[source]
Bases:
objectA class containing topology graphs and performing subset of reactions.
Use this to get partially reacted topology graphs.
import stk import stko bb1 = stk.BuildingBlock( smiles="NCCN", functional_groups=(stk.PrimaryAminoFactory(),) ) bb2 = stk.BuildingBlock( smiles="O=CC(C=O)C=O", functional_groups=(stk.AldehydeFactory(),) ) cage_graphs = stko.topology_functions.UnreactedTopologyGraph( stk.cage.TwoPlusThree((bb1, bb2)) ) # Get a pool of NamedIntermediates with only 1 reaction, which will # contain the reacted + the building blocks (there are 2). You can # iterate through that pool to get the named intermediate, containing # an stk molecule and other information about the intermediate. pool = cage_graphs.get_named_intermediates(n=1)
Methods
Get all the reaction classes possible.
Yield constructed molecules with up to n reactions performed.
Get the building blocks present in a constructed molecule.
Yield constructed molecules with n reactions performed.
Get all the reaction results.
Yield constructed molecules for possible reaction combos.
- Parameters:
topology_graph (TopologyGraph)
- get_available_reactions()[source]
Get all the reaction classes possible.
- Return type:
Sequence[Reaction]
- get_named_intermediates(n=None)[source]
Yield constructed molecules with up to n reactions performed.
- Parameters:
n (int | None)
- Return type:
- get_present_building_blocks(const_mol, subset_ids)[source]
Get the building blocks present in a constructed molecule.