Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Public Member Functions | List of all members
CDPL::Chem::ReactionComponentGroupingMatchExpression Class Reference

Chem::MatchExpression that constrains reaction substructure matches by the query's component-level groupings (typically derived from the parenthesization of a Daylight SMARTS [SMARTS] pattern). More...

#include <ReactionComponentGroupingMatchExpression.hpp>

+ Inheritance diagram for CDPL::Chem::ReactionComponentGroupingMatchExpression:

Public Types

typedef std::shared_ptr< ReactionComponentGroupingMatchExpressionSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated ReactionComponentGroupingMatchExpression instances. More...
 
- Public Types inherited from CDPL::Chem::MatchExpression< Reaction >
typedef std::shared_ptr< MatchExpressionSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated MatchExpression instances. More...
 

Public Member Functions

 ReactionComponentGroupingMatchExpression (const FragmentList::SharedPointer &comp_grouping)
 Constructs a ReactionComponentGroupingMatchExpression instance for the specified component-level grouping. More...
 
 ReactionComponentGroupingMatchExpression (const ReactionComponentGroupingMatchExpression &rhs)
 Copy-constructs the expression from rhs (the per-evaluation working storage is left in an unspecified empty state). More...
 
bool operator() (const Reaction &query_rxn, const Reaction &target_rxn, const AtomBondMapping &mapping, const Base::Any &aux_data) const
 Checks whether the provided query to target atom/bond mapping candidate statisfies the component-level grouping constraints specified in the constructor. More...
 
bool requiresAtomBondMapping () const
 Returns true to indicate that the expression requires a query to target atom/bond mapping candidate for its evaluation. More...
 
ReactionComponentGroupingMatchExpressionoperator= (const ReactionComponentGroupingMatchExpression &rhs)
 Copy-assigns the component-level grouping constraints from rhs. More...
 
- Public Member Functions inherited from CDPL::Chem::MatchExpression< Reaction >
virtual ~MatchExpression ()
 Virtual Destructor. More...
 
virtual bool operator() (const Reaction &query_obj1, const void &query_obj2, const Reaction &target_obj1, const void &target_obj2, const Base::Any &aux_data) const
 Performs an evaluation of the expression for the given query and target objects. More...
 
virtual bool operator() (const Reaction &query_obj1, const void &query_obj2, const Reaction &target_obj1, const void &target_obj2, const AtomBondMapping &mapping, const Base::Any &aux_data) const
 Performs an evaluation of the expression for the given query and target objects under consideration of the provided candidate atom/bond mapping. More...
 

Detailed Description

Chem::MatchExpression that constrains reaction substructure matches by the query's component-level groupings (typically derived from the parenthesization of a Daylight SMARTS [SMARTS] pattern).

Required component groupings are passed as a Chem::FragmentList: query atoms inside the same fragment must map to a single target component, and query atoms in different fragments must map to different target components.

See also
[SMARTS]

Member Typedef Documentation

◆ SharedPointer

A reference-counted smart pointer [SHPTR] for dynamically allocated ReactionComponentGroupingMatchExpression instances.

Constructor & Destructor Documentation

◆ ReactionComponentGroupingMatchExpression() [1/2]

CDPL::Chem::ReactionComponentGroupingMatchExpression::ReactionComponentGroupingMatchExpression ( const FragmentList::SharedPointer comp_grouping)

Constructs a ReactionComponentGroupingMatchExpression instance for the specified component-level grouping.

Parameters
comp_groupingSpecifies the component-level grouping constraints that must be fulfilled by matching target reactions.

◆ ReactionComponentGroupingMatchExpression() [2/2]

CDPL::Chem::ReactionComponentGroupingMatchExpression::ReactionComponentGroupingMatchExpression ( const ReactionComponentGroupingMatchExpression rhs)

Copy-constructs the expression from rhs (the per-evaluation working storage is left in an unspecified empty state).

Parameters
rhsThe expression to copy.

Member Function Documentation

◆ operator()()

bool CDPL::Chem::ReactionComponentGroupingMatchExpression::operator() ( const Reaction query_rxn,
const Reaction target_rxn,
const AtomBondMapping mapping,
const Base::Any aux_data 
) const

Checks whether the provided query to target atom/bond mapping candidate statisfies the component-level grouping constraints specified in the constructor.

Component-level grouping constraints are specified as a list of Chem::Fragment objects (see constructor argument comp_grouping). The expression evaluates to true only if for each of the specified fragments the provided query to target atom/bond mapping candidate is able to satisfy the following conditions: All query reaction atoms stored in a given Chem::Fragment object must map to atoms that are part of the same molecular graph component of the target reaction. Query atoms in different Chem::Fragment objects must also map to atoms in different target molecular graph components. If the provided mapping candidate fails to fulfill one of these requirements, the expression evaluates to false.

Parameters
query_rxnThe query reaction.
target_rxnThe target reaction.
mappingThe currrent query to target atom/bond mapping candidate.
aux_dataAuxiliary information for expression evaluation (ignored).
Returns
true if the provided query to target mapping fulfills the component-level grouping constraints, and false otherwise.
Note
If invalid component-level grouping constraints have been specified (null pointer or empty fragment list), the expression will always evaluate to true.

◆ requiresAtomBondMapping()

bool CDPL::Chem::ReactionComponentGroupingMatchExpression::requiresAtomBondMapping ( ) const
virtual

Returns true to indicate that the expression requires a query to target atom/bond mapping candidate for its evaluation.

Returns
true.

Reimplemented from CDPL::Chem::MatchExpression< Reaction >.

◆ operator=()

ReactionComponentGroupingMatchExpression& CDPL::Chem::ReactionComponentGroupingMatchExpression::operator= ( const ReactionComponentGroupingMatchExpression rhs)

Copy-assigns the component-level grouping constraints from rhs.

Parameters
rhsThe expression to copy from.
Returns
A reference to itself.

The documentation for this class was generated from the following file: