31 #include <util/ref/ref.h>
32 #include <util/misc/scexception.h>
33 #include <chemistry/qc/basis/basis.h>
34 #include <chemistry/qc/basis/intparams.h>
35 #include <chemistry/qc/basis/intdescr.h>
36 #include <chemistry/qc/libint2/shellpairs.h>
37 #include <chemistry/qc/basis/fjt.h>
38 #include <chemistry/qc/libint2/int2e.h>
41 #if LIBINT2_SUPPORT_G12
42 #ifndef _chemistry_qc_libint2_g12_h
43 #define _chemistry_qc_libint2_g12_h
61 class G12Libint2:
public Int2eLibint2 {
64 static const int num_te_types_ = TwoBodyIntDescrG12::num_intsets;
67 typedef IntParamsG12::ContractedGeminal ContractedGeminal;
69 ContractedGeminal geminal_bra_;
71 ContractedGeminal geminal_ket_;
74 double *target_ints_buffer_[num_te_types_];
77 double *cart_ints_[num_te_types_];
78 double *sphharm_ints_;
82 double *prim_ints_[num_te_types_];
83 double *contr_quartets_[num_te_types_];
84 double *shell_quartet_[num_te_types_];
87 Ref<ShellPairsLibint2> shell_pairs12_;
88 Ref<ShellPairsLibint2> shell_pairs34_;
93 ShellPairLibint2 *shell_pair12, *shell_pair34;
95 int *op1, *op2, *op3, *op4;
97 double A[3], B[3], C[3], D[3];
99 int gc1, gc2, gc3, gc4;
103 typedef Libint_t prim_data;
104 void g12_quartet_data_(prim_data *Data,
double scale,
double gamma,
106 bool eri_only =
false);
111 class ExpensiveMath {
114 double fac[4*LIBINT2_MAX_AM_R12kG12+1];
115 double bc[4*LIBINT2_MAX_AM_R12kG12+1][4*LIBINT2_MAX_AM_R12kG12+1];
117 ExpensiveMath ExpMath_;
121 G12Libint2(Integral *,
122 const Ref<GaussianBasisSet>&,
123 const Ref<GaussianBasisSet>&,
124 const Ref<GaussianBasisSet>&,
125 const Ref<GaussianBasisSet>&,
127 const ContractedGeminal& gbra,
128 const ContractedGeminal& gket
132 double *buffer(
unsigned int t)
const {
133 return target_ints_buffer_[t];
136 static size_t storage_required(
const Ref<GaussianBasisSet>& b1,
137 const Ref<GaussianBasisSet>& b2 = 0,
138 const Ref<GaussianBasisSet>& b3 = 0,
139 const Ref<GaussianBasisSet>& b4 = 0);
142 void compute_quartet(
int*,
int*,
int*,
int*);
147 #include <chemistry/qc/libint2/g12_quartet_data.h>
149 #endif // header guard
150 #endif // if LIBINT2_SUPPORT_G12