00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef QMCBasisFunction_H
00034 #define QMCBasisFunction_H
00035
00036 #include <math.h>
00037 #include <iostream>
00038
00039 #include "CubicSplineWithGeometricProgressionGrid.h"
00040 #include "QMCBasisFunctionCoefficients.h"
00041 #include "QMCMolecule.h"
00042 #include "QMCFlags.h"
00043 #include "Array1D.h"
00044 #include "Array2D.h"
00045
00046 using namespace std;
00047
00048
00055 class QMCBasisFunction
00056 {
00057 public:
00058 friend class QMCPsiPotential;
00062 QMCBasisFunction();
00063
00071 void initialize(QMCFlags * flags, QMCMolecule * molecule);
00072
00077 void evaluateBasisFunctions(Array2D<double>& X,
00078 Array2D<qmcfloat>& chi_value);
00079
00097 void angularGrid(Array2D<double>& grid,
00098 int nuc,
00099 Array2D< Array1D<double> > & angularCi);
00100
00110 void QMCBasisFunction::basisFunctionsOnGrid(Array2D<double>& grid,
00111 int nuc,
00112 Array2D< Array1D<double> > & angularCi,
00113 Array2D<qmcfloat>& chi_val);
00114
00118 void evaluateBasisFunctions(Array2D<double>& X, int start, int stop,
00119 Array2D<qmcfloat>& chi_value,
00120 Array2D<qmcfloat>& chi_grx,
00121 Array2D<qmcfloat>& chi_gry,
00122 Array2D<qmcfloat>& chi_grz,
00123 Array2D<qmcfloat>& chi_laplacian);
00124
00130 void operator=( const QMCBasisFunction & rhs );
00131
00137 void read(string runfile);
00138
00143 friend istream& operator >>(istream& strm,
00144 QMCBasisFunction &rhs);
00145
00149 friend ostream& operator <<(ostream& strm,QMCBasisFunction& rhs);
00150
00159 int getNumberBasisFunctions(int i);
00160
00167 QMCBasisFunctionCoefficients* getBFCoeffs(int i);
00168
00169 protected:
00170 QMCFlags *flags;
00171 QMCMolecule *Molecule;
00172
00173 int N_BasisFunctions;
00174
00179 Array1D<QMCBasisFunctionCoefficients> BFCoeffs;
00180
00181 Array1D <double> Xcalc;
00182
00183 Array2D<int> BFLookupTable;
00184
00185 private:
00193 static double radialFunction(QMCBasisFunctionCoefficients& BFC,
00194 int orbital, double r_sq);
00195
00204 static double radialFunctionFirstDerivative(QMCBasisFunctionCoefficients& BFC,
00205 int orbital, double r_sq);
00206
00215 static double radialFunctionSecondDerivative(QMCBasisFunctionCoefficients& BFC,
00216 int orbital, double r_sq);
00217
00225 Array2D<CubicSplineWithGeometricProgressionGrid> RadialFunctionInterpolation;
00226
00235 Array2D<CubicSplineWithGeometricProgressionGrid>
00236 RadialFunctionFirstDerivativeInterpolation;
00237
00246 Array2D<CubicSplineWithGeometricProgressionGrid>
00247 RadialFunctionSecondDerivativeInterpolation;
00248
00253 bool use_radial_interpolation;
00254
00259 void initializeInterpolations();
00260
00269 void initializeInterpolation(int bfc_number,int orbital,
00270 CubicSplineWithGeometricProgressionGrid & S,
00271 int whichDerivative);
00272
00273 };
00274
00275 #endif
00276