MPQC
3.0.0-alpha
grt.h
1
//
2
// grt.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
#ifndef _chemistry_qc_libint2_grt_h
29
#define _chemistry_qc_libint2_grt_h
30
31
#include <limits.h>
32
33
#include <util/ref/ref.h>
34
#include <chemistry/qc/basis/basis.h>
35
#include <chemistry/qc/libint2/shellpairs.h>
36
#include <chemistry/qc/basis/fjt.h>
37
#include <chemistry/qc/libint2/int2e.h>
38
#include <libint2.h>
39
40
namespace
sc
{
41
42
class
Integral;
43
45
class
GRTLibint2
:
public
Int2eLibint2
{
46
private
:
47
// Number of integral types produced
48
// static const int num_te_types_ = 4;
49
#define num_te_types_ 4
50
51
// Storage for target integrals
52
double
*target_ints_buffer_[num_te_types_];
53
54
/*--- Intermediate scratch arrays (may be used in new[] and delete[]) ---*/
55
double
*cart_ints_[num_te_types_];
// cartesian integrals, in by-contraction-quartet order
56
double
*sphharm_ints_;
// transformed integrals, in by-contraction-quartet order
57
double
*perm_ints_;
// redundant target integrals in shell quartet order, shells permuted
58
59
/*--- Pointers to scratch arrays (never used in new[] and delete[]) ---*/
60
double
*prim_ints_[num_te_types_];
// this points to the appropriate location for raw integrals
61
double
*contr_quartets_[num_te_types_];
62
double
*shell_quartet_[num_te_types_];
63
64
/*--- Precomputed data ---*/
65
Ref<ShellPairsLibint2>
shell_pairs12_;
66
Ref<ShellPairsLibint2>
shell_pairs34_;
67
68
/*--- Internally used "interfaces" ---*/
69
struct
{
70
int
p12, p34, p13p24;
// flags indicating if functions were permuted
71
ShellPairLibint2
*shell_pair12, *shell_pair34;
// Shell pairs corresponding to the original
72
// (before permutation) order of shell
73
int
*op1, *op2, *op3, *op4;
// pointers to the primitive indices in the original order
75
double
A[3], B[3], C[3], D[3];
76
double
AB2, CD2;
77
int
gc1, gc2, gc3, gc4;
78
int
p1, p2, p3, p4;
79
int
am;
80
} quartet_info_;
81
typedef
Libint_t prim_data;
82
void
grt_quartet_data_(prim_data *Data,
double
scale);
83
/*--- Compute engines ---*/
84
Libr12_t Libr12_;
85
Ref<FJT>
Fm_Eval_;
86
87
public
:
88
GRTLibint2
(
Integral
*,
89
const
Ref<GaussianBasisSet>
&,
90
const
Ref<GaussianBasisSet>
&,
91
const
Ref<GaussianBasisSet>
&,
92
const
Ref<GaussianBasisSet>
&,
93
size_t
storage);
94
~
GRTLibint2
();
95
96
double
*buffer(
TwoBodyOper::type
te_type)
const
{
97
if
(te_type ==
TwoBodyOper::eri
||
98
te_type ==
TwoBodyOper::r12
||
99
te_type ==
TwoBodyOper::r12t1
||
100
te_type ==
TwoBodyOper::r12t2
)
101
return
target_ints_buffer_[te_type];
102
else
103
return
0;
104
}
105
106
static
size_t
storage_required(
const
Ref<GaussianBasisSet>
& b1,
107
const
Ref<GaussianBasisSet>
& b2 = 0,
108
const
Ref<GaussianBasisSet>
& b3 = 0,
109
const
Ref<GaussianBasisSet>
& b4 = 0);
110
111
// evaluate integrals
112
void
compute_quartet
(
int
*,
int
*,
int
*,
int
*);
113
};
114
115
/* Libr12StaticInterface is an initializer class for the static part
116
of libr12's interface (one per executable) */
117
class
Libr12StaticInterface
{
118
bool
ready;
119
120
public
:
121
Libr12StaticInterface
() { init_libr12_base(); ready =
true
; }
122
~
Libr12StaticInterface
() { ready =
false
; }
123
};
124
125
}
126
127
#include <chemistry/qc/libint2/grt_quartet_data.h>
128
129
#endif
130
131
// Local Variables:
132
// mode: c++
133
// c-file-style: "CLJ"
134
// End:
sc::Ref
A template class that maintains references counts.
Definition:
ref.h:361
sc::GRTLibint2
GRTLibint2 is a specialization of Int2eLibint2 that computes two-electron integrals specific to linea...
Definition:
grt.h:45
sc::ShellPairLibint2
ShellPairLibint2 is an interface to PrimPairsLibint2.
Definition:
shellpairs.h:40
sc::Integral
The Integral abstract class acts as a factory to provide objects that compute one and two electron in...
Definition:
integral.h:111
sc::TwoBodyOper::eri
two-body Coulomb
Definition:
operator.h:319
sc::GRTLibint2::compute_quartet
void compute_quartet(int *, int *, int *, int *)
Evaluate the target quartet of integrals.
sc::TwoBodyOper::r12t2
Definition:
operator.h:322
sc::TwoBodyOper::type
type
types of known two-body operators
Definition:
operator.h:318
sc::Int2eLibint2
Int2eLibint2 is an interface to various specializations of two-electron integral evaluators implement...
Definition:
int2e.h:46
sc
Contains all MPQC code up to version 3.
Definition:
mpqcin.h:14
sc::TwoBodyOper::r12
interelectronic distance
Definition:
operator.h:320
sc::TwoBodyOper::r12t1
Definition:
operator.h:321
sc::Libr12StaticInterface
Definition:
grt.h:117
Generated at Sun Jan 26 2020 23:23:58 for
MPQC
3.0.0-alpha using the documentation package
Doxygen
1.8.16.