BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
9 #include <BALL/MATHS/vector3.h>
13 
14 
15 namespace 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 
36  ScoreGridSet();
37 
38  ~ScoreGridSet();
39 
43  void operator += (ScoreGridSet& sgs);
44 
48  void operator -= (ScoreGridSet& sgs);
49 
51  void clearData();
52 
53  ScoreGrid& operator[](int i);
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 
63  void setHashGrid(HashGrid3<Atom*>* hashgrid);
64 
65  HashGrid3<Atom*>* getHashGrid();
66 
67  void transform(TMatrix4x4 < float > & t);
68 
70  void moveTo(Vector3& destination);
71 
74  double getGridScore(Size grid, Vector3 position, bool interpolation);
75 
76  Size sizeX();
77 
78  Size sizeY();
79 
80  Size sizeZ();
81 
82  Size noGrids();
83 
85  void enable();
86 
88  void disable();
89 
90  bool isEnabled();
91 
93  Vector3 getOrigin();
94 
96  Vector3 getCenter();
97 
100  std::list<std::pair<String, BALL::RegularData3D*> > convertToRegularData3DGrids();
101 
102  PharmacophoreConstraint* getPharmacophoreConstraint();
103 
104  void setPharmacophoreConstraint(PharmacophoreConstraint* phc);
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 
168  TMatrix4x4<float> T_i_;
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
double interaction_no_scale_
Definition: scoreGridSet.h:114
vector< vector< vector< double > > > ScoreGrid
Definition: scoreGridSet.h:17
#define BALL_EXPORT
Definition: COMMON/global.h:50