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 #ifndef _chemistry_qc_mbptr12_mbptr12_h
00029 #define _chemistry_qc_mbptr12_mbptr12_h
00030
00031 #ifdef __GNUC__
00032 #pragma interface
00033 #endif
00034
00035 #include <string>
00036 #include <util/misc/compute.h>
00037 #include <util/group/memory.h>
00038 #include <util/group/message.h>
00039 #include <util/group/thread.h>
00040 #include <chemistry/qc/basis/obint.h>
00041 #include <chemistry/qc/basis/tbint.h>
00042 #include <chemistry/qc/scf/scf.h>
00043 #include <chemistry/qc/mbpt/mbpt.h>
00044 #include <chemistry/qc/mbptr12/linearr12.h>
00045
00046 #include <chemistry/qc/mbptr12/r12int_eval.h>
00047 #include <chemistry/qc/mbptr12/vxb_eval_info.h>
00048 #include <chemistry/qc/mbptr12/mp2r12_energy.h>
00049 #include <chemistry/qc/mbptr12/twobodygrid.h>
00050 #include <chemistry/qc/mbptr12/ansatz.h>
00051
00052 namespace sc {
00053
00054
00055
00056 class R12Technology;
00057 class R12IntEval;
00058 class R12IntEvalInfo;
00059 class MP2R12Energy;
00060
00063 class MBPT2_R12: public MBPT2 {
00064
00065 bool spinadapted_;
00066 bool include_mp1_;
00067 bool new_energy_;
00068
00069 Ref<R12IntEval> r12eval_;
00070 Ref<R12IntEvalInfo> r12evalinfo_;
00071
00074 Ref<MP2R12Energy> r12a_energy_;
00075 Ref<MP2R12Energy> r12ap_energy_;
00076 Ref<MP2R12Energy> r12app_energy_;
00077 Ref<MP2R12Energy> r12b_energy_;
00078 Ref<MP2R12Energy> r12c_energy_;
00079
00080 Ref<TwoBodyGrid> twopdm_grid_;
00081 unsigned int plot_pair_function_[2];
00082
00083 #define ref_to_mp2r12_acc_ 100.0
00084
00085 double mp2_corr_energy_;
00086
00087
00088 void compute_energy_();
00089
00090 protected:
00091
00092
00093 void compute();
00094
00095 public:
00096 MBPT2_R12(StateIn&);
00117 MBPT2_R12(const Ref<KeyVal>&);
00118 ~MBPT2_R12();
00119
00120 void save_data_state(StateOut&);
00121
00122 const Ref<R12IntEvalInfo>& r12evalinfo() const { return r12evalinfo_; }
00123 const Ref<R12IntEval>& r12eval() const { return r12eval_; }
00125 void corrfactor(const Ref<LinearR12::CorrelationFactor>&);
00126
00127 double corr_energy();
00128 double r12_corr_energy();
00129
00130 RefSymmSCMatrix density();
00131
00132 void obsolete();
00133 int gradient_implemented() const;
00134 int value_implemented() const;
00135
00136 void print(std::ostream&o=ExEnv::out0()) const;
00137 };
00138
00139 }
00140
00141 #endif
00142
00143
00144
00145
00146