BALL 1.5.0
Loading...
Searching...
No Matches
scoreGridSet.h
Go to the documentation of this file.
1// ----------------------------------------------------
2// $Maintainer: Marcel Schumann $
3// $Authors: Marcel Schumann $
4// ----------------------------------------------------
5
6#ifndef BALL_SCORING_COMMON_SCOREGRIDSET
7#define BALL_SCORING_COMMON_SCOREGRIDSET
8
13
14
15namespace BALL
16{
17 typedef vector<vector<vector<double> > > ScoreGrid;
18
19 class GridBasedScoring;
20
23 {
24 public:
27 ScoreGridSet(GridBasedScoring* gbs, Vector3& v_origin, Vector3& size, double& resolution);
28
30
34
37
39
43 void operator += (ScoreGridSet& sgs);
44
48 void operator -= (ScoreGridSet& sgs);
49
51 void clearData();
52
54
55 void binaryWrite(std::ostream& output);
56
57 void binaryRead(std::istream& input);
58
59 void saveToFile(std::ostream& output, String receptor_name);
60
61 void readFromFile(std::istream& input);
62
64
66
67 void transform(TMatrix4x4 < float > & t);
68
70 void moveTo(Vector3& destination);
71
74 double getGridScore(Size grid, Vector3 position, bool interpolation);
75
77
79
81
83
85 void enable();
86
88 void disable();
89
90 bool isEnabled();
91
94
97
100 std::list<std::pair<String, BALL::RegularData3D*> > convertToRegularData3DGrids();
101
103
105
106 void setParameters(bool enforce_grid_boundaries, double out_of_grid_penalty, double interaction_no_scale);
107
108 // -------- public members: -------------
110
113
115
116 private:
117 std::map<String, int>* getAtomTypesMap();
118
120 String getGridAtomTypeName(int grid_id);
121
123 bool is_reference_;
124
126 Vector3 origin_;
127
129 Vector3 original_origin_;
130
131 double resolution_;
132
134 bool enforce_grid_boundaries_;
135
137 double out_of_grid_penalty_;
138
143 bool enabled_;
144
145 std::vector<ScoreGrid*>* score_grids_;
146
147 Size size_x;
148
149 Size size_y;
150
151 Size size_z;
152
154 bool transformed_;
155
156 void initializeEmptyGrids(int no = -1);
157
159 GridBasedScoring* parent;
160
162 bool new_hashgrid_;
163
166
169
170 HashGrid3<Atom*>* hashgrid_;
171
173 std::map<BALL::String, int> atom_types_map_no_parent_;
174
175 PharmacophoreConstraint* pharm_constraint_;
176
177 friend class GridBasedScoring;
178 };
179}
180
181#endif // BALL_SCORING_COMMON_SCOREGRIDSET
vector< vector< vector< double > > > ScoreGrid
Three-dimensional Hash Grid Class.
Definition hashGrid.h:755
Default Type.
Definition matrix44.h:68
void moveTo(Vector3 &destination)
double getGridScore(Size grid, Vector3 position, bool interpolation)
void setHashGrid(HashGrid3< Atom * > *hashgrid)
void saveToFile(std::ostream &output, String receptor_name)
PharmacophoreConstraint * getPharmacophoreConstraint()
void setPharmacophoreConstraint(PharmacophoreConstraint *phc)
std::list< std::pair< String, BALL::RegularData3D * > > convertToRegularData3DGrids()
void setParameters(bool enforce_grid_boundaries, double out_of_grid_penalty, double interaction_no_scale)
void readFromFile(std::istream &input)
ScoreGridSet(GridBasedScoring *gbs, Vector3 &v_origin, Vector3 &size, double &resolution)
void binaryRead(std::istream &input)
void transform(TMatrix4x4< float > &t)
ScoreGrid & operator[](int i)
ScoreGridSet(GridBasedScoring *gbs)
HashGrid3< Atom * > * getHashGrid()
ScoreGridSet(ScoreGridSet *sgs)
void binaryWrite(std::ostream &output)
#define BALL_EXPORT