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
ReactionRateCalculation.hh
Go to the documentation of this file.
1
#ifndef GGL_CHEM_REACTIONRATECALCULATION_HH_
2
#define GGL_CHEM_REACTIONRATECALCULATION_HH_
3
4
#include "
ggl/chem/Reaction.hh
"
5
6
#include <
ggl/Rule.hh
>
7
8
9
namespace
ggl {
10
namespace
chem {
11
12
////////////////////////////////////////////////////////////////////////////
13
14
/*! @brief Interface reaction rate calculation
15
*
16
* Abstract super class for reaction rate calculations.
17
*
18
* @author Martin Mann (c) 2009 http://www.bioinf.uni-freiburg.de/~mmann/
19
*
20
*/
21
class
ReactionRateCalculation
22
{
23
public
:
24
25
//! default construction
26
ReactionRateCalculation
() {}
27
28
//! default destruction
29
virtual
~ReactionRateCalculation
() {}
30
31
/*! Calculates the reaction rate for a given Reaction.
32
*
33
* @param reaction the Reaction object to calculate the rate for
34
* @return the according reaction rate
35
*/
36
virtual
37
double
38
getRate
(
const
Reaction
& reaction )
const
= 0;
39
40
/*! Announces whether the reaction rate calculation needs the explicit
41
* transition state present within the reaction information or not.
42
*
43
* @return true iff the reaction calculation needs the presence of an
44
* explicit transition state, false otherwise (no transition
45
* state needed)
46
*/
47
virtual
48
bool
49
needTransitionState
(
void
)
const
= 0;
50
};
51
52
////////////////////////////////////////////////////////////////////////////
53
54
55
/*! A reaction rate calculator that does not calculate a rate but returns
56
* a fixed reaction rate independently from the given reaction.
57
*
58
* @author Martin Mann (c) 2009 http://www.bioinf.uni-freiburg.de/~mmann/
59
*
60
*/
61
class
RRC_Fixed
:
public
ReactionRateCalculation
62
{
63
protected
:
64
65
//! the fixed rate to return for all reactions
66
const
double
fixRate
;
67
68
public
:
69
70
/*! Constructs a new reaction rate calculator that yields always the
71
* same fixed reaction rate given.
72
*
73
* @param fixRate the fixed rate to be assigned to all reactions
74
*/
75
RRC_Fixed
(
const
double
fixRate
);
76
77
//! default destruction
78
virtual
~RRC_Fixed
();
79
80
/*! Returns a fixed transition rate for all reactions.
81
*
82
* @param reaction the Reaction object to calculate the rate for; but
83
* doesnt matter because fixed rate returned!
84
* @return the fixed reaction rate
85
*/
86
virtual
87
double
88
getRate
(
const
Reaction
& reaction )
const
;
89
90
/*! No transition state needed, such that this returns always false!
91
*
92
* @return false because no transition state needed for a fixed
93
* reaction rate
94
*/
95
virtual
96
bool
97
needTransitionState
(
void
)
const
;
98
};
99
100
101
////////////////////////////////////////////////////////////////////////////
102
103
104
/*! A reaction rate calculator that does not calculate a rate (returns
105
* always "nan") but enforces, that the reactions transition state is
106
* calculated.
107
*
108
* @author Martin Mann (c) 2009 http://www.bioinf.uni-freiburg.de/~mmann/
109
*
110
*/
111
class
RRC_TState
:
public
ReactionRateCalculation
112
{
113
public
:
114
115
/*! Constructs a new reaction rate calculator that yields always the
116
* same reaction rate ("nan") but enforces the creation of the
117
* reactions transition state.
118
*/
119
RRC_TState
();
120
121
//! default destruction
122
virtual
~RRC_TState
();
123
124
/*! Returns a "nan" transition rate for all reactions.
125
*
126
* @param reaction the Reaction object to calculate the rate for; but
127
* doesnt matter because "nan" returned!
128
* @return "nan"
129
*/
130
virtual
131
double
132
getRate
(
const
Reaction
& reaction )
const
;
133
134
/*! YES, a transition state is needed!
135
*
136
* @return true, because that's the class for! ;)
137
*/
138
virtual
139
bool
140
needTransitionState
(
void
)
const
;
141
};
142
143
144
////////////////////////////////////////////////////////////////////////////
145
146
}
// namespace chem
147
}
// namespace ggl
148
149
#endif
/*REACTIONRATECALCULATION_HH_*/
150