stk.GenericReactionFactory
- class stk.GenericReactionFactory(bond_orders=None)[source]
Bases:
ReactionFactoryCreate reactions for
GenericFunctionalGroupinstances.This reaction factory assumes that the functional groups, which belong to the
EdgeGrouppassed to it, areGenericFunctionalGroupinstances. It returns aReactionsuitable for two such instances.Initialize a
GenericReactionFactory.- Parameters:
bond_orders (
dict, optional) –Maps a
frozensetofGenericFunctionalGroupsubclasses to the bond orders for their respective reactions, if a pair of functional groups is missing, a default bond order of 1 will be used for their reactions. If bond_orders isNone, the followingdictwill be usedimport stk bond_orders = { frozenset({stk.PrimaryAmino, stk.Aldehyde}): 2, frozenset({stk.PrimaryAmino, stk.Aldehyde}): 2, frozenset({stk.Amide, stk.PrimaryAmino}): 2, frozenset({stk.Alkene}): 2, frozenset({stk.Alkyne}): 2, }
This means that if you want to get a reaction for an amine and an aldehyde functional group, the reaction will create bonds with a bond order of 2.
Methods
Get a reaction to use on the edge_group.
- get_reaction(construction_state, edge_group)[source]
Get a reaction to use on the edge_group.
- Parameters:
construction_state (
ConstructionState) – The state of the current construction.edge_group (
EdgeGroup) – The edge group for which a reaction should be found.
- Returns:
The reaction to use on the edge_group.
- Return type: