00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef QMCElectronNucleusCuspParameters_H
00014 #define QMCElectronNucleusCuspParameters_H
00015
00016 #include <iostream>
00017
00018 #include "Polynomial.h"
00019 #include "Complex.h"
00020 #include "Array2D.h"
00021 #include <math.h>
00022
00023 using namespace std;
00024
00032 class QMCElectronNucleusCuspParameters
00033 {
00034 private:
00038 double rc;
00039
00043 Polynomial alpha;
00044
00048 Polynomial idealCurve;
00049
00053 double C;
00054
00059 bool noC;
00060
00064 int sgn0;
00065
00070 double sigma_sq;
00071
00075 double phi0;
00076
00081 double n0;
00082
00086 int Z;
00087
00092 double Zeff;
00093
00101 Array2D<qmcfloat> orbitalCoefficients;
00102
00118 void evaluateOriginalOrbital(double x, double y, double z, double r,
00119 double& orig_value, double& orig_gradx, double& orig_grady, double& orig_gradz,
00120 double& orig_laplacian);
00121 void evaluateOriginalOrbital(double x, double y, double z, double r,
00122 double& orig_value);
00123
00139 void evaluateReplacementOrbital(double x, double y, double z, double r,
00140 double& rep_value, double& rep_gradx, double& rep_grady, double& rep_gradz,
00141 double& rep_laplacian);
00142 void evaluateReplacementOrbital(double x, double y, double z, double r,
00143 double& rep_value);
00144
00148 double calculateLocalEnergy(double r, bool rIsZero);
00149
00154 void calculateSigmaSq();
00155
00165 void findMaxDeviation(double lower, double upper, bool lowerBoundZero,
00166 double& max);
00167
00168 public:
00169
00173 QMCElectronNucleusCuspParameters();
00174
00189 void replaceOrbitalValues(double x, double y, double z, double r,
00190 double& orb_value, double& orb_gradx, double& orb_grady, double& orb_gradz,
00191 double& orb_laplacian);
00192 void replaceOrbitalValues(double x, double y, double z, double r,
00193 double& orb_value);
00194
00201 void fitReplacementOrbital(double temp_phi0);
00202
00216 void initialize(const Array2D<qmcfloat>& temp_OrbitalCoefficients,
00217 double temp_n0, double temp_rc, const Polynomial& temp_idealCurve, int temp_Z);
00218
00224 double get_rc();
00225
00231 void set_rc(double temp_rc);
00232
00240 double getSigmaSq();
00241
00247 void operator=(const QMCElectronNucleusCuspParameters& rhs);
00248
00252 void printParameters();
00253
00257 friend ostream& operator <<(ostream& strm, QMCElectronNucleusCuspParameters &rhs);
00258 };
00259
00260 #endif