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 #ifdef __GNUG__
00029 #pragma interface
00030 #endif
00031
00032 #ifndef _chemistry_qc_mbptr12_vxbevalinfo_h
00033 #define _chemistry_qc_mbptr12_vxbevalinfo_h
00034
00035 #include <util/misc/string.h>
00036 #include <util/ref/ref.h>
00037 #include <math/scmat/abstract.h>
00038 #include <util/group/memory.h>
00039 #include <chemistry/molecule/energy.h>
00040 #include <chemistry/qc/scf/scf.h>
00041
00042 namespace sc {
00043
00044 class MBPT2_R12;
00045
00049 class R12IntEvalInfo : virtual public SavableState {
00050
00051 public:
00052
00053 enum StoreMethod { mem_posix = 0, posix = 1, mem_mpi = 2, mpi = 3, mem_only = 4 };
00054
00055 private:
00056
00057 MolecularEnergy* mole_;
00058 Ref<SCF> ref_;
00059 Ref<Integral> integral_;
00060 Ref<GaussianBasisSet> bs_;
00061 Ref<GaussianBasisSet> bs_aux_;
00062 Ref<SCMatrixKit> matrixkit_;
00063 Ref<MessageGrp> msg_;
00064 Ref<MemoryGrp> mem_;
00065 Ref<ThreadGrp> thr_;
00066
00067 int nocc_;
00068 int nocc_act_;
00069 int nfzc_;
00070 int nfzv_;
00071 int noso_;
00072
00073 size_t memory_;
00074 bool dynamic_;
00075 int debug_;
00076 StoreMethod ints_method_;
00077 char* ints_file_;
00078
00079 RefSCMatrix scf_vec_;
00080 RefDiagSCMatrix evals_;
00081 RefDiagSCMatrix occs_;
00082 int* orbsym_;
00083
00084 void eigen_(RefDiagSCMatrix& evals, RefSCMatrix& scf_vec, RefDiagSCMatrix& occs, int*& orbsym);
00085
00086 public:
00087 R12IntEvalInfo(StateIn&);
00088 R12IntEvalInfo(MBPT2_R12*);
00089 ~R12IntEvalInfo();
00090
00091 void save_data_state(StateOut&);
00092
00093 void set_dynamic(bool dynamic) { dynamic_ = dynamic; };
00094 void set_debug_level(int debug) { debug_ = debug; };
00095 void set_ints_method(const StoreMethod method) { ints_method_ = method; };
00096 void set_ints_file(const char* filename) { ints_file_ = strdup(filename); };
00097 void set_memory(size_t nbytes) { if (nbytes >= 0) memory_ = nbytes; };
00098
00099 MolecularEnergy* mole() const { return mole_; };
00100 Ref<SCF> ref() const { return ref_; };
00101 Ref<Integral> integral() const { return integral_; };
00102 Ref<GaussianBasisSet> basis() const { return bs_; };
00103 Ref<GaussianBasisSet> basis_aux() const { return bs_aux_; };
00104 Ref<SCMatrixKit> matrixkit() const { return matrixkit_; };
00105 Ref<MemoryGrp> mem() const { return mem_;};
00106 Ref<MessageGrp> msg() const { return msg_;};
00107 Ref<ThreadGrp> thr() const { return thr_;};
00108
00109 bool dynamic() const { return dynamic_; };
00110 int debug_level() const { return debug_; };
00111 const StoreMethod ints_method() const { return ints_method_; };
00112 char* ints_file() const;
00113 const size_t memory() const { return memory_; };
00114
00115 const int nocc() const { return nocc_;};
00116 const int nocc_act() const { return nocc_act_;};
00117 const int noso() const { return noso_;};
00118 const int nfzc() const { return nfzc_;};
00119 const int nfzv() const { return nfzv_;};
00120
00121 RefSCMatrix scf_vec() const { return scf_vec_; };
00122 RefDiagSCMatrix evals() const { return evals_; };
00123 int *orbsym() const { return orbsym_; };
00124
00126 void compute_multipole_ints(RefSymmSCMatrix& MX,
00127 RefSymmSCMatrix& MY,
00128 RefSymmSCMatrix& MZ,
00129 RefSymmSCMatrix& MXX,
00130 RefSymmSCMatrix& MYY,
00131 RefSymmSCMatrix& MZZ);
00132
00133 };
00134
00135 }
00136
00137 #endif
00138
00139
00140
00141
00142
00143
00144