BALL
1.4.1
|
00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // $Id: pairExpRDFIntegrator.h,v 1.24 2005/12/23 17:02:00 amoll Exp $ 00005 // 00006 00007 #ifndef BALL_SOLVATION_PAIREXPRDFINTEGRATOR_H 00008 #define BALL_SOLVATION_PAIREXPRDFINTEGRATOR_H 00009 00010 #ifndef BALL_COMMON_H 00011 # include <BALL/common.h> 00012 #endif 00013 00014 #ifndef BALL_STRUCTURE_RDFINTEGRATOR_H 00015 # include <BALL/STRUCTURE/RDFIntegrator.h> 00016 #endif 00017 00018 #ifndef BALL_MATHS_PIECEWISEFUNCTION_H 00019 # include <BALL/STRUCTURE/piecewiseFunction.h> 00020 #endif 00021 00022 #ifndef BALL_DATATYPE_OPTIONS_H 00023 # include <BALL/DATATYPE/options.h> 00024 #endif 00025 00026 namespace BALL 00027 { 00037 class BALL_EXPORT PairExpRDFIntegrator 00038 : public RDFIntegrator 00039 { 00040 00041 public: 00042 00043 BALL_CREATE(PairExpRDFIntegrator) 00044 00045 00049 struct BALL_EXPORT Option 00050 { 00056 static const char* VERBOSITY; 00057 00062 static const char* SAMPLES; 00063 }; 00064 00065 struct BALL_EXPORT Default 00066 { 00070 static const int VERBOSITY; 00074 static const int SAMPLES; 00075 }; 00076 00077 00081 00084 PairExpRDFIntegrator(); 00085 00089 PairExpRDFIntegrator(const PairExpRDFIntegrator& integrator); 00090 00100 PairExpRDFIntegrator(double alpha, double C1, double C2, double R_ij_o, 00101 double k1, double k2, const RadialDistributionFunction& rdf); 00102 00105 virtual ~PairExpRDFIntegrator(); 00106 00108 00111 00116 const PairExpRDFIntegrator& operator = 00117 (const PairExpRDFIntegrator& integrator) ; 00118 00121 virtual void clear(); 00122 00124 00127 00137 void setConstants(double alpha, double C1, double C2, double R_ij_o, 00138 double k1, double k2); 00139 00149 void getConstants(double& alpha, double& C1, double& C2, double& R_ij_o, 00150 double& k1, double& k2) ; 00151 00156 double integrateToInf(double from) const; 00157 00168 double integrateToInf(double from, double alpha, double C1, double C2, 00169 double R_ij_o, double k1, double k2); 00170 00176 double integrate(double from, double to) const ; 00177 00189 double integrate(double from, double to, double alpha, double C1, 00190 double C2, double R_ij_o, double k1, double k2) ; 00191 00197 virtual double operator () (double x) const; 00198 00200 00203 00209 bool operator == (const PairExpRDFIntegrator& integrator) const; 00210 00212 00215 Options options; 00216 00220 00225 virtual void dump (std::ostream& s = std::cout, Size depth = 0) const; 00226 00228 00229 protected: 00230 00231 /*_ potential constant 00232 */ 00233 double alpha_; 00234 00235 /*_ potential constant 00236 */ 00237 double C1_; 00238 00239 /*_ potential constant 00240 */ 00241 double C2_; 00242 00243 /*_ potential constant 00244 */ 00245 double R_ij_o_; 00246 00247 /*_ geometric correction 00248 */ 00249 double k1_; 00250 00251 /*_ geometric correction 00252 */ 00253 double k2_; 00254 00255 00256 private: 00257 00258 /*_ Integrate an interval numerically. 00259 @param interval the interval to be integrated 00260 @return the value of the integral 00261 */ 00262 double numericallyIntegrateInterval(Interval interval) const; 00263 00264 /*_ Project a number from the integration beam to the projection beam 00265 of an atom center for the rdf thingy. 00266 @param x the value to be projected 00267 @return the projection of <b> x </b> 00268 */ 00269 double project(double x) const; 00270 00271 /*_ Do the reverse of project(). 00272 @param x the valut to be reversly projected 00273 @return the projection of <b> x </b> 00274 */ 00275 double unproject(double x) const; 00276 00277 }; 00278 00279 } // namespace BALL 00280 00281 #endif // BALL_SOLVATION_PAIREXPRDFINTEGRATOR_H