MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
g12dkh.h
1//
2// g12dkh.h
3//
4// Copyright (C) 2001 Edward Valeev
5//
6// Author: Edward Valeev <evaleev@vt.edu>
7// Maintainer: EV
8//
9// This file is part of the SC Toolkit.
10//
11// The SC Toolkit is free software; you can redistribute it and/or modify
12// it under the terms of the GNU Library General Public License as published by
13// the Free Software Foundation; either version 2, or (at your option)
14// any later version.
15//
16// The SC Toolkit is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU Library General Public License for more details.
20//
21// You should have received a copy of the GNU Library General Public License
22// along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24//
25// The U.S. Government is granted a limited license as per AL 91-7.
26//
27
28#include <limits.h>
29#include <stdexcept>
30
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>
39#include <libint2.h>
40
41#if LIBINT2_SUPPORT_G12DKH
42#ifndef _chemistry_qc_libint2_g12dkh_h
43#define _chemistry_qc_libint2_g12dkh_h
44
45namespace sc {
46
47class Integral;
48
54class G12DKHLibint2: public Int2eLibint2 {
55 private:
57 static const int num_te_types_ = TwoBodyIntDescrG12DKH::num_intsets;
58
59 typedef IntParamsG12::PrimitiveGeminal PrimitiveGeminal;
60 typedef IntParamsG12::ContractedGeminal ContractedGeminal;
61 // the geminal in the bra
62 ContractedGeminal geminal_bra_;
63 // the geminal in the ket -- must be equal to bra at the moment
64 ContractedGeminal geminal_ket_;
65
66 // Storage for target integrals
67 double *target_ints_buffer_[num_te_types_];
68
69 /*--- Intermediate scratch arrays (may be used in new[] and delete[]) ---*/
70 double *cart_ints_[num_te_types_]; // cartesian integrals, in by-contraction-quartet order
71 double *sphharm_ints_; // transformed integrals, in by-contraction-quartet order
72 double *perm_ints_; // redundant target integrals in shell quartet order, shells permuted
73
74 /*--- Pointers to scratch arrays (never used in new[] and delete[]) ---*/
75 double *prim_ints_[num_te_types_]; // this points to the appropriate location for raw integrals
76 double *contr_quartets_[num_te_types_];
77 double *shell_quartet_[num_te_types_];
78
79 /*--- Precomputed data ---*/
80 Ref<ShellPairsLibint2> shell_pairs12_;
81 Ref<ShellPairsLibint2> shell_pairs34_;
82
83 /*--- Internally used "interfaces" ---*/
84 struct {
85 int p12, p34, p13p24; // flags indicating if functions were permuted
86 ShellPairLibint2 *shell_pair12, *shell_pair34; // Shell pairs corresponding to the original
87 // (before permutation) order of shell
88 int *op1, *op2, *op3, *op4; // pointers to the primitive indices in the original order
90 double A[3], B[3], C[3], D[3];
91 double AB2, CD2;
92 int gc1, gc2, gc3, gc4;
93 int p1, p2, p3, p4;
94 int am;
95 } quartet_info_;
96 typedef Libint_t prim_data;
97 void g12dkh_quartet_data_(prim_data *Data, double scale, double gamma_bra, double gamma_ket);
98 /*--- Compute engines ---*/
99 Libint_t Libint_;
100 Ref<Fjt> Fm_Eval_;
101
102 class ExpensiveMath {
103 public:
104 ExpensiveMath();
105 double fac[4*LIBINT2_MAX_AM_G12DKH+1];
106 double bc[4*LIBINT2_MAX_AM_G12DKH+1][4*LIBINT2_MAX_AM_G12DKH+1];
107 };
108 ExpensiveMath ExpMath_;
109
110 public:
112 G12DKHLibint2(Integral *,
113 const Ref<GaussianBasisSet>&,
114 const Ref<GaussianBasisSet>&,
115 const Ref<GaussianBasisSet>&,
116 const Ref<GaussianBasisSet>&,
117 size_t storage,
118 const ContractedGeminal& gbra
119 );
120 ~G12DKHLibint2();
121
122 double *buffer(unsigned int t) const {
123 return target_ints_buffer_[t];
124 }
125
126 static size_t storage_required(const Ref<GaussianBasisSet>& b1,
127 const Ref<GaussianBasisSet>& b2 = 0,
128 const Ref<GaussianBasisSet>& b3 = 0,
129 const Ref<GaussianBasisSet>& b4 = 0);
130
131 // evaluate integrals
132 void compute_quartet(int*, int*, int*, int*);
133};
134
135}
136
137#include <chemistry/qc/libint2/g12dkh_quartet_data.h>
138
139#endif // header guard
140#endif // if LIBINT2_SUPPORT_G12DKH
141
142// Local Variables:
143// mode: c++
144// c-file-style: "CLJ"
145// End:
Contains all MPQC code up to version 3.
Definition mpqcin.h:14

Generated at Wed Sep 25 2024 02:45:29 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.