00001
00002
00003
00004
00005
00006
00007 #ifndef BALL_SOLVATION_PAIR6_12RDFINTEGRATOR_H
00008 #define BALL_SOLVATION_PAIR6_12RDFINTEGRATOR_H
00009
00010 #ifndef BALL_STRUCTURE_RDFINTEGRATOR_H
00011 # include <BALL/STRUCTURE/RDFIntegrator.h>
00012 #endif
00013
00014 #ifndef BALL_MATHS_PIECEWISEFUNCTION_H
00015 # include <BALL/MATHS/piecewiseFunction.h>
00016 #endif
00017
00018 #ifndef BALL_DATATYPE_OPTIONS_H
00019 # include <BALL/DATATYPE/options.h>
00020 #endif
00021
00022
00023
00024 namespace BALL
00025 {
00034 class BALL_EXPORT Pair6_12RDFIntegrator
00035 : public RDFIntegrator
00036 {
00037 public:
00038
00039 BALL_CREATE(Pair6_12RDFIntegrator)
00040
00041
00045 struct BALL_EXPORT Option
00046 {
00052 static const char* METHOD;
00053
00059 static const char* SAMPLES;
00060
00066 static const char* VERBOSITY;
00067 };
00068
00069 struct BALL_EXPORT Default
00070 {
00074 static const Size VERBOSITY;
00075
00079 static const Size METHOD;
00080
00084 static const Size SAMPLES;
00085 };
00086
00089 enum IntegrationMethod
00090 {
00091 METHOD__UNKNOWN = 0,
00092 METHOD__ANALYTICAL = 1,
00093 METHOD__TRAPEZIUM = 2
00094 };
00095
00099
00102 Pair6_12RDFIntegrator();
00103
00107 Pair6_12RDFIntegrator(const Pair6_12RDFIntegrator& integrator);
00108
00116 Pair6_12RDFIntegrator(double A, double B, double k1, double k2,
00117 const RadialDistributionFunction& rdf);
00118
00121 virtual ~Pair6_12RDFIntegrator();
00122
00124
00127
00132 const Pair6_12RDFIntegrator& operator =
00133 (const Pair6_12RDFIntegrator& integrator);
00134
00137 virtual void clear();
00138
00140
00141
00142
00149 void setConstants(double A, double B, double k1, double k2);
00150
00157 void getConstants(double& A, double& B, double& k1, double& k2);
00158
00163 double integrateToInf(double from) const;
00164
00173 double integrateToInf(double from, double A, double B, double k1,
00174 double k2);
00175
00182 double integrate(double from, double to) const;
00183
00193 double integrate(double from, double to, double A, double B, double k1,
00194 double k2);
00195
00201 virtual double operator () (double x) const;
00202
00204
00207
00213 bool operator == (const Pair6_12RDFIntegrator& integrator) const;
00214
00216
00219 Options options;
00220
00221
00225
00230 virtual void dump (std::ostream& s = std::cout, Size depth = 0) const;
00231
00233
00234 protected:
00235
00236
00237
00238 double A_;
00239
00240
00241
00242 double B_;
00243
00244
00245
00246 double k1_;
00247
00248
00249
00250 double k2_;
00251
00252
00253 private:
00254
00255
00256
00257
00258
00259
00260
00261 double analyticallyIntegrateInterval(const Interval& interval,
00262 const Coefficients& coeffs, float x0) const;
00263
00264
00265
00266
00267
00268 double numericallyIntegrateInterval(const Interval& interval) const;
00269
00270
00271
00272
00273
00274
00275 double project(double x) const;
00276
00277
00278
00279
00280
00281 double unproject(double x) const;
00282 };
00283
00284 }
00285
00286 #endif // BALL_SOLVATION_PAIR6_12RDFINTEGRATOR_H