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

AtomConfigurationMatchExpression. More...

#include <AtomConfigurationMatchExpression.hpp>

+ Inheritance diagram for CDPL::Chem::AtomConfigurationMatchExpression:

Public Types

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

Public Member Functions

 AtomConfigurationMatchExpression (const StereoDescriptor &query_stereo_descr, const Atom &query_atom, bool not_match, bool allow_part_maps)
 Constructs an AtomConfigurationMatchExpression instance for the specified matching mode and stereo configuration constraints. More...
 
bool operator() (const Atom &query_atom, const MolecularGraph &query_molgraph, const Atom &target_atom, const MolecularGraph &target_molgraph, const AtomBondMapping &mapping, const Base::Any &aux_data) const
 Checks whether the stereo configuration of target_atom 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< Atom, MolecularGraph >
virtual ~MatchExpression ()
 Virtual Destructor. More...
 
virtual bool operator() (const Atom &query_obj1, const MolecularGraph &query_obj2, const Atom &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 Atom &query_obj1, const MolecularGraph &query_obj2, const Atom &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...
 
virtual bool requiresAtomBondMapping () const
 Tells whether the expression must be reevaluated after a query to target atom/bond mapping candidate has been found. More...
 

Detailed Description

AtomConfigurationMatchExpression.

Member Typedef Documentation

◆ SharedPointer

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

Constructor & Destructor Documentation

◆ AtomConfigurationMatchExpression()

CDPL::Chem::AtomConfigurationMatchExpression::AtomConfigurationMatchExpression ( const StereoDescriptor query_stereo_descr,
const Atom query_atom,
bool  not_match,
bool  allow_part_maps 
)

Constructs an AtomConfigurationMatchExpression instance for the specified matching mode and stereo configuration constraints.

Parameters
query_stereo_descrThe descriptor object specifying the query atom's stereo configuration reference atoms and associated configuration constraints on matching target atoms.
query_atomThe atom for which this AtomConfigurationMatchExpression instance gets constructed.
not_matchSpecifies whether the stereo configuration of a target atom actually has to match (true) or not match (false) the query configuration constraints.
allow_part_mapsSpecifies whether or not a target atom 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 atom mapping may not be complete.

Member Function Documentation

◆ operator()()

bool CDPL::Chem::AtomConfigurationMatchExpression::operator() ( const Atom query_atom,
const MolecularGraph query_molgraph,
const Atom target_atom,
const MolecularGraph target_molgraph,
const AtomBondMapping mapping,
const Base::Any aux_data 
) const

Checks whether the stereo configuration of target_atom 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 stereo configuration of the checked target atom 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::AtomConfiguration are supported - any other flags will be ignored.

Parameters
query_atomThe query atom.
query_molgraphThe molecular graph containing the query atom (ignored).
target_atomThe checked target atom.
target_molgraphThe molecular graph containing the target atom (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 stereo configuration of the target atom matches one of the specified query configurations, and true if not. Otherwise, the method will return true if the target configuration does match one of the specified configurations, and false if all allowed configurations remain unmatched.
Note
If no valid query stereo descriptor was specified or query_atom is not identical to the query atom specified in the constrctor, the method will return true - irrespective of matching mode and actual target atom configuration!

◆ requiresAtomBondMapping()

bool CDPL::Chem::AtomConfigurationMatchExpression::requiresAtomBondMapping ( ) const

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

Returns
true.

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