BALL 1.5.0
Loading...
Searching...
No Matches
bindingPocketProcessor.h
Go to the documentation of this file.
1#ifndef BALL_STRUCTURE_BINDINGPOCKETPROCESSOR_H
2#define BALL_STRUCTURE_BINDINGPOCKETPROCESSOR_H
3
4#ifndef BALL_CONCEPT_PROCESSOR_H
6#endif
7
8#ifndef BALL_KERNEL_RESIDUE_H
9# include <BALL/KERNEL/residue.h>
10#endif
11
12#ifndef BALL_MATHS_VECTOR3_H
13# include <BALL/MATHS/vector3.h>
14#endif
15
16#ifndef BALL_KERNEL_SYSTEM_H
17# include <BALL/KERNEL/system.h>
18#endif
19
20#ifndef BALL_DATATYPE_HASHGRID_H
22#endif
23
24#ifndef BALL_DATATYPE_OPTIONS_H
26#endif
27
28#include <vector>
29#include <string>
30
31#include <fstream>
32
33namespace BALL
34{
35
41 : public UnaryProcessor<Composite>
42 {
43
44 public:
45
48 struct Option
49 {
51 static const String HEAVY_ONLY;
53 static const String PARSE_INI_FILE;
55 static const String INI_FILE_NAME;
56
58 static const String RADIUS_HYDROGEN;
59 static const String RADIUS_OXYGEN;
60 static const String RADIUS_NITROGEN;
61 static const String RADIUS_CARBON;
62 static const String RADIUS_SULFUR;
63
77 static const String PW_SQUARE_WELL;
79 static const String PW_MAX_DISTANCE;
81 static const String MAX_ASPS;
82 // additional factor for the computation of the collision of two spheres
83 static const String CLASH_FACTOR;
85 static const String ASP_SEPERATION;
86 };
87
90 struct Default
91 {
92 static const bool HEAVY_ONLY;
93 static const bool PARSE_INI_FILE;
94 static const String INI_FILE_NAME;
95
96 static const double RADIUS_HYDROGEN;
97 static const double RADIUS_OXYGEN;
98 static const double RADIUS_NITROGEN;
99 static const double RADIUS_CARBON;
100 static const double RADIUS_SULFUR;
101
102 static const double PROBE_SPHERE_RADIUS;
104 static const double PROBE_LAYER_RADIUS;
107 static const double BURIAL_COUNT_RADIUS;
108 static const double PW_SQUARE_WELL;
109 static const double PW_GAUSSIAN_WIDTH;
110 static const double PW_MAX_DISTANCE;
111 static const Position MAX_ASPS;
112 static const double CLASH_FACTOR;
113 static const double ASP_SEPERATION;
114 };
115
119
123
127
131
135
137 virtual bool finish();
138
139 virtual Processor::Result operator() (Composite &composite);
140
143 const vector<std::pair<Vector3,double> >& getActiveSitePoints() const;
144
147 const vector<vector<std::pair<Vector3,double> > >& getLayers() const;
148
152
153 private:
154
158 class Sphere_
159 {
160 public:
162 Sphere_();
163
166 BALL::Vector3 position;
167
170 float radius;
171
174 Position b_count;
175
178 float probe_weight;
179
182 Position layer;
183
186 inline bool operator<(const Sphere_& sp) const {return probe_weight > sp.probe_weight;};
187
190 int id;
191 static int global_id;
192 Position a,b,c,d;
193
196 inline bool operator==(const Sphere_& sp) const {return a == sp.a && b == sp.b && c == sp.c && d == sp.d;};
197 };
198
201 class SphereComparator_
202 {
203 public:
204 int operator()(const Sphere_& sp1, const Sphere_& sp2) const
205 {
206 if (sp1.a != sp2.a)
207 return sp1.a < sp2.a;
208 if (sp1.b != sp2.b)
209 return sp1.b < sp2.b;
210 if (sp1.c != sp2.c)
211 return sp1.c < sp2.c;
212 if (sp1.d != sp2.d)
213 return sp1.d < sp2.d;
214 return 0;
215 };
216 };
217
220 Position layer_;
221
225 friend std::ostream& operator<<(std::ostream& os, const BindingPocketProcessor::Sphere_& /*sp*/) {return os;};
226
229 HashGrid3<Sphere_> sphere_grid_;
230
233 HashGrid3<Sphere_> protein_grid_;
234
237 HashGrid3<Sphere_> layer_grid_;
238
241 HashGrid3<Sphere_> clayer_grid_;
242
245 HashGrid3<Sphere_> BC_grid_;
246
249 HashGrid3<Sphere_> pw_grid_;
250
253 HashGrid3<Sphere_> candidates_grid_;
254
255 std::vector<Sphere_> sorted_spheres_;
256
259 double sphere_rad_;
260
263 double second_layer_rad_;
264
267 double protein_clash_rad_;
268
271 double BC_threshold_;
272
275 Position found_new_;
276
277 double c_factor_;
278
281 std::vector<Sphere_> candidates;
282
283 std::vector<std::pair<Vector3,double> > asps_;
284
285 std::vector<std::vector<std::pair<Vector3,double> > > layers_;
286
293 double radius_(const String& element);
294
297 void trySphere__(HashGridBox3<Sphere_>::DataIterator data_it,
300
303 void addSphere_s_();
304
307 Vector3 calculateT_(HashGridBox3<Sphere_>::DataIterator data_it,
309
313 Position x, Position y, Position z);
314
315 void testSecond_(HashGrid3<Sphere_>& hg,HashGridBox3<Sphere_>::DataIterator data_it,
317 Position x, Position y, Position z,Position step);
318
321 bool testSphereClash_(Vector3& v);
322
325 bool testProteinClash_(Vector3& v);
326
329 bool testBC_(Sphere_& sp);
330
333 void weedCandidates_();
334
337 bool parse_();
338
339
340 bool second_it_;
341
342 };
343
344} //namesspace BALL
345
346#endif // BALL_STRUCTURE_BINDINGPOCKETPROCESSOR_H
BALL_EXPORT bool operator<(const String &s1, const String &s2)
BALL_EXPORT bool operator==(const String &s1, const String &s2)
Three-dimensional Hash Grid Class.
Definition hashGrid.h:755
const BindingPocketProcessor & operator=(const BindingPocketProcessor &pp)
friend std::ostream & operator<<(std::ostream &os, const BindingPocketProcessor::Sphere_ &)
const vector< std::pair< Vector3, double > > & getActiveSitePoints() const
virtual bool finish()
Finish .
BindingPocketProcessor(const BindingPocketProcessor &pp)
BindingPocketProcessor(Options &new_options)
const vector< vector< std::pair< Vector3, double > > > & getLayers() const
static const String INI_FILE_NAME
name of the ini-file
static const String PROBE_SPHERE_RADIUS_HYDROGEN_FREE
probe sphere radius for heavy atoms only
static const String PROBE_SPHERE_RADIUS
probe sphere radius for computation with hydrogen atoms
static const String BURIAL_COUNT_THRESHOLD
burial count threshold for computation with hydrogen atoms
static const String PW_SQUARE_WELL
options for the computation of the probe weight
static const String BURIAL_COUNT_RADIUS
radius for the computation of the burial count
static const String BURIAL_COUNT_THRESHOLD_HYDROGEN_FREE
burial count threshold for heavy atoms only
static const String RADIUS_HYDROGEN
atom radius of individual elements
static const String PROBE_LAYER_RADIUS
probe radius for colision of probes in one layer
static const String MAX_ASPS
maximum number of active site points
static const String PARSE_INI_FILE
try to parse ini-file
static const String HEAVY_ONLY
use only heavy atoms for computation
static const String ASP_SEPERATION
minumum distance between two active site points
static const Position BURIAL_COUNT_THRESHOLD_HYDROGEN_FREE
#define BALL_EXPORT