BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  throw(Exception::FileNotFound);
122 
125 
127  void clear();
128 
130  bool setup(const AtomContainer& ac)
131  throw(Exception::FileNotFound);
132 
134  void setScalingFactorFile(const String& filename);
135 
137  void setScalingFactors(const StringHashMap<float>& scaling_factors);
138 
140  const StringHashMap<float>& getScalingFactors() const;
141 
143  void setSolventDC(float solvent_dc);
144 
146  void setSoluteDC(float solute_dc);
147 
149  float calculateEnergy();
150 
153  float calculateSolvationEnergy();
154 
158  void calculatePotential(HashMap<const Atom*, float>& p_hash) const;
159 
162  float calculatePotential(const Atom& atom_i) const;
163 
165  bool readScalingFactors(const String& inifile_name)
166  throw(Exception::FileNotFound);
167 
168 
169  private:
170 
171  /* Parameters for the generalized Born model
172  */
173  class GBParameters : public ParameterSection
174  {
175  public:
176 
177  GBParameters();
178 
179  ~GBParameters();
180 
181  bool extractSection(Parameters& parameters, const String& section_name);
182 
184 
185  float getSoluteDC() const;
186 
187  float getSolventDC() const;
188 
189  float getKappa() const;
190 
191  private:
192 
193  /*_
194  */
195  StringHashMap<float> scaling_factors_;
196 
197  /*_
198  */
199  float dc_solute_;
200 
201  /*_
202  */
203  float dc_solvent_;
204 
205  /*_
206  */
207  float lambda_;
208 
209  /*_
210  */
211  float delta_;
212 
213  /*_
214  */
215  float kappa_;
216 
217  /*_
218  */
219  float rho_0_;
220 
221  };
222 
225  AtomContainer* ac_;
226 
229  std::vector<const Atom*> atoms_;
230 
233  std::vector<float> born_radii_;
234 
238  std::vector< std::pair<Size, Size> > pair_list_;
239 
242  std::vector< float > pair_distances_;
243  std::vector< float > pair_charges_;
244  std::vector< std::vector< float > > squared_distances_;
245 
248  float dc_solute_;
249  float dc_solvent_;
250 
254  StringHashMap<float> scaling_factors_;
255  std::vector<float> scaling_factor_;
256 
259  String scaling_factor_filename_;
260 
265  float lambda_;
266 
272  float delta_;
273 
277  float kappa_;
278 
281  float rho_0_;
282 
285  float to_kJ_mol_;
286 
289  void calculateBornRadii_();
290 
294  float calculateCreationEnergy_() const;
295 
299  float calculateTransferEnergy_() const;
300 
306  float f_GB_(Size i, Size j) const;
307 
310  float coulombIntegralApproximation_(float distance, float scaled_radius_j,
311  float radius_i) const;
312 
313 
314 
315  };
316 
317 
318 } // namespace BALL
319 
320 #endif // BALL_SOLVATION_GENERALIZED_BORN_H
void setSoluteDC(float solute_dc)
??? Should be done by options
float calculateEnergy()
Compute the total energy of the system.
void setScalingFactorFile(const String &filename)
??? This should be done through Options!
const StringHashMap< float > & getScalingFactors() const
void setSolventDC(float solvent_dc)
??? Should be done by options
void setScalingFactors(const StringHashMap< float > &scaling_factors)
bool readScalingFactors(const String &inifile_name)
void calculatePotential(HashMap< const Atom *, float > &p_hash) const
bool setup(const AtomContainer &ac)
We need an additional optioned version of that piece of code.
HashMap class based on the STL map (containing serveral convenience functions)
Definition: hashMap.h:73