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_transformfactory_h
00033 #define _chemistry_qc_mbptr12_transformfactory_h
00034
00035 #include <string>
00036 #include <util/ref/ref.h>
00037 #include <util/group/memory.h>
00038 #include <chemistry/molecule/energy.h>
00039 #include <chemistry/qc/basis/integral.h>
00040 #include <chemistry/qc/mbptr12/moindexspace.h>
00041
00042 using namespace std;
00043
00044 namespace sc {
00045
00046 class TwoBodyMOIntsTransform;
00047
00050 class MOIntsTransformFactory : virtual public SavableState {
00051
00052 public:
00053
00055 enum StoreMethod { mem_posix = 0, posix = 1, mem_mpi = 2, mpi = 3, mem_only = 4 };
00056
00057 private:
00058
00059 Ref<MolecularEnergy> top_mole_;
00060
00061 Ref<Integral> integral_;
00062 Ref<MessageGrp> msg_;
00063 Ref<MemoryGrp> mem_;
00064 Ref<ThreadGrp> thr_;
00065
00066 Ref<MOIndexSpace> space1_;
00067 Ref<MOIndexSpace> space2_;
00068 Ref<MOIndexSpace> space3_;
00069 Ref<MOIndexSpace> space4_;
00070
00071 size_t memory_;
00072 bool dynamic_;
00073 double print_percent_;
00074 int debug_;
00075 StoreMethod ints_method_;
00076 std::string file_prefix_;
00077
00078 public:
00079
00080 MOIntsTransformFactory(StateIn&);
00081 MOIntsTransformFactory(const Ref<Integral>& integral,
00082 const Ref<MOIndexSpace>& space1, const Ref<MOIndexSpace>& space2 = 0,
00083 const Ref<MOIndexSpace>& space3 = 0, const Ref<MOIndexSpace>& space4 = 0);
00084 ~MOIntsTransformFactory();
00085
00086 void save_data_state(StateOut&);
00087
00089 void set_spaces(const Ref<MOIndexSpace>& space1, const Ref<MOIndexSpace>& space2 = 0,
00090 const Ref<MOIndexSpace>& space3 = 0, const Ref<MOIndexSpace>& space4 = 0);
00091
00093 void set_top_mole(const Ref<MolecularEnergy>& top_mole) { top_mole_ = top_mole; }
00095 void set_ints_method(const StoreMethod method) { ints_method_ = method; }
00097 void set_file_prefix(const std::string& prefix) { file_prefix_ = prefix; }
00098 void set_debug(int debug) { debug_ = debug; }
00099 void set_dynamic(bool dynamic) { dynamic_ = dynamic; }
00100 void set_print_percent(double print_percent) { print_percent_ = print_percent; }
00101 void set_memory(size_t nbytes) { memory_ = nbytes; }
00102
00104 Ref<Integral> integral() const { return integral_; };
00106 const StoreMethod ints_method() const { return ints_method_; }
00108 const std::string file_prefix() const { return file_prefix_; }
00109 const int debug() const { return debug_; }
00110 const bool dynamic() const { return dynamic_; }
00111 const double print_percent() const { return print_percent_; }
00112 const size_t memory() const { return memory_; }
00113
00115 Ref<MOIndexSpace> space1() const;
00117 Ref<MOIndexSpace> space2() const;
00119 Ref<MOIndexSpace> space3() const;
00121 Ref<MOIndexSpace> space4() const;
00122
00125 Ref<TwoBodyMOIntsTransform> twobody_transform_13(const std::string& id);
00126
00129 Ref<TwoBodyMOIntsTransform> twobody_transform_12(const std::string& id);
00130
00131 };
00132
00133 }
00134
00135 #include <chemistry/qc/mbptr12/transform_tbint.h>
00136
00137 #endif
00138
00139
00140
00141
00142
00143
00144