BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
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 More...
 
virtual ~SmartsMatcher ()
 destructor More...
 
Accessors
void match (Match &matches, Molecule &mol, const String &smarts) throw (Exception::ParseError)
 method to match a Smarts pattern given as a string to given molecule More...
 
void match (Match &matches, Molecule &mol, const String &smarts, const std::set< const Atom * > &start_atoms) throw (Exception::ParseError)
 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 More...
 
void match (std::vector< Match > &matches, Molecule &mol, const std::vector< String > &smarts) throw (Exception::ParseError)
 method to match several Smarts patterns given as a vector of strings More...
 
void match (std::vector< Match > &matches, Molecule &mol, const std::vector< String > &smarts, const std::set< const Atom * > &start_atoms) throw (Exception::ParseError)
 method to match several Smarts patterns given as a vector of string. The atoms used for start matchings are given in start_atoms More...
 
void setSSSR (const std::vector< std::vector< Atom * > > &sssr)
 sets an SSSR which is used instead of doing an ring perception More...
 
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) More...
 

Protected Member Functions

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 More...
 
void evaluate_ (RecStruct_ &rs, SPNode *start_node, const Atom *start_atom)
 method for the evaluation of a pseudo-tree More...
 
bool evaluate_node_ (RecStruct_ &rs, SPNode *start_node, const Atom *start_atom)
 method for evaluating a node of a pseudo-tree More...
 
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 More...
 

Protected Attributes

std::map< SPNode
*, std::vector< std::set
< const Atom * > > > 
rec_matches_
 matches from the recurive part More...
 
bool has_user_sssr_
 user SSSR set? More...
 
std::vector< std::vector< Atom * > > sssr_
 user sssr More...
 
Size depth_
 

Static Protected Attributes

static boost::shared_ptr
< RecStructPool_
pool_
 the pool of rec struct objects More...
 

Private Member Functions

 SmartsMatcher (const SmartsMatcher &matcher)
 copy constructor More...
 
Operators
SmartsMatcheroperator= (const SmartsMatcher &matcher)
 assignment operator More...
 

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
 

Detailed Description

Definition at line 44 of file smartsMatcher.h.

Member Typedef Documentation

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

Definition at line 51 of file smartsMatcher.h.

Definition at line 113 of file smartsMatcher.h.

Definition at line 114 of file smartsMatcher.h.

Definition at line 112 of file smartsMatcher.h.

Definition at line 111 of file smartsMatcher.h.

Constructor & Destructor Documentation

BALL::SmartsMatcher::SmartsMatcher ( )

default constructor

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

destructor

BALL::SmartsMatcher::SmartsMatcher ( const SmartsMatcher matcher)
private

copy constructor

Member Function Documentation

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

method for the evaluation of a pseudo-tree

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

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

method for evaluating a node of a pseudo-tree

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

void BALL::SmartsMatcher::match ( Match matches,
Molecule mol,
const String smarts 
) throw (Exception::ParseError)

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

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

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 BALL::SmartsMatcher::match ( std::vector< Match > &  matches,
Molecule mol,
const std::vector< String > &  smarts 
) throw (Exception::ParseError)

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

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

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

SmartsMatcher& BALL::SmartsMatcher::operator= ( const SmartsMatcher matcher)
private

assignment operator

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

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

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

Size BALL::SmartsMatcher::depth_
protected

Definition at line 280 of file smartsMatcher.h.

bool BALL::SmartsMatcher::has_user_sssr_
protected

user SSSR set?

Definition at line 274 of file smartsMatcher.h.

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

the pool of rec struct objects

Definition at line 256 of file smartsMatcher.h.

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

matches from the recurive part

Definition at line 271 of file smartsMatcher.h.

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

user sssr

Definition at line 277 of file smartsMatcher.h.