BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rotationalEntropyLoss.h
Go to the documentation of this file.
1 // $Id: rotationalEntropyLoss.h,v 1.2 2006/05/21 18:15:28 anker Exp $
2 // Molecular Mechanics: SLICK force field, rotational entropy loss
3 
4 #ifndef BALL_MOLMEC_SLICK_SLICKROTATION_H
5 #define BALL_MOLMEC_SLICK_SLICKROTATION_H
6 
7 #include <stack>
8 
10 #include <BALL/DATATYPE/hashSet.h>
11 #include <BALL/DATATYPE/hashGrid.h>
12 
13 namespace BALL
14 {
15 
20  : public ScoringComponent
21  {
22 
23  public:
24 
26  {
31  };
32 
34  {
37 
40 
43 
46 
49  };
50 
53  struct Option
54  {
57  static const char* ROT_BIND_OFFSET;
58 
61  static const char* ROT_GRID_SPACING;
62 
65  static const char* ROT_ALGORITHM;
66 
69  static const char* ROT_METHOD;
70 
73  static const char* VERBOSITY;
74 
75  };
76 
79  struct Default
80  {
81 
84  static const float ROT_BIND_OFFSET;
85 
88  static const float ROT_GRID_SPACING;
89 
92  static const Size ROT_ALGORITHM;
93 
96  static const Size ROT_METHOD;
97 
100  static const Size VERBOSITY;
101 
102  };
103 
107 
111  ;
112 
116  ;
117 
121  ;
122 
125  virtual ~RotationalEntropyLoss()
126  ;
127 
129 
132 
136  ;
137 
140  virtual void clear()
141  ;
142 
144 
147 
148  bool operator == (const RotationalEntropyLoss& fr) const
149  ;
150 
152 
155 
158  virtual bool setup()
159  ;
160 
162 
165 
168  virtual double calculateScore()
169  ;
170 
172 
173  private:
174 
175  /*_ All possible rotatable bonds.
176  */
177  std::vector<const Bond*> rotatable_bonds_;
178 
179  /*_ All glycosidic bonds.
180  */
182 
183  /*_ The number of rotatable bonds (i. e. rotatable_bonds_.size()).
184  */
186 
187  /*_ A vector of bool indicating which of rotatable bond was frozen upon
188  * binding.
189  */
190  std::vector<bool> is_frozen_;
191 
192  /* A flag defining which algorithm should be used for finding
193  * rotatable bonds
194  */
196 
197  /* The percentages of nonlipophilc heavy atoms on each side of the bond
198  * (named P(r) in the paper).
199  */
200  std::vector< std::pair<double, double> > heavy_atom_fractions_;
201 
202  /*_ This hash grid contains all receptor atoms. We need it for obtaining
203  * those ligand atoms that are close to the receptor.
204  */
206 
207  /*_ The spacing of the grid_.
208  */
210 
211  /*_
212  */
214 
215  /*_
216  */
218 
219  /*_
220  */
222 
223  /*_
224  */
226 
227  /*_ The fresno atom types that are stored in the fresno force field
228  */
230 
231  /*_ A simple DFS algorithm for identifying rings (i. e. cycles) of the
232  molecule.
233  */
234  void cycleDFS_(const Atom* atom,
235  HashSet<const Atom*>& visited,
236  HashSet<const Bond*>& tree,
237  std::stack<const Bond*>& possible_cycle_bonds,
238  HashSet<const Bond*>& cycle_bonds,
239  int& cycle_count)
240  ;
241 
242 
243  /*_ A simple DFS implementation for counting heavy (as defined by
244  * Rognan et al.) atoms.
245  */
246  void heavyAtomsDFS_(const Atom* atom, const Bond* bond,
247  HashSet<const Atom*>& visited,
248  int& heavy_atom_count, int& nonlip_heavy_atom_count)
249  ;
250 
251  /*_ Find out which bonds are still frozen
252  */
253  void updateFrozenBonds_()
254  ;
255 
256  /*_
257  */
258  bool frozenBondsDFS_(const Atom* atom,
259  HashSet<const Atom*>& visited)
260  ;
261  };
262 
263 } // namespace BALL
264 
265 #endif // BALL_MOLMEC_SLICK_SLICKROTATION_H