OEMatchFunc¶
template<class Arg>
class OEMatchFunc : public OESystem::OEUnaryPredicate<Arg>
This class represents OEMatchFunc template functor that identifies objects (OEAtomBase, OEBondBase) that match a query substructure specified in construction.
See also
The following methods are publicly inherited from OEUnaryPredicate:
The following methods are publicly inherited from OEUnaryFunction:
The following specializations exist for this template:
Specialized Functor |
Definition |
---|---|
OEMatchAtomBase |
|
OEMatchGraphMol |
|
OEMatchMolBase |
Constructors¶
OEMatchFunc(const char *smarts)
Constructs the functor with the internal substructure search specified by the ‘smarts’ (SMARTS) pattern.
OEMatchFunc(const OEQMolBase &qmol)
Constructs the functor with the internal substructure search specified by the ‘qmol’ query molecule.
OEMatchFunc(const OEMolBase &mol, unsigned int aexpr, unsigned int bexpr)
Constructs the functor with the internal substructure search
that is created from ‘mol’ using the specified expression options.
The atom and bond expression options passed as the second and
third arguments to the method are defined
in the OEExprOpts
namespace. The expression
options are used to convert the atom and bond data into
expression trees which are used during the subgraph search.
operator()¶
bool operator()(const Arg &arg) const
Returns true
if the ‘arg’ object matched by the query molecule
defined in construction.
operator bool¶
operator bool()
Returns true
, if the substructure search object was initialized
correctly.
CreateCopy¶
OESystem::OEUnaryFunction<Arg, bool> *CreateCopy() const
Deep copy constructor that returns a copy of the object. The memory for the returned OEMatchFunc object is dynamically allocated and owned by the caller.
The returned copy should be deallocated using C++ delete operator in order to prevent a memory leak.