BALL  1.4.79
hydrogenBond.h
Go to the documentation of this file.
1 /* hydrogenBond.h
2 *
3 * Copyright (C) 2011 Marcel Schumann
4 *
5 * This program free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 // ----------------------------------------------------
20 // $Maintainer: Marcel Schumann $
21 // $Authors: Slick-development Team, Marcel Schumann $
22 // ----------------------------------------------------
23 
24 #ifndef BALL_SCORING_COMPONENTS_HYDROGENBOND_H
25 #define BALL_SCORING_COMPONENTS_HYDROGENBOND_H
26 
28 #include <BALL/DATATYPE/options.h>
30 
31 namespace BALL
32 {
36  {
37  public:
38  struct Option
39  {
42  static const char* HB_IDEAL_LENGTH;
43 
46  static const char* HB_IDEAL_ANGLE;
47 
50  static const char* HB_DIST_LOWER;
51 
54  static const char* HB_DIST_UPPER;
55 
58  static const char* HB_ANG_LOWER;
59 
62  static const char* HB_ANG_UPPER;
63 
66  static const char* VERBOSITY;
67  };
68 
71  struct Default
72  {
75  static const float HB_IDEAL_LENGTH;
76 
79  static const float HB_IDEAL_ANGLE;
80 
83  static const float HB_DIST_LOWER;
84 
87  static const float HB_DIST_UPPER;
88 
91  static const float HB_ANG_LOWER;
92 
95  static const float HB_ANG_UPPER;
96 
99  static const Size VERBOSITY;
100  };
101 
102  enum Mode
103  {
106  ALL_HYDROGENS
107  };
108 
109  //BALL_CREATE(HydrogenBond)
110 
114 
117  HydrogenBond(Mode mode)
118  throw();
119 
122  HydrogenBond(ScoringFunction& sf, Mode mode)
123  throw();
124 
127  HydrogenBond(ScoringComponent& sc, Mode mode)
128  throw();
129 
132  HydrogenBond(const HydrogenBond& fhb)
133  throw();
134 
137  virtual ~HydrogenBond()
138  throw();
139 
141 
144 
147  const HydrogenBond& operator = (const HydrogenBond& fhb)
148  throw();
149 
152  virtual void clear()
153  throw();
154 
156 
158 
159  bool operator == (const HydrogenBond& fhb) const
160  throw();
161 
163 
166 
169  virtual bool setup();
170 
171  void setupLigand();
172 
175  void enableChargeEvaluation(bool b);
177 
181 
182  virtual double updateScore();
183 
186  void update(const vector<std::pair<Atom*, Atom*> >& pair_vector);
188 
189  private:
190  /*_ This vector contains all possible hydrogen bonds. It is created
191  * during each call of update(). Pairs are always of the form (hydrogen,
192  * acceptor). The donor can be found easily by following the only bond
193  * of the hydrogen.
194  */
195  std::vector< std::pair<const Atom*, const Atom*> > possible_hydrogen_bonds_;
196 
197  double factor_;
198 
199  double h_bond_distance_lower_;
200 
201  double h_bond_distance_upper_;
202 
203  double h_bond_angle_lower_;
204 
205  double h_bond_angle_upper_;
206 
207  /*_ The ideal hbond length.
208  */
209  double ideal_hbond_length_;
210 
211  /*_ The ideal hbond angle.
212  */
213  double ideal_hbond_angle_;
214 
215  Size verbosity_;
216 
217  Size getType(Atom* atom);
218 
219  FresnoTypes* receptor_fresno_types_;
220  FresnoTypes* ligand_fresno_types_;
221 
222  Mode mode_;
223 
224  bool charge_evaluation_enabled_;
225  };
226 }
227 
228 #endif // BALL_SCORING_COMPONENTS_HYDROGENBOND_H
static const float HB_ANG_UPPER
Definition: hydrogenBond.h:95
static const char * HB_IDEAL_ANGLE
Definition: hydrogenBond.h:46
static const float HB_DIST_UPPER
Definition: hydrogenBond.h:87
static const char * HB_DIST_LOWER
Definition: hydrogenBond.h:50
static const Size VERBOSITY
Definition: hydrogenBond.h:99
STL namespace.
static const char * VERBOSITY
Definition: hydrogenBond.h:66
static const char * HB_IDEAL_LENGTH
Definition: hydrogenBond.h:42
static const float HB_IDEAL_ANGLE
Definition: hydrogenBond.h:79
static const char * HB_ANG_LOWER
Definition: hydrogenBond.h:58
static const float HB_DIST_LOWER
Definition: hydrogenBond.h:83
-*- Mode: C++; tab-width: 2; -*-
Definition: constants.h:12
static const char * HB_ANG_UPPER
Definition: hydrogenBond.h:62
static const float HB_ANG_LOWER
Definition: hydrogenBond.h:91
static const float HB_IDEAL_LENGTH
Definition: hydrogenBond.h:75
static const char * HB_DIST_UPPER
Definition: hydrogenBond.h:54
#define BALL_EXPORT
Definition: COMMON/global.h:50