BALL  1.5.0
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 
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 
69 
72 
75  void loadFlexibleResidueScoreGrids(std::list<std::pair<const Residue*, const Rotamer*> > residue_list);
76 
78 
84  void setCombineOperation(int i);
85 
88 
89  std::vector<ScoreGridSet*>* getScoreGridSets();
90 
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 
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 
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
Definition: constants.h:13
void defineGridSet(AtomContainer *sys, Vector3 &angstroem, double out_of_grid_penalty, bool enforce_grid_boundaries, double resolution, double interaction_no_scale=1)
virtual void setAtomType(Atom *atom, const String &type_name)
void replaceGridSetFromFile(String file)
void setAtomTypeNames(std::set< String > &types)
std::map< const Residue *, ScoreGridSet * > flex_gridsets_
void defineGridSet(AtomContainer *sys, double out_of_grid_penalty, bool enforce_grid_boundaries, double resolution, double interaction_no_scale=1)
GridBasedScoring(AtomContainer &receptor, AtomContainer &ligand, Options &options)
void defineReceptorGridSet(Vector3 &origin, Vector3 &size, double out_of_grid_penalty, bool enforce_grid_boundaries, double resolution=0.5, double interaction_no_scale=1)
void precalculateGrids(bool ony_flexRes_grids=false)
void readAdditionalGridSetFromFile(String file)
void loadFlexibleResidueScoreGrids(std::list< std::pair< const Residue *, const Rotamer * > > residue_list)
std::map< String, int > atom_types_map_
String getGridAtomTypeName(int grid_id)
std::vector< ScoreGridSet * > * getScoreGridSets()
std::vector< BALL::ScoreGridSet * > grid_sets_
virtual AtomTypes & getAtomTypes()=0
virtual void updatePrecalculatedScore(Size set)=0
GridSetsResult gridsets_result_
std::map< String, int > * getAtomTypesMap()
void saveGridSetsToFile(String file, String receptor_name)
void setCombineOperation(int i)
void defineFlexibleResiduesGridSet()
GridBasedScoring(AtomContainer &receptor, Vector3 &hashgrid_origin, Options &options)
static const char * SCOREGRID_INTERPOLATION
static const char * SCOREGRID_RESOLUTION
#define BALL_EXPORT
Definition: COMMON/global.h:50