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

ReactionAtomMappingMatchExpression. More...

#include <ReactionAtomMappingMatchExpression.hpp>

+ Inheritance diagram for CDPL::Chem::ReactionAtomMappingMatchExpression:

Public Types

typedef std::shared_ptr< ReactionAtomMappingMatchExpressionSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated ReactionAtomMappingMatchExpression 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

 ReactionAtomMappingMatchExpression (const AtomMapping::SharedPointer &atom_mapping)
 Constructs a ReactionAtomMappingMatchExpression instance for the specified reactant to product atom mapping. More...
 
bool operator() (const Reaction &query_rxn, const Reaction &target_rxn, const AtomBondMapping &mapping, const Base::Any &matched_rxn_roles) const
 Checks whether the reactant to product atom mapping of the target reaction matches the query atom mapping 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...
 
- 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

ReactionAtomMappingMatchExpression.

Member Typedef Documentation

◆ SharedPointer

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

Constructor & Destructor Documentation

◆ ReactionAtomMappingMatchExpression()

CDPL::Chem::ReactionAtomMappingMatchExpression::ReactionAtomMappingMatchExpression ( const AtomMapping::SharedPointer atom_mapping)

Constructs a ReactionAtomMappingMatchExpression instance for the specified reactant to product atom mapping.

Parameters
atom_mappingSpecifies the reactant to product atom mapping constraint that has to be fulfilled by matching target reactions.

Member Function Documentation

◆ operator()()

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

Checks whether the reactant to product atom mapping of the target reaction matches the query atom mapping specified in the constructor.

The query reactant to product atom mapping that was specified at construction time (see constructor) restricts the allowed correspondences between reactant and product atoms of the evaluated target reaction. The atom mapping of the target reaction is considered to match the query mapping only if each reactant/product atom pair of the query mapping matches a pair of target reactant/product atoms that belong to the same atom class (according to the target reaction's atom mapping retrieved from the property Chem::ReactionProperty::ATOM_MAPPING). If the mapping of a query reactant atom is not unique (i.e. maps to multiple product atoms of the same class), then the target reaction has to match only one of the specified mappings for that query atom.

Parameters
query_rxnThe query reaction .
target_rxnThe checked target reaction.
mappingThe current query to target atom/bond mapping candidate.
matched_rxn_rolesHolds a bitwise OR combination of the flags defined in namespace Chem::ReactionRole specifying the reaction roles that were considered in the performed reaction substructure search.
Returns
true if the reactant to product atom mapping of the target reaction matches the query atom mapping, and false otherwise.
Note
If an invalid query reactant to product atom mapping has been specified (null pointer or empty mapping) or the reaction substructure matching is incomplete (the RSSS did not consider both the reactants and products of the query reaction - see argument matched_rxn_roles), the expression will evaluate to true.

◆ requiresAtomBondMapping()

bool CDPL::Chem::ReactionAtomMappingMatchExpression::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 >.


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