BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Member Functions | Public Attributes | List of all members
BALL::RingPerceptionProcessor Class Reference

#include <BALL/QSAR/ringPerceptionProcessor.h>

Inheritance diagram for BALL::RingPerceptionProcessor:
BALL::UnaryProcessor< AtomContainer > BALL::UnaryFunctor< AtomContainer, Processor::Result >

Classes

struct  Default
 default options for the ring perception More...
 
struct  Option
 Option names. More...
 
struct  PathMessage_
 
struct  TNode_
 

Public Member Functions

const vector< vector< Atom * > > & getAllSmallRings () const
 
Size findAllBCC (std::vector< SimpleMolecularGraph * > &bcc, SimpleMolecularGraph &graph)
 
void setDefaultOptions ()
 
Constrcutors and Destructors
 RingPerceptionProcessor ()
 
 RingPerceptionProcessor (const RingPerceptionProcessor &rp)
 
virtual ~RingPerceptionProcessor ()
 
Assignment
RingPerceptionProcessoroperator= (const RingPerceptionProcessor &rp)
 
Accessors
Size calculateSSSR (vector< vector< Atom * > > &sssr, AtomContainer &ac)
 
Processor-related methods
Processor::Result operator() (AtomContainer &ac)
 
- Public Member Functions inherited from BALL::UnaryProcessor< AtomContainer >
 UnaryProcessor ()
 
 UnaryProcessor (const UnaryProcessor &)
 
virtual ~UnaryProcessor ()
 
virtual bool start ()
 
virtual bool finish ()
 

Public Attributes

Options options
 
HashSet< NodeItem< Index,
Index > * > 
visited_
 
HashSet< EdgeItem< Index,
Index > * > 
visited_bonds_
 
HashMap< NodeItem< Index,
Index > *, Size
P_
 
HashMap< NodeItem< Index,
Index > *, NodeItem< Index,
Index > * > 
parents_
 
std::stack< EdgeItem< Index,
Index > * > 
BCC_
 
static HashMap< TNode_
*, NodeItem< Index, Index > * > 
tnode_to_atom_
 mapping for internal TNode structure and the nodes of the molecular graph More...
 
static HashMap< NodeItem
< Index, Index > *, TNode_ * > 
atom_to_tnode_
 
static HashMap< EdgeItem
< Index, Index > *, Size
bond_to_index_
 mapping for the path representation as bitvectors More...
 
static HashMap< Size, EdgeItem
< Index, Index > * > 
index_to_bond_
 
static std::vector< BitVectorrings_
 the SSSR detected by the algorithm More...
 
static std::vector< BitVectormatrix_
 the matrix for the independency tests More...
 
static std::vector< BitVectorforwarded_rings_
 the rings of the ith phase, which are to be forwarded to the ring selector More...
 
static std::vector< BitVectortested_beers_
 rings (beer) which have already been tested More...
 
static std::vector
< std::vector< Atom * > > 
all_small_rings_
 contains all 3 to 6 membered rings after the procedure of the Balducci-Pearlman algorithm More...
 
static std::vector< BitVectorall_small_beers_
 contains all 3 to 6 membered rings as beers More...
 
Size FiguerasAlgorithm_ (vector< vector< Atom * > > &sssr, AtomContainer &ac)
 
Size getRing_ (Atom *n, HashSet< Atom * > &ring_set)
 
void checkEdges_ (HashSet< Atom * > &ring_set, AtomContainer &ac)
 
Size findAllBCC_ (std::vector< SimpleMolecularGraph * > &bcc, SimpleMolecularGraph &graph)
 
void DFSBCC_ (std::vector< SimpleMolecularGraph * > &bccs, Size dfbi, HashMap< NodeItem< Index, Index > *, Size > DFBIndex, NodeItem< Index, Index > *v)
 
Size BalducciPearlmanAlgorithm_ (std::vector< std::vector< Atom * > > &sssr, SimpleMolecularGraph &graph)
 
static void BalducciPearlmanRingSelector_ (BitVector bit_vector)
 

Additional Inherited Members

- Public Types inherited from BALL::UnaryFunctor< AtomContainer, Processor::Result >
typedef Processor::Result result_type
 
typedef AtomContainer argument_type
 
typedef AtomContainerargument_reference
 
typedef const AtomContainerconst_argument_reference
 
typedef AtomContainerargument_pointer
 
typedef const AtomContainerconst_argument_pointer
 

Detailed Description

Processor, which marks all atoms and bonds in a ring structure with the Composite Property "InRing". calculateSSSR() can also compute the number of rings found.

The processor is an implementation of Figueras algorithm, described in: J. Figueras, J. Chem. Inf. Comput. Sci., 1996, 36(5), 986-991

and the Balducci Pearlman algorithm described in: Renzo Balducci, Robert S. Pearlman, J. Chem. Inf. Comput. Sci., 34:822-831, 1994

Definition at line 37 of file ringPerceptionProcessor.h.

Constructor & Destructor Documentation

BALL::RingPerceptionProcessor::RingPerceptionProcessor ( )

Default constructor

BALL::RingPerceptionProcessor::RingPerceptionProcessor ( const RingPerceptionProcessor rp)

Copy constructor

virtual BALL::RingPerceptionProcessor::~RingPerceptionProcessor ( )
virtual

Destructor

Member Function Documentation

Size BALL::RingPerceptionProcessor::BalducciPearlmanAlgorithm_ ( std::vector< std::vector< Atom * > > &  sssr,
SimpleMolecularGraph graph 
)
protected
static void BALL::RingPerceptionProcessor::BalducciPearlmanRingSelector_ ( BitVector  bit_vector)
staticprotected
Size BALL::RingPerceptionProcessor::calculateSSSR ( vector< vector< Atom * > > &  sssr,
AtomContainer ac 
)

