Chemical Data Processing Library C++ API - Version 1.2.0
|
#include <Reactor.hpp>
Public Types | |
typedef AtomBondMapping | ReactionSite |
Stores information about perceived reaction-sites. More... | |
typedef ReactionSubstructureSearch::MappingIterator | ReactionSiteIterator |
A mutable random access iterator used to iterate over the perceived reaction-sites. More... | |
typedef ReactionSubstructureSearch::ConstMappingIterator | ConstReactionSiteIterator |
A constant random access iterator used to iterate over the perceived reaction-sites. More... | |
Public Member Functions | |
Reactor () | |
Constructs and initializes a Reactor instance. More... | |
Reactor (const Reaction &rxn_pattern) | |
Constructs and initializes a Reactor instance for the specified reaction pattern. More... | |
Reactor (const Reactor &)=delete | |
~Reactor () | |
Destructor. More... | |
Reactor & | operator= (const Reactor &)=delete |
void | setReactionPattern (const 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... | |
std::size_t | getNumReactionSites () const |
Returns the number of recorded reactions-sites in the last call to findReactionSites(). More... | |
ReactionSite & | getReactionSite (std::size_t idx) |
Returns a non-const reference to the stored reaction-site data object at index idx. More... | |
const ReactionSite & | getReactionSite (std::size_t idx) const |
Returns a const reference to the stored reaction-site data object at index idx. More... | |
ReactionSiteIterator | getReactionSitesBegin () |
Returns a mutable iterator pointing to the beginning of the stored reaction-site data objects. More... | |
ConstReactionSiteIterator | getReactionSitesBegin () const |
Returns a constant iterator pointing to the beginning of the stored reaction-site data objects. More... | |
ReactionSiteIterator | getReactionSitesEnd () |
Returns a mutable iterator pointing to the end of the stored reaction-site data objects. More... | |
ConstReactionSiteIterator | getReactionSitesEnd () const |
Returns a constant iterator pointing to the end of the stored reaction-site data objects. More... | |
ReactionSiteIterator | begin () |
Returns a mutable iterator pointing to the beginning of the stored reaction-site data objects. More... | |
ConstReactionSiteIterator | begin () const |
Returns a constant iterator pointing to the beginning of the stored reaction-site data objects. More... | |
ReactionSiteIterator | end () |
Returns a mutable iterator pointing to the end of the stored reaction-site data objects. More... | |
ConstReactionSiteIterator | end () const |
Returns a constant iterator pointing to the end of the stored reaction-site data objects. More... | |
void | performReaction (const ReactionSite &rxn_site) |
Performs a transformation of the target reactants to corresponding products at the specified reaction-site. More... | |
Stores information about perceived reaction-sites.
A mutable random access iterator used to iterate over the perceived reaction-sites.
typedef ReactionSubstructureSearch::ConstMappingIterator CDPL::Chem::Reactor::ConstReactionSiteIterator |
A constant random access iterator used to iterate over the perceived reaction-sites.
CDPL::Chem::Reactor::Reactor | ( | ) |
Constructs and initializes a Reactor
instance.
CDPL::Chem::Reactor::Reactor | ( | const 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. |
|
delete |
CDPL::Chem::Reactor::~Reactor | ( | ) |
Destructor.
Destroys the Reactor
instance and frees all allocated resources.
void CDPL::Chem::Reactor::setReactionPattern | ( | const 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. |
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. std::size_t CDPL::Chem::Reactor::getNumReactionSites | ( | ) | const |
Returns the number of recorded reactions-sites in the last call to findReactionSites().
ReactionSite& CDPL::Chem::Reactor::getReactionSite | ( | std::size_t | idx | ) |
Returns a non-const
reference to the stored reaction-site data object at index idx.
idx | The zero-based index of the reaction-site data object to return. |
const
reference to the reaction-site data object at index idx. Base::IndexError | if no reactions-site data objects are available or idx is not in the range [0, getNumReactionSites() - 1]. |
const ReactionSite& CDPL::Chem::Reactor::getReactionSite | ( | std::size_t | idx | ) | const |
Returns a const
reference to the stored reaction-site data object at index idx.
idx | The zero-based index of the reaction-site data object to return. |
const
reference to the reaction-site data object at index idx. Base::IndexError | if no reactions-site data objects are available or idx is not in the range [0, getNumReactionSites() - 1]. |
ReactionSiteIterator CDPL::Chem::Reactor::getReactionSitesBegin | ( | ) |
Returns a mutable iterator pointing to the beginning of the stored reaction-site data objects.
ConstReactionSiteIterator CDPL::Chem::Reactor::getReactionSitesBegin | ( | ) | const |
Returns a constant iterator pointing to the beginning of the stored reaction-site data objects.
ReactionSiteIterator CDPL::Chem::Reactor::getReactionSitesEnd | ( | ) |
Returns a mutable iterator pointing to the end of the stored reaction-site data objects.
ConstReactionSiteIterator CDPL::Chem::Reactor::getReactionSitesEnd | ( | ) | const |
Returns a constant iterator pointing to the end of the stored reaction-site data objects.
ReactionSiteIterator CDPL::Chem::Reactor::begin | ( | ) |
Returns a mutable iterator pointing to the beginning of the stored reaction-site data objects.
ConstReactionSiteIterator CDPL::Chem::Reactor::begin | ( | ) | const |
Returns a constant iterator pointing to the beginning of the stored reaction-site data objects.
ReactionSiteIterator CDPL::Chem::Reactor::end | ( | ) |
Returns a mutable iterator pointing to the end of the stored reaction-site data objects.
ConstReactionSiteIterator CDPL::Chem::Reactor::end | ( | ) | const |
Returns a constant iterator pointing to the end of the stored reaction-site data objects.
void CDPL::Chem::Reactor::performReaction | ( | const ReactionSite & | 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. |