00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef CambridgeThreeBodyCorrelationFunction_H
00014 #define CambridgeThreeBodyCorrelationFunction_H
00015
00016 #include "QMCThreeBodyCorrelationFunction.h"
00017 #include "Array3D.h"
00018
00024 class CambridgeThreeBodyCorrelationFunction : public QMCThreeBodyCorrelationFunction
00025 {
00026 protected:
00027 double FunctionValue;
00028 Array1D<double> grad1;
00029 Array1D<double> grad2;
00030 double LaplacianValue;
00031
00032 Array1D<double> p_a;
00033 Array2D<double> p2_x1a;
00034 Array2D<double> p2_x2a;
00035 Array1D<double> p2_x1L;
00036 Array1D<double> p2_x2L;
00037 Array1D<double> p3_xxa;
00038
00039 private:
00040 double * d1pow;
00041 double * d2pow;
00042 double * r12pow;
00043
00044 double * d1pow1;
00045 double * d2pow1;
00046 double * r12pow1;
00047
00048 double * d1pow2;
00049 double * d2pow2;
00050 double * r12pow2;
00051
00052 double * coeffs;
00053
00054 int Nen, Nee, C;
00055 double cutoff;
00056 double L;
00057
00058 double pre1, pre2;
00059 double d1pre1, d1pre2;
00060 double d2pre1, d2pre2;
00061
00062 double pre1_L, pre2_L;
00063 double d1pre1_L, d1pre2_L;
00064 double d2pre1_L, d2pre2_L;
00065
00066 double dU_L, dU_Lr, dU_Lrr;
00067 double dU_dr1, dU_dr2, dU_dr12;
00068
00069 double r1, r2, r12;
00070 double d1, d2;
00071
00072 Array1D<double> r1v;
00073 Array1D<double> r2v;
00074 Array1D<double> r12v;
00075 public:
00076 CambridgeThreeBodyCorrelationFunction();
00077 ~CambridgeThreeBodyCorrelationFunction();
00078
00079 void initializeParameters(int electron_nucleus, int electron_electron,
00080 Array1D<double> &Parameters, int power,
00081 double max_dist);
00082
00083 bool setElectron(bool first, Array1D<double> &xyz, double dist);
00084
00085 void evaluate(Array1D<double> &xyz12, double r12);
00086
00087 double getFunctionValue();
00088 double getFunctionValue(double r12, double r1, double r2);
00089 double get_p_a(int ai);
00090
00091 double getLapPoly(double term,
00092 double lterm, double mterm, double nterm,
00093 double l2term, double m2term, double n2term,
00094 double lnterm, double mnterm,
00095 double p1, double p2,
00096 double d1p1, double d1p2,
00097 double d2p1, double d2p2);
00098
00099 Array1D<double> * getElectron1Gradient();
00100 Array1D<double> * getElectron2Gradient();
00101
00102 double get_p2_xa(bool e1, int xyz, int ai);
00103
00104 double getLaplacianValue();
00105 double get_p3_xxa(int ai);
00106
00107 double getCutoffDist();
00108
00109 void print(ostream& strm);
00110 };
00111
00112 #endif