BALL  1.5.0
pair6_12RDFIntegrator.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: pair6_12RDFIntegrator.h,v 1.24 2005/12/23 17:01:59 amoll Exp $
5 //
6 
7 #ifndef BALL_SOLVATION_PAIR6_12RDFINTEGRATOR_H
8 #define BALL_SOLVATION_PAIR6_12RDFINTEGRATOR_H
9 
10 #ifndef BALL_STRUCTURE_RDFINTEGRATOR_H
12 #endif
13 
14 #ifndef BALL_MATHS_PIECEWISEFUNCTION_H
16 #endif
17 
18 #ifndef BALL_DATATYPE_OPTIONS_H
19 # include <BALL/DATATYPE/options.h>
20 #endif
21 
22 // ?????: DOCU ... documentation for constants
23 
24 namespace BALL
25 {
35  : public RDFIntegrator
36  {
37  public:
38 
40 
41 
46  {
52  static const char* METHOD;
53 
59  static const char* SAMPLES;
60 
66  static const char* VERBOSITY;
67  };
68 
70  {
74  static const Size VERBOSITY;
75 
79  static const Size METHOD;
80 
84  static const Size SAMPLES;
85  };
86 
90  {
91  METHOD__UNKNOWN = 0,
92  METHOD__ANALYTICAL = 1,
93  METHOD__TRAPEZIUM = 2
94  };
95 
99 
103 
107  Pair6_12RDFIntegrator(const Pair6_12RDFIntegrator& integrator);
108 
116  Pair6_12RDFIntegrator(double A, double B, double k1, double k2,
117  const RadialDistributionFunction& rdf);
118 
121  virtual ~Pair6_12RDFIntegrator();
122 
124 
127 
132  const Pair6_12RDFIntegrator& operator =
133  (const Pair6_12RDFIntegrator& integrator);
134 
137  virtual void clear();
138 
140 
142 
149  void setConstants(double A, double B, double k1, double k2);
150 
157  void getConstants(double& A, double& B, double& k1, double& k2);
158 
163  double integrateToInf(double from) const;
164 
173  double integrateToInf(double from, double A, double B, double k1,
174  double k2);
175 
182  double integrate(double from, double to) const;
183 
193  double integrate(double from, double to, double A, double B, double k1,
194  double k2);
195 
201  virtual double operator () (double x) const;
202 
204 
207 
213  bool operator == (const Pair6_12RDFIntegrator& integrator) const;
214 
216 
220 
221 
225 
230  virtual void dump (std::ostream& s = std::cout, Size depth = 0) const;
231 
233 
234  protected:
235 
236  /*_ Repulsion constant
237  */
238  double A_;
239 
240  /*_ Dispersion constant
241  */
242  double B_;
243 
244  /*_ Geometry constant
245  */
246  double k1_;
247 
248  /*_ Geometry constant
249  */
250  double k2_;
251 
252 
253  private:
254 
255  /*_ Integrate an interval analytically. This method does the actual work.
256  @param interval the interval to be integrated
257  @param coeffs the coefficients for this interval
258  @param x0 the value to be subtracted from x
259  @return the value of the integral
260  */
261  double analyticallyIntegrateInterval(const Interval& interval,
262  const Coefficients& coeffs, float x0) const;
263 
264  /*_ Integrate an interval numerically.
265  @param interval the interval to be integrated
266  @return the value of the integral
267  */
268  double numericallyIntegrateInterval(const Interval& interval) const;
269 
270  /*_ Project a number from the integration beam to the projection beam
271  of an atom center for the rdf thingy.
272  @param x the value to be projected
273  @return the projection of <b> x </b>
274  */
275  double project(double x) const;
276 
277  /*_ Do the reverse of project().
278  @param x the valut to be reversly projected
279  @return the projection of <b> x </b>
280  */
281  double unproject(double x) const;
282  };
283 
284 } // namespace BALL
285 
286 #endif // BALL_SOLVATION_PAIR6_12RDFINTEGRATOR_H
BALL::Pair6_12RDFIntegrator::Option
Definition: pair6_12RDFIntegrator.h:45
BALL::Pair6_12RDFIntegrator::Default::SAMPLES
static const Size SAMPLES
Definition: pair6_12RDFIntegrator.h:84
BALL::Options
Definition: options.h:46
BALL::Pair6_12RDFIntegrator::Default::VERBOSITY
static const Size VERBOSITY
Definition: pair6_12RDFIntegrator.h:74
piecewiseFunction.h
BALL::Pair6_12RDFIntegrator::k1_
double k1_
Definition: pair6_12RDFIntegrator.h:246
BALL::Pair6_12RDFIntegrator::IntegrationMethod
IntegrationMethod
Definition: pair6_12RDFIntegrator.h:89
BALL::RadialDistributionFunction
Definition: radialDistributionFunction.h:22
BALL
Definition: constants.h:12
BALL::Pair6_12RDFIntegrator::k2_
double k2_
Definition: pair6_12RDFIntegrator.h:250
BALL::Pair6_12RDFIntegrator::Default::METHOD
static const Size METHOD
Definition: pair6_12RDFIntegrator.h:79
BALL::Interval
std::pair< double, double > Interval
Definition: piecewiseFunction.h:23
BALL::Pair6_12RDFIntegrator::Default
Definition: pair6_12RDFIntegrator.h:69
BALL::Pair6_12RDFIntegrator::B_
double B_
Definition: pair6_12RDFIntegrator.h:242
BALL::Pair6_12RDFIntegrator::A_
double A_
Definition: pair6_12RDFIntegrator.h:238
options.h
BALL::Pair6_12RDFIntegrator::options
Options options
Definition: pair6_12RDFIntegrator.h:219
BALL::Pair6_12RDFIntegrator
Definition: pair6_12RDFIntegrator.h:34
BALL_SIZE_TYPE
BALL::Pair6_12RDFIntegrator::Option::METHOD
static const char * METHOD
Definition: pair6_12RDFIntegrator.h:52
BALL::Coefficients
std::vector< double > Coefficients
Definition: piecewiseFunction.h:19
BALL::operator==
BALL_EXPORT bool operator==(const String &s1, const String &s2)
BALL::RDFIntegrator
Definition: RDFIntegrator.h:19
BALL_CREATE
#define BALL_CREATE(name)
Definition: create.h:62
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
RDFIntegrator.h
BALL::Pair6_12RDFIntegrator::Option::VERBOSITY
static const char * VERBOSITY
Definition: pair6_12RDFIntegrator.h:66
BALL::Pair6_12RDFIntegrator::Option::SAMPLES
static const char * SAMPLES
Definition: pair6_12RDFIntegrator.h:59