00001 // QMcBeaver 00002 // 00003 // Constructed by 00004 // 00005 // Michael Todd Feldmann 00006 // and 00007 // David Randall "Chip" Kent IV 00008 // 00009 // Copyright 2000. All rights reserved. 00010 // 00011 // drkent@users.sourceforge.net mtfeldmann@users.sourceforge.net 00012 00013 #ifndef QMCPotential_Energy_H 00014 #define QMCPotential_Energy_H 00015 00016 #include <iostream> 00017 00018 #include "Array1D.h" 00019 #include "Array2D.h" 00020 #include "QMCInput.h" 00021 #include "QMCHartreeFock.h" 00022 #include "QMCWalkerData.h" 00023 #include "QMCElectronNucleusCusp.h" 00024 00025 using namespace std; 00026 00027 00032 class QMCPotential_Energy 00033 { 00034 public: 00038 QMCPotential_Energy(); 00039 00040 00046 void initialize(QMCInput *input, QMCHartreeFock *HF); 00047 00055 double evaluatePsuedoPotential(Array2D<double> & R, int elec, int nuc); 00056 00063 void evaluate(Array1D<Array2D<double>*> &X, 00064 Array1D<QMCWalkerData *> &walkerData, 00065 int num); 00066 00070 double getEnergy(int which); 00071 00075 double getEnergyNE(int which); 00076 00080 double getEnergyEE(int which); 00081 00087 void operator=( const QMCPotential_Energy & rhs ); 00088 00089 private: 00090 QMCInput *Input; 00091 QMCHartreeFock *HartreeFock; 00092 QMCWalkerData * wd; 00093 QMCWavefunction * WF; 00094 QMCMolecule * MOL; 00095 00096 Array1D<double> Energy_total; 00097 Array1D<double> Energy_ne; 00098 Array1D<double> Energy_ee; 00099 00100 //A bunch of data for ecp evaluation 00101 Array1D< Array2D< Array1D<double> > > angularGrids; 00102 Array1D<double> integrand; 00103 Array2D<qmcfloat> * coeffs; 00104 Array2D<double> X; 00105 Array2D<double> D; 00106 Array2D<double> ciDet; 00107 Array1D< Array2D<double> > Dc_inv; 00108 QMCElectronNucleusCusp ElectronNucleusCuspA; 00109 QMCElectronNucleusCusp ElectronNucleusCuspB; 00110 00111 double P_nn; 00112 double P_en; 00113 double P_ee; 00114 00115 void calc_P_nn(); 00116 void calc_P_en(Array2D<double> &R); 00117 void calc_P_ee(Array2D<double> &R); 00118 }; 00119 00120 #endif