Loading...
Searching...
No Matches
RDKit::SmartsMatcher Class Reference

`#include <FilterMatchers.h>`

Inheritance diagram for RDKit::SmartsMatcher:

## Public Member Functions

| SmartsMatcher (const std::string &name=SMARTS_MATCH_NAME_DEFAULT)
| Construct a SmartsMatcher.
| SmartsMatcher (const ROMol &pattern, unsigned int minCount=1, unsigned int maxCount=UINT_MAX)
| Construct a SmartsMatcher from a query molecule.
| SmartsMatcher (const std::string &name, const ROMol &pattern, unsigned int minCount=1, unsigned int maxCount=UINT_MAX)
| Construct a SmartsMatcher.
| SmartsMatcher (const std::string &name, const std::string &smarts, unsigned int minCount=1, unsigned int maxCount=UINT_MAX)
| Construct a SmartsMatcher from a smarts pattern.
| SmartsMatcher (const std::string &name, ROMOL_SPTR onPattern, unsigned int minCount=1, unsigned int maxCount=UINT_MAX)
| Construct a SmartsMatcher from a shared_ptr.
| SmartsMatcher (const SmartsMatcher &rhs)
bool | isValid () const override
| Returns True if the Smarts pattern is valid.
const ROMOL_SPTR & | getPattern () const
| Return the shared_ptr to the underlying query molecule.
void | setPattern (const std::string &smarts)
| Set the smarts pattern for the matcher.
void | setPattern (const ROMol &mol)
| Set the query molecule for the matcher.
void | setPattern (const ROMOL_SPTR &pat)
| Set the shared query molecule for the matcher.
unsigned int | getMinCount () const
| Get the minimum match count for the pattern to be true.
void | setMinCount (unsigned int val)
| Set the minimum match count for the pattern to be true.
unsigned int | getMaxCount () const
| Get the maximum match count for the pattern to be true.
void | setMaxCount (unsigned int val)
| Set the maximum match count for the pattern to be true.
bool | getMatches (const ROMol &mol, std::vector< FilterMatch > &matchVect) const override
| getMatches
bool | hasMatch (const ROMol &mol) const override
| hasMatches
boost::shared_ptr< FilterMatcherBase > | copy () const override
Public Member Functions inherited from RDKit::FilterMatcherBase
| FilterMatcherBase (std::string name=DEFAULT_FILTERMATCHERBASE_NAME)
| FilterMatcherBase (const FilterMatcherBase &rhs)
virtual | ~FilterMatcherBase ()
virtual std::string | getName () const
virtual boost::shared_ptr< FilterMatcherBase > | Clone () const

## Detailed Description

Definition at line 244 of file FilterMatchers.h.

## Constructor & Destructor Documentation

## SmartsMatcher() [1/6]

RDKit::SmartsMatcher::SmartsMatcher | ( | const std::string & | name = SMARTS_MATCH_NAME_DEFAULT | ) |

inline

Construct a SmartsMatcher.

Definition at line 251 of file FilterMatchers.h.

References RDKit::FilterMatcherBase::FilterMatcherBase(), and RDKit::SMARTS_MATCH_NAME_DEFAULT.

Referenced by copy(), and SmartsMatcher().

## SmartsMatcher() [2/6]

RDKit::SmartsMatcher::SmartsMatcher | ( | const ROMol & | pattern,
|  | unsigned int | minCount = 1,
|  | unsigned int | maxCount = UINT_MAX )

Construct a SmartsMatcher from a query molecule.

## SmartsMatcher() [3/6]

RDKit::SmartsMatcher::SmartsMatcher | ( | const std::string & | name,
|  | const ROMol & | pattern,
|  | unsigned int | minCount = 1,
|  | unsigned int | maxCount = UINT_MAX )

Construct a SmartsMatcher.

## SmartsMatcher() [4/6]

RDKit::SmartsMatcher::SmartsMatcher | ( | const std::string & | name,
|  | const std::string & | smarts,
|  | unsigned int | minCount = 1,
|  | unsigned int | maxCount = UINT_MAX )

Construct a SmartsMatcher from a smarts pattern.

## SmartsMatcher() [5/6]

RDKit::SmartsMatcher::SmartsMatcher | ( | const std::string & | name,
|  | ROMOL_SPTR | onPattern,
|  | unsigned int | minCount = 1,
|  | unsigned int | maxCount = UINT_MAX )

Construct a SmartsMatcher from a shared_ptr.

## SmartsMatcher() [6/6]

RDKit::SmartsMatcher::SmartsMatcher | ( | const SmartsMatcher & | rhs | ) |

References SmartsMatcher().

## Member Function Documentation

## copy()

boost::shared_ptr< FilterMatcherBase > RDKit::SmartsMatcher::copy | ( |  | ) | const

inline override virtual

copy copies the current FilterMatcherBase into one that can be passed around safely.

Implements RDKit::FilterMatcherBase.

Definition at line 339 of file FilterMatchers.h.

References SmartsMatcher().

## getMatches()

bool RDKit::SmartsMatcher::getMatches | ( | const ROMol & | mol,
|  | std::vector< FilterMatch > & | matchVect ) const

override virtual

getMatches

Match the filter against a molecule

Parameters

  mol | readonly const molecule being searched
  matches | output vector of atom index matches found in the molecule

Implements RDKit::FilterMatcherBase.

## getMaxCount()

unsigned int RDKit::SmartsMatcher::getMaxCount | ( |  | ) | const

inline

Get the maximum match count for the pattern to be true.

Definition at line 332 of file FilterMatchers.h.

## getMinCount()

unsigned int RDKit::SmartsMatcher::getMinCount | ( |  | ) | const

inline

Get the minimum match count for the pattern to be true.

Definition at line 328 of file FilterMatchers.h.

## getPattern()

const ROMOL_SPTR & RDKit::SmartsMatcher::getPattern | ( |  | ) | const

inline

Return the shared_ptr to the underlying query molecule.

Definition at line 319 of file FilterMatchers.h.

## hasMatch()

bool RDKit::SmartsMatcher::hasMatch | ( | const ROMol & | mol | ) | const

override virtual

hasMatches

Does the given molecule contain this filter pattern

Parameters

  mol | readonly const molecule being searched

Implements RDKit::FilterMatcherBase.

## isValid()

bool RDKit::SmartsMatcher::isValid | ( |  | ) | const

inline override virtual

Returns True if the Smarts pattern is valid.

Implements RDKit::FilterMatcherBase.

Definition at line 316 of file FilterMatchers.h.

## setMaxCount()

void RDKit::SmartsMatcher::setMaxCount | ( | unsigned int | val | ) |

inline

Set the maximum match count for the pattern to be true.

Definition at line 334 of file FilterMatchers.h.

## setMinCount()

void RDKit::SmartsMatcher::setMinCount | ( | unsigned int | val | ) |

inline

Set the minimum match count for the pattern to be true.

Definition at line 330 of file FilterMatchers.h.

## setPattern() [1/3]

void RDKit::SmartsMatcher::setPattern | ( | const ROMol & | mol | ) |

Set the query molecule for the matcher.

## setPattern() [2/3]

void RDKit::SmartsMatcher::setPattern | ( | const ROMOL_SPTR & | pat | ) |

inline

Set the shared query molecule for the matcher.

Definition at line 325 of file FilterMatchers.h.

## setPattern() [3/3]

void RDKit::SmartsMatcher::setPattern | ( | const std::string & | smarts | ) |

Set the smarts pattern for the matcher.

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

- FilterMatchers.h