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 #include <limits.h>
00033 #include <stdexcept>
00034
00035 #include <util/ref/ref.h>
00036 #include <util/class/scexception.h>
00037 #include <chemistry/qc/basis/basis.h>
00038 #include <chemistry/qc/basis/intparams.h>
00039 #include <chemistry/qc/basis/intdescr.h>
00040 #include <chemistry/qc/libint2/shellpairs.h>
00041 #include <chemistry/qc/basis/fjt.h>
00042 #include <chemistry/qc/libint2/int2e.h>
00043 #include <libint2/libint2.h>
00044
00045 #if LIBINT2_SUPPORT_GENG12
00046 #ifndef _chemistry_qc_libint2_geng12_h
00047 #define _chemistry_qc_libint2_geng12_h
00048
00049 namespace sc {
00050
00051 class Integral;
00052
00066 class GenG12Libint2: public Int2eLibint2 {
00067 private:
00069 static const int num_te_types_ = TwoBodyIntDescrR12::num_intsets;
00070
00071 typedef IntParamsGenG12 IntParamsType;
00072 typedef IntParamsType::PrimitiveGeminal PrimitiveGeminal;
00073 typedef IntParamsType::ContractedGeminal ContractedGeminal;
00074
00075 ContractedGeminal geminal_bra_;
00076
00077 ContractedGeminal geminal_ket_;
00078
00079
00080 double *target_ints_buffer_[num_te_types_];
00081
00082
00083 double *cart_ints_[num_te_types_];
00084 double *sphharm_ints_;
00085 double *perm_ints_;
00086
00087
00088 double *prim_ints_[num_te_types_];
00089 double *contr_quartets_[num_te_types_];
00090 double *shell_quartet_[num_te_types_];
00091
00092
00093 Ref<ShellPairsLibint2> shell_pairs12_;
00094 Ref<ShellPairsLibint2> shell_pairs34_;
00095
00096
00097 struct {
00098 int p12, p34, p13p24;
00099 ShellPairLibint2 *shell_pair12, *shell_pair34;
00100
00101 int *op1, *op2, *op3, *op4;
00103 double A[3], B[3], C[3], D[3];
00104 double AB2, CD2;
00105 int gc1, gc2, gc3, gc4;
00106 int p1, p2, p3, p4;
00107 int am;
00108 } quartet_info_;
00109 typedef Libint_t prim_data;
00110 void geng12_quartet_data_(prim_data *Data, double scale, double alpha_bra, double alpha_ket, double gamma_bra, double gamma_ket,
00111 bool eri_only = false);
00112
00113 Libint_t Libint_;
00114 Ref<Fjt> Fm_Eval_;
00115
00116 class ExpensiveMath {
00117 public:
00118 ExpensiveMath();
00119 double fac[4*LIBINT2_MAX_AM_R12kG12+1];
00120 double bc[4*LIBINT2_MAX_AM_R12kG12+1][4*LIBINT2_MAX_AM_R12kG12+1];
00121 };
00122 ExpensiveMath ExpMath_;
00123
00124 public:
00126 GenG12Libint2(Integral *,
00127 const Ref<GaussianBasisSet>&,
00128 const Ref<GaussianBasisSet>&,
00129 const Ref<GaussianBasisSet>&,
00130 const Ref<GaussianBasisSet>&,
00131 size_t storage,
00132 const ContractedGeminal& gbra,
00133 const ContractedGeminal& gket
00134 );
00135 ~GenG12Libint2();
00136
00137 double *buffer(unsigned int t) const {
00138 return target_ints_buffer_[t];
00139 }
00140
00141 static size_t storage_required(const Ref<GaussianBasisSet>& b1,
00142 const Ref<GaussianBasisSet>& b2 = 0,
00143 const Ref<GaussianBasisSet>& b3 = 0,
00144 const Ref<GaussianBasisSet>& b4 = 0);
00145
00146
00147 void compute_quartet(int*, int*, int*, int*);
00148 };
00149
00150 }
00151
00152 #include <chemistry/qc/libint2/geng12_quartet_data.h>
00153
00154 #endif // header guard
00155 #endif // if LIBINT2_SUPPORT_GENG12
00156
00157
00158
00159
00160