![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Chem::MatchExpression that constrains target atoms by the size of the SSSR ring(s) containing them. More...
#include <AtomSSSRRingSizeMatchExpression.hpp>
Inheritance diagram for CDPL::Chem::AtomSSSRRingSizeMatchExpression< MatchFunc >:Public Types | |
| typedef std::shared_ptr< AtomSSSRRingSizeMatchExpression > | SharedPointer |
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< MatchExpression > | SharedPointer |
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... | |
Chem::MatchExpression that constrains target atoms by the size of the SSSR ring(s) containing them.
For each target atom the expression iterates the perceived SSSR of the target molecular graph and applies the supplied binary functor MatchFunc to compare the target ring size against the configured query ring size. Used in SMARTS substructure searches with ring-size atom constraints (e.g. [R6]).
| MatchFunc | The 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). The returned result must be implicitly convertible to type bool (true indicates a match, false a mismatch). |
| typedef std::shared_ptr<AtomSSSRRingSizeMatchExpression> CDPL::Chem::AtomSSSRRingSizeMatchExpression< MatchFunc >::SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated AtomSSSRRingSizeMatchExpression instances.
|
inline |
Constructs an AtomSSSRRingSizeMatchExpression instance for the specified query ring size.
| ring_size | The 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. |
| 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.
| query_atom | The query atom (ignored). |
| query_molgraph | The molecular graph containing the query atom (ignored). |
| target_atom | The checked target atom. |
| target_molgraph | The molecular graph containing the target atom. |
| aux_data | Auxiliary information for expression evaluation (ignored). |
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.