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 _mpqc_src_lib_chemistry_qc_mbptr12_fockbuildruntime_h
00033 #define _mpqc_src_lib_chemistry_qc_mbptr12_fockbuildruntime_h
00034
00035 #include <util/ref/ref.h>
00036 #include <util/group/thread.h>
00037 #include <util/group/message.h>
00038 #include <math/scmat/matrix.h>
00039 #include <chemistry/qc/basis/basis.h>
00040 #include <chemistry/qc/basis/integral.h>
00041 #include <chemistry/qc/mbptr12/registry.h>
00042 #include <chemistry/qc/mbptr12/spin.h>
00043
00044 namespace sc {
00045
00046 class FockBuildRuntime : virtual public SavableState {
00047 public:
00048 FockBuildRuntime(const Ref<GaussianBasisSet>& refbasis,
00049 const RefSymmSCMatrix& aodensity_alpha,
00050 const RefSymmSCMatrix& aodensity_beta,
00051 const Ref<Integral>& integral,
00052 Ref<MessageGrp> msg = MessageGrp::get_default_messagegrp(),
00053 Ref<ThreadGrp> thr = ThreadGrp::get_default_threadgrp());
00054 FockBuildRuntime(StateIn& si);
00055 void save_data_state(StateOut& so);
00056
00059 bool exists(const std::string& key) const;
00060
00066 RefSCMatrix get(const std::string& key);
00067
00068 const Ref<Integral>& integral() const { return integral_; }
00069 const Ref<MessageGrp>& msg() const { return msg_; }
00070 const Ref<ThreadGrp>& thr() const { return thr_; }
00071 const Ref<GaussianBasisSet>& basis() const { return basis_; }
00072
00073 private:
00074
00075 Ref<Integral> integral_;
00076 Ref<MessageGrp> msg_;
00077 Ref<ThreadGrp> thr_;
00078 Ref<GaussianBasisSet> basis_;
00079 bool spin_polarized_;
00080
00081
00082 RefSymmSCMatrix P_, Po_;
00083
00084
00085 typedef Registry<std::string, RefSCMatrix, detail::NonsingletonCreationPolicy> FockMatrixRegistry;
00086 Ref<FockMatrixRegistry> registry_;
00087
00089 void validate_key(const std::string& key) const;
00090
00091 };
00092
00094 class ParsedOneBodyIntKey {
00095 public:
00096 ParsedOneBodyIntKey(const std::string& key);
00097
00098 const std::string& key() const { return key_; }
00099 const std::string& bra() const { return bra_; }
00100 const std::string& ket() const { return ket_; }
00101 const std::string& oper() const { return oper_; }
00102 SpinCase1 spin() const { return spin_; }
00103
00105 static std::string key(const std::string& bra,
00106 const std::string& ket,
00107 const std::string& oper,
00108 SpinCase1 spin = AnySpinCase1);
00109
00110 private:
00111 std::string key_;
00112 std::string bra_, ket_;
00113 std::string oper_;
00114 SpinCase1 spin_;
00115 };
00116
00117 }
00118
00119 #endif // end of header guard
00120
00121
00122
00123
00124
00125