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

AtomSSSRRingSizeMatchExpression. More...

#include <AtomSSSRRingSizeMatchExpression.hpp>

+ Inheritance diagram for CDPL::Chem::AtomSSSRRingSizeMatchExpression< MatchFunc >:

Public Types

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

 AtomSSSRRingSizeMatchExpression (std::size_t ring_size)
 Constructs an AtomSSSRRingSizeMatchExpression instance for the specified query ring size. More...
 
bool operator() (const Atom &query_atom, const MolecularGraph &query_molgraph, const Atom &target_atom, const MolecularGraph &target_molgraph, const Base::Any &aux_data) const
 Checks whether a ring in the SSSR of target_molgraph that contains target_atom matches the query ring size specified in the constructor. 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

template<typename MatchFunc>
class CDPL::Chem::AtomSSSRRingSizeMatchExpression< MatchFunc >

AtomSSSRRingSizeMatchExpression.

Template Parameters
MatchFuncThe type of a binary functor class that implements the logic of testing the size of rings containing the target atom against the query ring size. The overloaded function call operator is required to take the target ring size as its first argument and the query ring size as the second argument (both provided as values of type std::size_t w). The returned result must be implicitly convertible to type bool (true indicates a match, false a mismatch).

Member Typedef Documentation

◆ SharedPointer

template<typename MatchFunc >
typedef std::shared_ptr<AtomSSSRRingSizeMatchExpression> CDPL::Chem::AtomSSSRRingSizeMatchExpression< MatchFunc >::SharedPointer

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

Constructor & Destructor Documentation

◆ AtomSSSRRingSizeMatchExpression()

template<typename MatchFunc >
CDPL::Chem::AtomSSSRRingSizeMatchExpression< MatchFunc >::AtomSSSRRingSizeMatchExpression ( std::size_t  ring_size)
inline

Constructs an AtomSSSRRingSizeMatchExpression instance for the specified query ring size.

Parameters
ring_sizeThe query ring size that has to be matched (according to the result returned by the specified matching functor) by rings containing the checked target atoms.

Member Function Documentation

◆ operator()()

template<typename MatchFunc >
bool CDPL::Chem::AtomSSSRRingSizeMatchExpression< MatchFunc >::operator() ( const Atom query_atom,
const MolecularGraph query_molgraph,
const Atom target_atom,
const MolecularGraph target_molgraph,
const Base::Any aux_data 
) const

Checks whether a ring in the SSSR of target_molgraph that contains target_atom matches the query ring size specified in the constructor.

The actual equivalence test between the specified query ring size and a found target ring size is performed by an instance of the function object type that was provided as template argument for MatchFunc.

Parameters
query_atomThe query atom (ignored).
query_molgraphThe molecular graph containing the query atom (ignored).
target_atomThe checked target atom.
target_molgraphThe molecular graph containing the target atom.
aux_dataAuxiliary information for expression evaluation (ignored).
Returns
true if a ring in the SSSR of target_molgraph containing the specified target atom matches the query ring size (see constructor) under the conditions defined by MatchFunc, and false otherwise.
Note
The SSSR of target_molgraph is retrieved by a call to Chem::getSSSR().

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