RDKit: RDKit::RecursiveStructureQuery Class Reference

| RDKit Open-source cheminformatics and machine learning.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | List of all members
RDKit::RecursiveStructureQuery Class Reference

allows use of recursive structure queries (e.g. recursive SMARTS) More...

`#include <QueryOps.h>`

Inheritance diagram for RDKit::RecursiveStructureQuery:

## Public Member Functions
| RecursiveStructureQuery ()
| RecursiveStructureQuery (ROMol const *query, unsigned int serialNumber=0)
| initialize from an ROMol pointer More...
void | setQueryMol (ROMol const *query)
| sets the molecule we'll use recursively More...
ROMol const * | getQueryMol () const
| returns a pointer to our query molecule More...
Queries::Query< int, Atom const *, true > * | copy () const
| returns a copy of this query More...
unsigned int | getSerialNumber () const
Public Member Functions inherited from Queries::SetQuery< int, Atom const *, true >
| SetQuery ()
void | insert (const intwhat)
| insert an entry into our `set` More...
void | clear ()
| clears our `set` More...
bool | Match (const Atom const *what) const
| returns whether or not we match the argument More...
Query< int, Atom const *, needsConversion > * | copy () const
| returns a copy of this Query More...
CONTAINER_TYPE::const_iterator | beginSet () const
CONTAINER_TYPE::const_iterator | endSet () const
unsigned int | size () const
std::string | getFullDescription () const
| returns a fuller text description More...
Public Member Functions inherited from Queries::Query< int, Atom const *, needsConversion >
| Query ()
virtual | ~Query ()
void | setNegation (bool what)
| sets whether or not we are negated More...
bool | getNegation () const
| returns whether or not we are negated More...
void | setDescription (const std::string &descr)
| sets our text description More...
void | setDescription (const char *descr)
const std::string & | getDescription () const
| returns our text description More...
void | setMatchFunc (bool(*what)(int))
| sets our match function More...
void | setDataFunc (int(*what)(Atom const *))
| sets our data function More...
void | addChild (CHILD_TYPE child)
| adds a child to our list of children More...
CHILD_VECT_CI | beginChildren () const
| returns an iterator for the beginning of our child vector More...
CHILD_VECT_CI | endChildren () const
| returns an iterator for the end of our child vector More...

## Static Public Member Functions
static int | getAtIdx (Atom const *at)
| returns the index of an atom More...

## Additional Inherited Members
Public Types inherited from Queries::SetQuery< int, Atom const *, true >
typedef std::set< int > | CONTAINER_TYPE
Public Types inherited from Queries::Query< int, Atom const *, needsConversion >
typedef boost::shared_ptr< Query< int, Atom const *, needsConversion > > | CHILD_TYPE
typedef std::vector< CHILD_TYPE > | CHILD_VECT
typedef CHILD_VECT::iterator | CHILD_VECT_I
typedef CHILD_VECT::const_iterator | CHILD_VECT_CI
Public Attributes inherited from Queries::Query< int, Atom const *, needsConversion >
bool(*)(int) | getMatchFunc () const
| returns our match function: More...
int(*)(Atom const *) | getDataFunc () const
| returns our data function: More...
Protected Member Functions inherited from Queries::Query< int, Atom const *, needsConversion >
int | TypeConvert (intwhat, Int2Type< false >) const
| calls our `dataFunc` (if it's set) on `what` and returns the result, otherwise returns `what` More...
int | TypeConvert (Atom const *what, Int2Type< true >) const
| calls our `dataFunc` (which must be set) on `what` and returns the More...
Protected Attributes inherited from Queries::SetQuery< int, Atom const *, true >
CONTAINER_TYPE | d_set
Protected Attributes inherited from Queries::Query< int, Atom const *, needsConversion >
std::string | d_description
CHILD_VECT | d_children
bool | df_negate
bool(* | d_matchFunc )(int)
int(* | d_dataFunc )(Atom const *)

## Detailed Description

allows use of recursive structure queries (e.g. recursive SMARTS)

Definition at line 518 of file QueryOps.h.

## Constructor & Destructor Documentation

RDKit::RecursiveStructureQuery::RecursiveStructureQuery | ( |  | ) |
| inline

Definition at line 521 of file QueryOps.h.

References Queries::Query< int, ConstAtomPtr, needsConversion >::setDataFunc(), and Queries::Query< int, ConstAtomPtr, needsConversion >::setDescription().

RDKit::RecursiveStructureQuery::RecursiveStructureQuery | ( | ROMol const * | query,
|  | unsigned int | serialNumber = `0`
| ) |  |
| inline

initialize from an ROMol pointer

Notes

- this takes over ownership of the pointer

Definition at line 531 of file QueryOps.h.

References Queries::Query< int, ConstAtomPtr, needsConversion >::setDataFunc(), and Queries::Query< int, ConstAtomPtr, needsConversion >::setDescription().

## Member Function Documentation

Queries::Query<int, Atom const *, true>* RDKit::RecursiveStructureQuery::copy | ( |  | ) | const
| inlinevirtual

returns a copy of this query

Reimplemented from Queries::Query< int, Atom const *, needsConversion >.

Definition at line 554 of file QueryOps.h.

References Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::d_description, Queries::Query< int, ConstAtomPtr, needsConversion >::d_description, Queries::Query< int, ConstAtomPtr, needsConversion >::getNegation(), Queries::SetQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::insert(), and Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::setNegation().

static int RDKit::RecursiveStructureQuery::getAtIdx | ( | Atom const * | at | ) |
| inlinestatic

returns the index of an atom

Definition at line 539 of file QueryOps.h.

References RDKit::Atom::getIdx(), and PRECONDITION.

ROMol const* RDKit::RecursiveStructureQuery::getQueryMol | ( |  | ) | const
| inline

returns a pointer to our query molecule

Definition at line 551 of file QueryOps.h.

unsigned int RDKit::RecursiveStructureQuery::getSerialNumber | ( |  | ) | const
| inline

Definition at line 567 of file QueryOps.h.

void RDKit::RecursiveStructureQuery::setQueryMol | ( | ROMol const * | query | ) |
| inline

sets the molecule we'll use recursively

Notes

- this takes over ownership of the pointer

Definition at line 549 of file QueryOps.h.

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

- QueryOps.h