BALL 1.5.0
Loading...
Searching...
No Matches
BALL::SmartsMatcher Class Reference

#include <BALL/STRUCTURE/smartsMatcher.h>

Classes

class  RecStruct_
 a wrapper class which is used as an interface in the matching code to the pool More...
 
class  RecStructCore_
 core structure of the recursive matching algorithm for the object pool More...
 
class  RecStructPool_
 class which does the pool operations of the RecStructCore_ pool More...
 

Public Member Functions

Constructors and Destructors
 SmartsMatcher ()
 default constructor
 
virtual ~SmartsMatcher ()
 destructor
 

Typedefs

typedef std::vector< std::set< const Atom * > > Match
 
typedef SmartsParser::SPNode SPNode
 
typedef SmartsParser::SPEdge SPEdge
 
typedef SmartsParser::SPAtom SPAtom
 
typedef SmartsParser::SPBond SPBond
 
static boost::shared_ptr< RecStructPool_pool_
 the pool of rec struct objects
 
std::map< SPNode *, std::vector< std::set< const Atom * > > > rec_matches_
 matches from the recurive part
 
bool has_user_sssr_
 user SSSR set?
 
std::vector< std::vector< Atom * > > sssr_
 user sssr
 
Size depth_
 
bool evaluateRingEdges_ (const std::set< const Atom * > &matching, const std::map< const SPNode *, const Atom * > &mapping, const String &smarts)
 method for evaluation of ring edges, after the the smarts tree is matched to molcule
 
void evaluate_ (RecStruct_ &rs, SPNode *start_node, const Atom *start_atom)
 method for the evaluation of a pseudo-tree
 
bool evaluate_node_ (RecStruct_ &rs, SPNode *start_node, const Atom *start_atom)
 method for evaluating a node of a pseudo-tree
 
bool evaluate_edge_ (RecStruct_ &rs, SPEdge *start_node, const Atom *start_atom, const Bond *start_bond)
 method for evaluating a edge of a pseudo-tree
 

Accessors

void match (Match &matches, Molecule &mol, const String &smarts)
 method to match a Smarts pattern given as a string to given molecule
 
void match (Match &matches, Molecule &mol, const String &smarts, const std::set< const Atom * > &start_atoms)
 method to match a Smarts pattern given as a string to given molecule. The atoms which will be used for starting matching are given in atoms
 
void match (std::vector< Match > &matches, Molecule &mol, const std::vector< String > &smarts)
 method to match several Smarts patterns given as a vector of strings
 
void match (std::vector< Match > &matches, Molecule &mol, const std::vector< String > &smarts, const std::set< const Atom * > &start_atoms)
 method to match several Smarts patterns given as a vector of string. The atoms used for start matchings are given in start_atoms
 
void setSSSR (const std::vector< std::vector< Atom * > > &sssr)
 sets an SSSR which is used instead of doing an ring perception
 
void unsetSSSR ()
 this function is used to cause the matcher to do an ring perception if needed (do not use the set SSSR any more)
 

Detailed Description

Definition at line 44 of file smartsMatcher.h.

Member Typedef Documentation

◆ Match

std::vector<std::set<const Atom*> > BALL::SmartsMatcher::Match

Definition at line 51 of file smartsMatcher.h.

◆ SPAtom

◆ SPBond

◆ SPEdge

◆ SPNode

Constructor & Destructor Documentation

◆ SmartsMatcher()

BALL::SmartsMatcher::SmartsMatcher ( )

default constructor

◆ ~SmartsMatcher()

virtual BALL::SmartsMatcher::~SmartsMatcher ( )
virtual

destructor

Member Function Documentation

◆ evaluate_()

void BALL::SmartsMatcher::evaluate_ ( RecStruct_ & rs,
SPNode * start_node,
const Atom * start_atom )
protected

method for the evaluation of a pseudo-tree

◆ evaluate_edge_()

bool BALL::SmartsMatcher::evaluate_edge_ ( RecStruct_ & rs,
SPEdge * start_node,
const Atom * start_atom,
const Bond * start_bond )
protected

method for evaluating a edge of a pseudo-tree

◆ evaluate_node_()

bool BALL::SmartsMatcher::evaluate_node_ ( RecStruct_ & rs,
SPNode * start_node,
const Atom * start_atom )
protected

method for evaluating a node of a pseudo-tree

◆ evaluateRingEdges_()

bool BALL::SmartsMatcher::evaluateRingEdges_ ( const std::set< const Atom * > & matching,
const std::map< const SPNode *, const Atom * > & mapping,
const String & smarts )
protected

method for evaluation of ring edges, after the the smarts tree is matched to molcule

◆ match() [1/4]

void BALL::SmartsMatcher::match ( Match & matches,
Molecule & mol,
const String & smarts )

method to match a Smarts pattern given as a string to given molecule

◆ match() [2/4]

void BALL::SmartsMatcher::match ( Match & matches,
Molecule & mol,
const String & smarts,
const std::set< const Atom * > & start_atoms )

method to match a Smarts pattern given as a string to given molecule. The atoms which will be used for starting matching are given in atoms

◆ match() [3/4]

void BALL::SmartsMatcher::match ( std::vector< Match > & matches,
Molecule & mol,
const std::vector< String > & smarts )

method to match several Smarts patterns given as a vector of strings

◆ match() [4/4]

void BALL::SmartsMatcher::match ( std::vector< Match > & matches,
Molecule & mol,
const std::vector< String > & smarts,
const std::set< const Atom * > & start_atoms )

method to match several Smarts patterns given as a vector of string. The atoms used for start matchings are given in start_atoms

◆ setSSSR()

void BALL::SmartsMatcher::setSSSR ( const std::vector< std::vector< Atom * > > & sssr)

sets an SSSR which is used instead of doing an ring perception

◆ unsetSSSR()

void BALL::SmartsMatcher::unsetSSSR ( )

this function is used to cause the matcher to do an ring perception if needed (do not use the set SSSR any more)

Member Data Documentation

◆ depth_

Size BALL::SmartsMatcher::depth_
protected

Definition at line 276 of file smartsMatcher.h.

◆ has_user_sssr_

bool BALL::SmartsMatcher::has_user_sssr_
protected

user SSSR set?

Definition at line 270 of file smartsMatcher.h.

◆ pool_

boost::shared_ptr<RecStructPool_> BALL::SmartsMatcher::pool_
staticprotected

the pool of rec struct objects

Definition at line 252 of file smartsMatcher.h.

◆ rec_matches_

std::map<SPNode*, std::vector<std::set<const Atom*> > > BALL::SmartsMatcher::rec_matches_
protected

matches from the recurive part

Definition at line 267 of file smartsMatcher.h.

◆ sssr_

std::vector<std::vector<Atom*> > BALL::SmartsMatcher::sssr_
protected

user sssr

Definition at line 273 of file smartsMatcher.h.