BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
gridBasedScoring.h
Go to the documentation of this file.
1 // ----------------------------------------------------
2 // $Maintainer: Marcel Schumann $
3 // $Authors: Marcel Schumann $
4 // ----------------------------------------------------
5 
6 #ifndef BALL_SCORING_COMMON_GRIDBASEDSCORING_H
7 #define BALL_SCORING_COMMON_GRIDBASEDSCORING_H
8 
12 #include <set>
13 #include <map>
14 
15 namespace BALL
16 {
17  class ScoreGridSet;
18  class Residue;
19  class Rotamer;
20 
22  {
23  public:
24  struct Option
25  {
27  static const char* SCOREGRID_RESOLUTION;
28 
30  static const char* SCOREGRID_INTERPOLATION;
31  };
32 
33  struct Default
34  {
35  static double SCOREGRID_RESOLUTION;
37  };
38 
39  GridBasedScoring(AtomContainer& receptor, AtomContainer& ligand, Options& options);
40 
41  GridBasedScoring(AtomContainer& receptor, Vector3& hashgrid_origin, Options& options);
42 
43  virtual ~GridBasedScoring();
44 
48  void defineGridSet(AtomContainer* sys, Vector3& angstroem, double out_of_grid_penalty, bool enforce_grid_boundaries, double resolution, double interaction_no_scale = 1);
49 
52  void defineGridSet(AtomContainer* sys, double out_of_grid_penalty, bool enforce_grid_boundaries, double resolution, double interaction_no_scale = 1);
53 
54  void defineFlexibleResiduesGridSet();
55 
56  void printResult();
57 
59  void setAtomTypeNames(std::set<String>& types);
60 
62  void precalculateGrids(bool ony_flexRes_grids = false);
63 
65  void saveGridSetsToFile(String file, String receptor_name);
66 
68  void readAdditionalGridSetFromFile(String file);
69 
71  void replaceGridSetFromFile(String file);
72 
75  void loadFlexibleResidueScoreGrids(std::list<std::pair<const Residue*, const Rotamer*> > residue_list);
76 
77  void setupReferenceLigand();
78 
84  void setCombineOperation(int i);
85 
87  int getNoNeighboringReceptorAtoms();
88 
89  std::vector<ScoreGridSet*>* getScoreGridSets();
90 
91  void validateGridSets();
92 
93  protected:
94  void setup();
95 
97  {
99  std::vector<double> gridSet_scores;
100 
102  std::vector<double> no_neighbors;
103 
105  std::vector<Size> no_out_of_grid;
106 
107  void setup(Size no_gridSets);
108  };
109 
112 
114  double calculateGridScore();
115 
119  void defineReceptorGridSet(Vector3& origin, Vector3& size, double out_of_grid_penalty, bool enforce_grid_boundaries, double resolution = 0.5, double interaction_no_scale = 1);
120 
121  virtual AtomTypes& getAtomTypes() = 0;
122 
123  std::map<String, int>* getAtomTypesMap();
124 
127  virtual void setAtomType(Atom* atom, const String& type_name);
128 
130  String getGridAtomTypeName(int grid_id);
131 
132  /* --------- protected members ------------------ */
135 
137  std::map<String, int> atom_types_map_;
138 
140  std::vector<BALL::ScoreGridSet*> grid_sets_;
141 
144  virtual void updatePrecalculatedScore(Size set) = 0;
145 
148 
151 
154 
157  std::map<const Residue*, ScoreGridSet*> flex_gridsets_;
158 
159  friend class ScoreGridSet;
161  };
162 }
163 
164 #endif // BALL_SCORING_COMMON_GRIDBASEDSCORING_H
std::map< const Residue *, ScoreGridSet * > flex_gridsets_
static const char * SCOREGRID_INTERPOLATION
std::vector< BALL::ScoreGridSet * > grid_sets_
std::map< String, int > atom_types_map_
GridSetsResult gridsets_result_
static const char * SCOREGRID_RESOLUTION
#define BALL_EXPORT
Definition: COMMON/global.h:50