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_cints_grt_h
00033 #define _chemistry_qc_cints_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/cints/shellpairs.h>
00040 #include <chemistry/qc/intv3/fjt.h>
00041 #include <chemistry/qc/cints/int2e.h>
00042 #include <libr12/libr12.h>
00043
00044 namespace sc {
00045
00046 class Integral;
00047
00049 class GRTCints: public Int2eCints {
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<ShellPairsCints> shell_pairs12_;
00070 Ref<ShellPairsCints> shell_pairs34_;
00071
00072
00073 struct {
00074 int p12, p34, p13p24;
00075 ShellPairCints *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 void grt_quartet_data_(prim_data *Data, double scale);
00086
00087 Libr12_t Libr12_;
00088 Ref<FJT> Fm_Eval_;
00089
00090 public:
00091 GRTCints(Integral *,
00092 const Ref<GaussianBasisSet>&,
00093 const Ref<GaussianBasisSet>&,
00094 const Ref<GaussianBasisSet>&,
00095 const Ref<GaussianBasisSet>&,
00096 size_t storage);
00097 ~GRTCints();
00098
00099 double *buffer(TwoBodyInt::tbint_type te_type) const {
00100 if (te_type == TwoBodyInt::eri ||
00101 te_type == TwoBodyInt::r12 ||
00102 te_type == TwoBodyInt::r12t1 ||
00103 te_type == TwoBodyInt::r12t2)
00104 return target_ints_buffer_[te_type];
00105 else
00106 return 0;
00107 }
00108
00109 static size_t storage_required(const Ref<GaussianBasisSet>& b1,
00110 const Ref<GaussianBasisSet>& b2 = 0,
00111 const Ref<GaussianBasisSet>& b3 = 0,
00112 const Ref<GaussianBasisSet>& b4 = 0);
00113
00114
00115 void compute_quartet(int*, int*, int*, int*);
00116 };
00117
00118 #include <chemistry/qc/cints/grt_quartet_data.h>
00119
00120
00121
00122 class Libr12StaticInterface {
00123 bool ready;
00124
00125 public:
00126 Libr12StaticInterface() { init_libr12_base(); ready = true; }
00127 ~Libr12StaticInterface() { ready = false; }
00128 };
00129
00130 }
00131
00132 #endif
00133
00134
00135
00136
00137