main page
namespaces
classes
files
GGL home
Generated on Wed Apr 29 2015 11:51:40 for GGL-4.1.2 by
doxygen
1.8.3.1
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
src
ggl
chem
GS_MolCheck.hh
Go to the documentation of this file.
1
#ifndef GGL_CHEM_GS_MOLCHECK_HH_
2
#define GGL_CHEM_GS_MOLCHECK_HH_
3
4
#include <iostream>
5
6
#include "
ggl/chem/GS_chem.hh
"
7
#include "
ggl/chem/Molecule.hh
"
8
#include "
ggl/chem/AromaticityPerception.hh
"
9
10
namespace
ggl {
11
namespace
chem {
12
13
14
////////////////////////////////////////////////////////////////////////////
15
16
/*! @brief Molecule correction graph storage
17
*
18
* A graph storage that checks each reported molecule graph to consistency
19
* and does needed corrections.
20
*
21
* Applied corrections are e.g.
22
* - aromaticity perception and relabeling
23
*
24
* The corrected molecule is than reported to the given successive graph
25
* storage.
26
*
27
* @author Martin Mann (c) 2011 http://www.bioinf.uni-freiburg.de/~mmann/
28
*
29
*/
30
class
GS_MolCheck
:
public
GS_chem
{
31
32
protected
:
33
34
//! the graph storage to which checked molecules are forwarded to
35
GS_chem
*
nextGS
;
36
37
//! aromaticity perception handler to relabel aromatic and non-aromatic
38
//! rings
39
AromaticityPerception
*
aromaticityPerception
;
40
41
//! whether or not exceptions are to be ignored or forwarded
42
bool
ignoreExceptions
;
43
44
public
:
45
46
/*!
47
* Construction.
48
*
49
* @param gs the graph storage to report the checked and relabeled
50
* molecules to
51
* @param aromaticityPerception the aromaticity perception instance
52
* to be used to perform the aromaticity relabeling;
53
* @param ignoreExceptions if true: exceptions raised during molecule
54
* check are ignored; otherwise the exception is forwarded
55
*/
56
GS_MolCheck
(
GS_chem
& gs
57
,
const
AromaticityPerception
&
aromaticityPerception
58
,
const
bool
ignoreExceptions
=
true
);
59
60
/*!
61
* Copy construction
62
* @param toCopy the instance to make this object a copy of
63
*/
64
GS_MolCheck
(
const
GS_MolCheck
& toCopy );
65
66
67
/*!
68
* Assignment operator
69
* @param toCopy the instance to make this object a copy of
70
* @return the altered object *this
71
*/
72
GS_MolCheck
&
73
operator=
(
const
GS_MolCheck
& toCopy );
74
75
76
//! destruction
77
virtual
~GS_MolCheck
();
78
79
/*!
80
* Checks a given molecule graph for inconsistent labeling and
81
* corrects it accordingly. The corrected molecule is than forwarded
82
* to the successive graph storage.
83
*
84
* Note: errors during the aromaticity rewrites etc. will also result
85
* in the disposal of the molecule without further notification!
86
*
87
* @param mol the molecule graph object to check and add.
88
*
89
* @throw std::runtime_error in case the molecule correction fails
90
* and ignoreExceptions is set to false; otherwise no
91
* exception is thrown
92
*/
93
virtual
94
void
95
addMolecule
(
const
Molecule
& mol );
96
};
97
98
////////////////////////////////////////////////////////////////////////////
99
100
101
}}
// namespace ggl
102
103
#include "ggl/chem/GS_MolCheck.icc"
104
105
#endif
/*GGL_CHEM_GS_MOLCHECK_HH_*/