BALL
1.4.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
SCORING
COMMON
scoringFunction.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
// $Id: scoringFunction.h,v 1.2 2006/05/21 18:15:28 anker Exp $
5
6
#ifndef BALL_SCORING_COMMON_SCORINGFUNCTION_H
7
#define BALL_SCORING_COMMON_SCORINGFUNCTION_H
8
9
#include <
BALL/KERNEL/system.h
>
10
#include <
BALL/DATATYPE/options.h
>
11
#include <
BALL/DATATYPE/string.h
>
12
#include <
BALL/SCORING/COMMON/baseFunction.h
>
13
#include <
BALL/SCORING/COMMON/scoringComponent.h
>
14
15
namespace
BALL
16
{
17
18
class
ScoringComponent;
19
20
class
ScoringFunction
21
{
22
23
public
:
24
25
struct
Option
26
{
27
30
static
const
char
*
VERBOSITY
;
31
34
static
const
char
*
BASE_FUNCTION_TYPE
;
35
36
};
37
38
39
struct
Default
40
{
41
44
static
const
Size
VERBOSITY
;
45
48
static
const
Size
BASE_FUNCTION_TYPE
;
49
50
};
51
53
ScoringFunction
()
54
;
55
57
ScoringFunction
(
const
ScoringFunction
& sf)
58
;
59
61
ScoringFunction
(
Molecule
& receptor,
Molecule
& ligand)
62
;
63
65
ScoringFunction
(
Molecule
& receptor,
Molecule
& ligand,
66
const
Options
&
options
)
67
;
68
70
virtual
~ScoringFunction
()
71
;
72
74
virtual
void
clear
()
75
;
76
78
ScoringFunction
&
operator =
(
const
ScoringFunction
& sf)
79
;
80
82
bool
setup
()
83
;
84
86
bool
setup
(
Molecule
& receptor,
Molecule
& ligand)
87
;
88
90
bool
setup
(
Molecule
& receptor,
Molecule
& ligand,
const
Options
&
options
)
91
;
92
94
virtual
bool
specificSetup
()
95
throw(Exception::TooManyErrors);
96
98
void
setMaximumNumberOfErrors
(
Size
nr)
99
;
100
102
Size
getMaximumNumberOfErrors
() const
103
;
104
106
void
setFirstMolecule
(
Molecule
& molecule1)
107
;
108
110
Molecule
*
getFirstMolecule
() const
111
;
112
114
void
setSecondMolecule
(
Molecule
& molecule2)
115
;
116
118
Molecule
*
getSecondMolecule
() const
119
;
120
124
void
setReceptor
(
Molecule
& receptor)
125
;
126
130
Molecule
*
getReceptor
() const
131
;
132
136
void
setLigand
(
Molecule
& ligand)
137
;
138
142
Molecule
*
getLigand
() const
143
;
144
146
void
setIntercept
(
double
intercept)
147
;
148
150
double
getIntercept
() const
151
;
152
154
void
setBaseFunction
(
ScoringBaseFunction
& base_function)
155
;
156
160
ScoringBaseFunction
*
getBaseFunction
() const
161
;
162
164
void
insertComponent
(
ScoringComponent
* component,
float
coefficient = 1.0
f
)
165
;
166
172
void
removeComponent
(const
ScoringComponent
* component)
173
;
174
181
void
removeComponent
(const
String
& name)
182
;
183
188
void
setCoefficient
(const
ScoringComponent
* component,
float
coefficient)
189
;
190
196
void
setCoefficient
(const
String
& name,
float
coefficient)
197
;
198
202
bool
getCoefficient
(const
ScoringComponent
* component,
203
float
& coefficient) const
204
;
205
209
bool
getCoefficient
(const
String
& name,
float
& coefficient) const
210
;
211
213
ScoringComponent
*
getComponent
(const
String
& name) const
214
;
215
217
ScoringComponent
*
getComponent
(const
Size
index) const
218
;
219
221
double
calculateScore
()
222
;
223
225
const
HashSet
<const
Atom
*>&
getUnassignedAtoms
() const
226
;
227
229
HashSet
<const
Atom
*>&
getUnassignedAtoms
()
230
;
231
233
Options
options
;
234
235
236
protected:
237
238
/*_ The first molecule of the complex, being the receptor in
239
receptor/ligand complexes
240
*/
241
Molecule
*
molecule1_
;
242
243
/*_ The second molecule of the complex, being the ligand in
244
receptor/ligand complexes
245
*/
246
Molecule
*
molecule2_
;
247
248
//_ The name of the scoring function
249
String
name_
;
250
251
//_ The overall score of the scoring function
252
double
score_
;
253
254
//_ The intercept necessary for calculating the score
255
double
intercept_
;
256
257
/*_ The base funcion for scoring simple terms
258
*/
259
ScoringBaseFunction
*
base_function_
;
260
261
/*_ A list of components comprising the scoring function, along with
262
the coefficients for each term necessary for calculating the final
263
score.
264
*/
265
std::vector< std::pair<
ScoringComponent
*,
float
> >
components_
;
266
267
//_ Atoms, for which the setup of the force field fails
268
HashSet
<const
Atom
*>
unassigned_atoms_
;
269
270
//_ Max number of unassigned atoms
271
Size
max_number_of_errors_
;
272
273
//_ Actual number of countde errors
274
Size
number_of_errors_
;
275
276
277
};
278
279
}
// namespace BALL
280
281
#endif // BALL_SCORING_COMMON_SCORINGFUNCTION_H
Generated by
1.8.3.1