BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
hydrogenBond.h
Go to the documentation of this file.
1 // $Id: hydrogenBond.h,v 1.3 2006/05/17 12:49:15 anker Exp $
2 // Molecular Mechanics: Fresno force field, hydrogen bond component
3 
4 #ifndef BALL_SCORING_COMPONENTS_HYDROGENBOND_H
5 #define BALL_SCORING_COMPONENTS_HYDROGENBOND_H
6 
10 
11 namespace BALL
12 {
13 
18  : public ScoringComponent
19  {
20 
21  public:
22 
23 
24  struct Option
25  {
28  static const char* HB_IDEAL_LENGTH;
29 
32  static const char* HB_IDEAL_ANGLE;
33 
36  static const char* HB_DIST_LOWER;
37 
40  static const char* HB_DIST_UPPER;
41 
44  static const char* HB_ANG_LOWER;
45 
48  static const char* HB_ANG_UPPER;
49 
52  static const char* VERBOSITY;
53  };
54 
57  struct Default
58  {
61  static const float HB_IDEAL_LENGTH;
62 
65  static const float HB_IDEAL_ANGLE;
66 
69  static const float HB_DIST_LOWER;
70 
73  static const float HB_DIST_UPPER;
74 
77  static const float HB_ANG_LOWER;
78 
81  static const float HB_ANG_UPPER;
82 
85  static const Size VERBOSITY;
86 
87  };
88 
89 
90 
91 
93 
94 
97 
100  HydrogenBond()
101  ;
102 
105  HydrogenBond(ScoringFunction& sf)
106  ;
107 
110  HydrogenBond(ScoringComponent& sc)
111  ;
112 
115  HydrogenBond(const HydrogenBond& fhb)
116  ;
117 
120  virtual ~HydrogenBond()
121  ;
122 
124 
127 
130  const HydrogenBond& operator = (const HydrogenBond& fhb)
131  ;
132 
135  virtual void clear()
136  ;
137 
139 
142 
143  bool operator == (const HydrogenBond& fhb) const
144  ;
145 
147 
150 
153  virtual bool setup()
154  ;
155 
157 
160 
163  virtual double calculateScore()
164  ;
165 
166  const HashMap<const Atom*, Size>& getFresnoTypes()
167  ;
169 
170  private:
171 
172  /*_ This vector contains all possible hydrogen bonds. It is created
173  * during the setup process. Pairs are always of the form (hydrogen,
174  * acceptor). The donor can be found easily by following the only bond
175  * of the hydrogen.
176  */
177  std::vector< std::pair<const Atom*, const Atom*> > possible_hydrogen_bonds_;
178 
179  /*_ A hash map containing all hydrogens and bools indicating whether
180  * this hydrigen was already used for scoring a hydrogen bond. At the
181  * moment we use the first hydrogen bond we find and hope that this
182  * will indeed be the only one contributing to the energy score. This
183  * HashMap will only be used by updateEnergy() but we build it in
184  * setup().
185  */
186  HashMap<const Atom*, bool> already_used_;
187 
188  /*_
189  */
190  double factor_;
191 
192  /*_
193  */
195 
196  /*_
197  */
199 
200  /*_
201  */
203 
204  /*_
205  */
207 
208  /*_ The ideal hbond length.
209  */
211 
212  /*_ The ideal hbond angle.
213  */
215 
216  /*_
217  */
218  HashMap<const Atom*, Size> fresno_types;
219 
220 
221  };
222 
223 } // namespace BALL
224 
225 #endif // BALL_SCORING_COMPONENTS_HYDROGENBOND_H