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

BondConfigurationMatchExpression. More...

#include <BondConfigurationMatchExpression.hpp>

+ Inheritance diagram for CDPL::Chem::BondConfigurationMatchExpression:

Public Types

typedef std::shared_ptr< BondConfigurationMatchExpressionSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated BondConfigurationMatchExpression instances. More...
 
- Public Types inherited from CDPL::Chem::MatchExpression< Bond, MolecularGraph >
typedef std::shared_ptr< MatchExpressionSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated MatchExpression instances. More...
 

Public Member Functions

 BondConfigurationMatchExpression (const StereoDescriptor &query_stereo_descr, const Bond &query_bond, bool not_match, bool allow_part_maps)
 Constructs an BondConfigurationMatchExpression instance for the specified matching mode, cis/trans bond configuration constraints. More...
 
bool operator() (const Bond &query_bond, const MolecularGraph &query_molgraph, const Bond &target_bond, const MolecularGraph &target_molgraph, const AtomBondMapping &mapping, const Base::Any &aux_data) const
 Checks whether the cis/trans configuration of target_bond satisfies (or does not satisfy) the configuration 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...
 
- Public Member Functions inherited from CDPL::Chem::MatchExpression< Bond, MolecularGraph >
virtual ~MatchExpression ()
 Virtual Destructor. More...
 
virtual bool operator() (const Bond &query_obj1, const MolecularGraph &query_obj2, const Bond &target_obj1, const MolecularGraph &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 Bond &query_obj1, const MolecularGraph &query_obj2, const Bond &target_obj1, const MolecularGraph &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

BondConfigurationMatchExpression.

Member Typedef Documentation

◆ SharedPointer

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

Constructor & Destructor Documentation

◆ BondConfigurationMatchExpression()

CDPL::Chem::BondConfigurationMatchExpression::BondConfigurationMatchExpression ( const StereoDescriptor query_stereo_descr,
const Bond query_bond,
bool  not_match,
bool  allow_part_maps 
)

Constructs an BondConfigurationMatchExpression instance for the specified matching mode, cis/trans bond configuration constraints.

Parameters
query_stereo_descrThe descriptor object specifying the query bond's cis/trans configuration reference atoms and associated configuration constraints on matching target bonds.
query_bondThe bond for which this BondConfigurationMatchExpression instance gets constructed.
not_matchSpecifies whether the configuration of a target bond actually has to match (true) or not match (false) the query configuration constraints.
allow_part_mapsSpecifies whether or not a target bond that has an incomplete query to target neighbor atom/bond mapping shall be considered to match the query configuration constraints. This is important for maximum common substructure searches where the provided query to target mapping may not be complete.

Member Function Documentation

◆ operator()()

bool CDPL::Chem::BondConfigurationMatchExpression::operator() ( const Bond query_bond,
const MolecularGraph query_molgraph,
const Bond target_bond,
const MolecularGraph target_molgraph,
const AtomBondMapping mapping,
const Base::Any aux_data 
) const

Checks whether the cis/trans configuration of target_bond satisfies (or does not satisfy) the configuration constraints specified in the constructor.

The specified configuration constraint flags are interpreted in a 'logical OR' manner. That is, the cis/trans configuration of the checked target bond only has to match (or not match) one of the specified query configurations to satisfy the overall configuration constraints. Note that only the flags defined in namespace Chem::BondConfiguration are supported - any other flags will be ignored.

Parameters
query_bondThe query bond.
query_molgraphThe molecular graph containing the query bond (ignored).
target_bondThe checked target bond.
target_molgraphThe molecular graph containing the target bond (ignored).
mappingThe current query to target atom/bond mapping candidate.
aux_dataAuxiliary information for expression evaluation (ignored).
Returns
If the matching mode is 'not match' (see constructor), the method returns false if the configuration of the target bond matches one of the specified query configurations, and true if not. Otherwise, the method will return true if the target bond configuration does match one of the specified query configurations, and false if all allowed configurations remain unmatched.
Note
If no valid query stereo descriptor was specified or query_bond is not identical to the query bond specified in the constrctor, the method will return true - irrespective of matching mode and actual target bond configuration!

◆ requiresAtomBondMapping()

bool CDPL::Chem::BondConfigurationMatchExpression::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< Bond, MolecularGraph >.


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