Chemical Data Processing Library Python API - Version 1.2.0
|
Public Member Functions | |
None | __init__ () |
Constructs and initializes a Reactor instance. | |
None | __init__ (Reaction rxn_pattern) |
Constructs and initializes a Reactor instance for the specified reaction pattern. More... | |
int | getObjectID () |
Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
None | setReactionPattern (Reaction rxn_pattern) |
Allows to specify a new reaction pattern for the transformation of reactants to products. More... | |
bool | findReactionSites (Reaction rxn_target) |
Perceives all possible reaction-sites on the reactants of the given reaction target where the specified reaction pattern can be applied. More... | |
int | getNumReactionSites () |
Returns the number of recorded reactions-sites in the last call to findReactionSites(). More... | |
AtomBondMapping | getReactionSite (int idx) |
Returns a reference to the stored reaction-site data object at index idx. More... | |
None | performReaction (AtomBondMapping rxn_site) |
Performs a transformation of the target reactants to corresponding products at the specified reaction-site. More... | |
Properties | |
objectID = property(getObjectID) | |
None CDPL.Chem.Reactor.__init__ | ( | Reaction | rxn_pattern | ) |
Constructs and initializes a Reactor
instance for the specified reaction pattern.
rxn_pattern | The reaction pattern describing the transformation of reactants to products. |
int CDPL.Chem.Reactor.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python Reactor instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b
thus cannot tell reliably whether the two Reactor instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID()
.
None CDPL.Chem.Reactor.setReactionPattern | ( | Reaction | rxn_pattern | ) |
Allows to specify a new reaction pattern for the transformation of reactants to products.
rxn_pattern | The reaction pattern describing the transformation of reactants to products. |
bool CDPL.Chem.Reactor.findReactionSites | ( | Reaction | rxn_target | ) |
Perceives all possible reaction-sites on the reactants of the given reaction target where the specified reaction pattern can be applied.
The specified Chem.Reaction instance rxn_target serves both as a provider for the starting materials (reactant components) in a later reaction transformation (see performReaction()) as well as a container for the generated reaction products.
rxn_target | The reaction target providing the reactants to be transformed. |
True
if matching reaction-sites were found, and False
otherwise.int CDPL.Chem.Reactor.getNumReactionSites | ( | ) |
Returns the number of recorded reactions-sites in the last call to findReactionSites().
AtomBondMapping CDPL.Chem.Reactor.getReactionSite | ( | int | idx | ) |
Returns a reference to the stored reaction-site data object at index idx.
idx | The zero-based index of the reaction-site data object to return. |
Base.IndexError | if no reactions-site data objects are available or idx is not in the range [0, getNumReactionSites() - 1]. |
None CDPL.Chem.Reactor.performReaction | ( | AtomBondMapping | rxn_site | ) |
Performs a transformation of the target reactants to corresponding products at the specified reaction-site.
The reactant components of the Chem.Reaction object specified in a prior call to findReactionSites() serve as starting materials for the reaction transformation into corresponding product molecules (according to the set reaction pattern). The input molecules are left unchanged by the transformation. New molecules will be generated that are directly stored as the product components of the given target reaction object. Note that the product molecules generated in a previous call will not be discarded and are still accessible after new products have been generated.
rxn_site | Specifies the reaction-site where the transformation shall take place. |