BALL  1.5.0
generalizedBornCase.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: generalizedBornCase.h,v 1.1 2005/11/21 19:38:38 anker Exp $
5 //
6 
7 #ifndef BALL_SOLVATION_GENERALIZED_BORN_H
8 #define BALL_SOLVATION_GENERALIZED_BORN_H
9 
10 #ifndef BALL_COMMON_H
11 # include <BALL/common.h>
12 #endif
13 
14 #ifndef BALL_KERNEL_PTE_H
15 # include <BALL/KERNEL/PTE.h>
16 #endif
17 
18 #ifndef BALL_KERNEL_ATOMCONTAINER_H
20 #endif
21 
22 #ifndef BALL_DATATYPE_STRINGHASHMAP_H
24 #endif
25 
26 #ifndef BALL_FORMAT_INIFILE_H
27 # include <BALL/FORMAT/INIFile.h>
28 #endif
29 
30 #ifndef BALL_FORMAT_PARAMETERSECTION_H
32 #endif
33 
34 #include <map>
35 #include <set>
36 
37 namespace BALL
38 {
62  {
63  public:
64 
65  struct Option
66  {
68  static const String VERBOSITY;
69 
71  static const String LAMBDA;
72 
74  static const String DELTA;
75 
77  static const String KAPPA;
78 
80  static const String RHO_0;
81 
83  static const String DC_SOLVENT;
84 
86  static const String DC_SOLUTE;
87 
89  static const String FILENAME;
90  };
91 
92  struct Default
93  {
95  static const Size VERBOSITY;
96 
98  static const float LAMBDA;
99 
101  static const float DELTA;
102 
104  static const float KAPPA;
105 
107  static const float RHO_0;
108 
110  static const float DC_SOLVENT;
111 
113  static const float DC_SOLUTE;
114 
116  static const String FILENAME;
117  };
118 
121 
124 
126  void clear();
127 
131  bool setup(const AtomContainer& ac);
132 
134  void setScalingFactorFile(const String& filename);
135 
137  void setScalingFactors(const StringHashMap<float>& scaling_factors);
138 
141 
143  void setSolventDC(float solvent_dc);
144 
146  void setSoluteDC(float solute_dc);
147 
150 
154 
159 
162  float calculatePotential(const Atom& atom_i) const;
163 
165  bool readScalingFactors(const String& inifile_name);
166 
167 
168  private:
169 
170  /* Parameters for the generalized Born model
171  */
172  class GBParameters : public ParameterSection
173  {
174  public:
175 
176  GBParameters();
177 
178  ~GBParameters();
179 
180  bool extractSection(Parameters& parameters, const String& section_name);
181 
183 
184  float getSoluteDC() const;
185 
186  float getSolventDC() const;
187 
188  float getKappa() const;
189 
190  private:
191 
192  /*_
193  */
194  StringHashMap<float> scaling_factors_;
195 
196  /*_
197  */
198  float dc_solute_;
199 
200  /*_
201  */
202  float dc_solvent_;
203 
204  /*_
205  */
206  float lambda_;
207 
208  /*_
209  */
210  float delta_;
211 
212  /*_
213  */
214  float kappa_;
215 
216  /*_
217  */
218  float rho_0_;
219 
220  };
221 
224  AtomContainer* ac_;
225 
228  std::vector<const Atom*> atoms_;
229 
232  std::vector<float> born_radii_;
233 
237  std::vector< std::pair<Size, Size> > pair_list_;
238 
241  std::vector< float > pair_distances_;
242  std::vector< float > pair_charges_;
243  std::vector< std::vector< float > > squared_distances_;
244 
247  float dc_solute_;
248  float dc_solvent_;
249 
253  StringHashMap<float> scaling_factors_;
254  std::vector<float> scaling_factor_;
255 
258  String scaling_factor_filename_;
259 
264  float lambda_;
265 
271  float delta_;
272 
276  float kappa_;
277 
280  float rho_0_;
281 
284  float to_kJ_mol_;
285 
288  void calculateBornRadii_();
289 
293  float calculateCreationEnergy_() const;
294 
298  float calculateTransferEnergy_() const;
299 
305  float f_GB_(Size i, Size j) const;
306 
309  float coulombIntegralApproximation_(float distance, float scaled_radius_j,
310  float radius_i) const;
311 
312 
313 
314  };
315 
316 
317 } // namespace BALL
318 
319 #endif // BALL_SOLVATION_GENERALIZED_BORN_H
Definition: constants.h:13
bool setup(const AtomContainer &ac)
void calculatePotential(HashMap< const Atom *, float > &p_hash) const
void setSolventDC(float solvent_dc)
??? Should be done by options
float calculateEnergy()
Compute the total energy of the system.
void setSoluteDC(float solute_dc)
??? Should be done by options
const StringHashMap< float > & getScalingFactors() const
float calculatePotential(const Atom &atom_i) const
void setScalingFactorFile(const String &filename)
??? This should be done through Options!
void setScalingFactors(const StringHashMap< float > &scaling_factors)
bool readScalingFactors(const String &inifile_name)