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