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_libint2_grt_h
00033 #define _chemistry_qc_libint2_grt_h
00034
00035 #include <limits.h>
00036
00037 #include <util/ref/ref.h>
00038 #include <chemistry/qc/basis/basis.h>
00039 #include <chemistry/qc/libint2/shellpairs.h>
00040 #include <chemistry/qc/basis/fjt.h>
00041 #include <chemistry/qc/libint2/int2e.h>
00042 #include <libint2/libint2.h>
00043
00044 namespace sc {
00045
00046 class Integral;
00047
00049 class GRTLibint2: public Int2eLibint2 {
00050 private:
00051
00052
00053 #define num_te_types_ 4
00054
00055
00056 double *target_ints_buffer_[num_te_types_];
00057
00058
00059 double *cart_ints_[num_te_types_];
00060 double *sphharm_ints_;
00061 double *perm_ints_;
00062
00063
00064 double *prim_ints_[num_te_types_];
00065 double *contr_quartets_[num_te_types_];
00066 double *shell_quartet_[num_te_types_];
00067
00068
00069 Ref<ShellPairsLibint2> shell_pairs12_;
00070 Ref<ShellPairsLibint2> shell_pairs34_;
00071
00072
00073 struct {
00074 int p12, p34, p13p24;
00075 ShellPairLibint2 *shell_pair12, *shell_pair34;
00076
00077 int *op1, *op2, *op3, *op4;
00079 double A[3], B[3], C[3], D[3];
00080 double AB2, CD2;
00081 int gc1, gc2, gc3, gc4;
00082 int p1, p2, p3, p4;
00083 int am;
00084 } quartet_info_;
00085 typedef Libint_t prim_data;
00086 void grt_quartet_data_(prim_data *Data, double scale);
00087
00088 Libr12_t Libr12_;
00089 Ref<FJT> Fm_Eval_;
00090
00091 public:
00092 GRTLibint2(Integral *,
00093 const Ref<GaussianBasisSet>&,
00094 const Ref<GaussianBasisSet>&,
00095 const Ref<GaussianBasisSet>&,
00096 const Ref<GaussianBasisSet>&,
00097 size_t storage);
00098 ~GRTLibint2();
00099
00100 double *buffer(TwoBodyInt::tbint_type te_type) const {
00101 if (te_type == TwoBodyInt::eri ||
00102 te_type == TwoBodyInt::r12 ||
00103 te_type == TwoBodyInt::r12t1 ||
00104 te_type == TwoBodyInt::r12t2)
00105 return target_ints_buffer_[te_type];
00106 else
00107 return 0;
00108 }
00109
00110 static size_t storage_required(const Ref<GaussianBasisSet>& b1,
00111 const Ref<GaussianBasisSet>& b2 = 0,
00112 const Ref<GaussianBasisSet>& b3 = 0,
00113 const Ref<GaussianBasisSet>& b4 = 0);
00114
00115
00116 void compute_quartet(int*, int*, int*, int*);
00117 };
00118
00119
00120
00121 class Libr12StaticInterface {
00122 bool ready;
00123
00124 public:
00125 Libr12StaticInterface() { init_libr12_base(); ready = true; }
00126 ~Libr12StaticInterface() { ready = false; }
00127 };
00128
00129 }
00130
00131 #include <chemistry/qc/libint2/grt_quartet_data.h>
00132
00133 #endif
00134
00135
00136
00137
00138