Method to get a smallest set of smallest rings (SSSR) from a molecule.

Parameters
SSSR,vectorof rings, where the rings are stored in vector<Atom*>
AtomContiner,fromwhich AtomContainer the rings are to be percepted
void BALL::RingPerceptionProcessor::checkEdges_ ( HashSet< Atom * > &  ring_set,
AtomContainer ac 
)
protected
void BALL::RingPerceptionProcessor::DFSBCC_ ( std::vector< SimpleMolecularGraph * > &  bccs,
Size  dfbi,
HashMap< NodeItem< Index, Index > *, Size DFBIndex,
NodeItem< Index, Index > *  v 
)
protected
Size BALL::RingPerceptionProcessor::FiguerasAlgorithm_ ( vector< vector< Atom * > > &  sssr,
AtomContainer ac 
)
protected
Size BALL::RingPerceptionProcessor::findAllBCC ( std::vector< SimpleMolecularGraph * > &  bcc,
SimpleMolecularGraph graph 
)

Method that finds all biconnected components, the algorithm is freely adapted from a standard bcc (binary connected components) algorithm. Returns the number of bccs found.

Size BALL::RingPerceptionProcessor::findAllBCC_ ( std::vector< SimpleMolecularGraph * > &  bcc,
SimpleMolecularGraph graph 
)
protected
const vector<vector<Atom*> >& BALL::RingPerceptionProcessor::getAllSmallRings ( ) const

Getter which returns all the 3 - 6 membered rings, calculateSSSR with the Balducci-Pearlman Algorithm (defalt) is needed prior this call.

Size BALL::RingPerceptionProcessor::getRing_ ( Atom n,
HashSet< Atom * > &  ring_set 
)
protected
Processor::Result BALL::RingPerceptionProcessor::operator() ( AtomContainer )
virtual

operator ()

Reimplemented from BALL::UnaryProcessor< AtomContainer >.

RingPerceptionProcessor& BALL::RingPerceptionProcessor::operator= ( const RingPerceptionProcessor rp)

Assignment operator

void BALL::RingPerceptionProcessor::setDefaultOptions ( )

sets the default options of this processor

Member Data Documentation

std::vector<BitVector> BALL::RingPerceptionProcessor::all_small_beers_
staticprotected

contains all 3 to 6 membered rings as beers

Definition at line 237 of file ringPerceptionProcessor.h.

std::vector<std::vector<Atom*> > BALL::RingPerceptionProcessor::all_small_rings_
staticprotected

contains all 3 to 6 membered rings after the procedure of the Balducci-Pearlman algorithm

Definition at line 234 of file ringPerceptionProcessor.h.

HashMap<NodeItem<Index, Index>* , TNode_*> BALL::RingPerceptionProcessor::atom_to_tnode_
staticprotected

Definition at line 215 of file ringPerceptionProcessor.h.

std::stack<EdgeItem<Index, Index>* > BALL::RingPerceptionProcessor::BCC_
protected

Definition at line 171 of file ringPerceptionProcessor.h.

HashMap<EdgeItem<Index, Index>*, Size> BALL::RingPerceptionProcessor::bond_to_index_
staticprotected

mapping for the path representation as bitvectors

Definition at line 218 of file ringPerceptionProcessor.h.

std::vector<BitVector> BALL::RingPerceptionProcessor::forwarded_rings_
staticprotected

the rings of the ith phase, which are to be forwarded to the ring selector

Definition at line 228 of file ringPerceptionProcessor.h.

HashMap<Size, EdgeItem<Index, Index>*> BALL::RingPerceptionProcessor::index_to_bond_
staticprotected

Definition at line 219 of file ringPerceptionProcessor.h.

std::vector<BitVector> BALL::RingPerceptionProcessor::matrix_
staticprotected

the matrix for the independency tests

Definition at line 225 of file ringPerceptionProcessor.h.

Options BALL::RingPerceptionProcessor::options

Definition at line 126 of file ringPerceptionProcessor.h.

HashMap<NodeItem<Index, Index>* , Size> BALL::RingPerceptionProcessor::P_
protected

Definition at line 169 of file ringPerceptionProcessor.h.

HashMap<NodeItem<Index, Index>*, NodeItem<Index, Index>* > BALL::RingPerceptionProcessor::parents_
protected

Definition at line 170 of file ringPerceptionProcessor.h.

std::vector<BitVector> BALL::RingPerceptionProcessor::rings_
staticprotected

the SSSR detected by the algorithm

Definition at line 222 of file ringPerceptionProcessor.h.

std::vector<BitVector> BALL::RingPerceptionProcessor::tested_beers_
staticprotected

rings (beer) which have already been tested

Definition at line 231 of file ringPerceptionProcessor.h.

HashMap<TNode_*, NodeItem<Index, Index>* > BALL::RingPerceptionProcessor::tnode_to_atom_
staticprotected

mapping for internal TNode structure and the nodes of the molecular graph

Definition at line 214 of file ringPerceptionProcessor.h.

HashSet<NodeItem<Index, Index>* > BALL::RingPerceptionProcessor::visited_
protected

Definition at line 167 of file ringPerceptionProcessor.h.

HashSet<EdgeItem<Index, Index>* > BALL::RingPerceptionProcessor::visited_bonds_
protected

Definition at line 168 of file ringPerceptionProcessor.h.