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
00051 namespace sc {
00052
00053
00054
00055 class R12IntEval;
00056 class R12IntEvalInfo;
00057 class MP2R12Energy;
00058
00061 class MBPT2_R12: public MBPT2 {
00062
00063 Ref<R12IntEval> r12eval_;
00064
00067 Ref<MP2R12Energy> r12a_energy_;
00068 Ref<MP2R12Energy> r12ap_energy_;
00069 Ref<MP2R12Energy> r12b_energy_;
00070
00071 Ref<GaussianBasisSet> aux_basis_;
00072 Ref<GaussianBasisSet> vir_basis_;
00073 Ref<SCVector> epair_0_, epair_1_;
00074
00075
00076 Ref<TwoBodyGrid> twopdm_grid_aa_;
00077 Ref<TwoBodyGrid> twopdm_grid_ab_;
00078
00079 #define ref_to_mp2r12_acc_ 100.0
00080
00081 double mp2_corr_energy_;
00082 double r12_corr_energy_;
00083 LinearR12::StandardApproximation stdapprox_;
00084 LinearR12::ABSMethod abs_method_;
00085 R12IntEvalInfo::StoreMethod r12ints_method_;
00086 std::string r12ints_file_;
00087 bool gbc_;
00088 bool ebc_;
00089 bool spinadapted_;
00090 bool include_mp1_;
00091
00092 void init_variables_();
00093
00094
00095 void check_integral_factory_();
00096
00097
00098 void compute_energy_a_();
00099
00100 protected:
00101
00102
00103 void compute();
00104
00105 public:
00106 MBPT2_R12(StateIn&);
00219 MBPT2_R12(const Ref<KeyVal>&);
00220 ~MBPT2_R12();
00221
00222 void save_data_state(StateOut&);
00223
00224 Ref<GaussianBasisSet> aux_basis() const;
00225 Ref<GaussianBasisSet> vir_basis() const;
00226 bool gbc() const;
00227 bool ebc() const;
00228 LinearR12::ABSMethod abs_method() const;
00229 LinearR12::StandardApproximation stdapprox() const;
00230 bool spinadapted() const;
00231 R12IntEvalInfo::StoreMethod r12ints_method() const;
00232 const std::string& r12ints_file() const;
00233
00234 double corr_energy();
00235 double r12_corr_energy();
00236
00237 RefSymmSCMatrix density();
00238
00239 void obsolete();
00240 int gradient_implemented() const;
00241 int value_implemented() const;
00242
00243 void print(std::ostream&o=ExEnv::out0()) const;
00244 };
00245
00246 }
00247
00248 #endif
00249
00250
00251
00252
00253