MPQC
2.3.1
src
lib
chemistry
qc
cints
cints/int2e.h
1
//
2
// int2e.h
3
//
4
// Copyright (C) 2001 Edward Valeev
5
//
6
// Author: Edward Valeev <edward.valeev@chemistry.gatech.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
#ifdef __GNUG__
29
#pragma interface
30
#endif
31
32
#ifndef _chemistry_qc_cints_int2e_h
33
#define _chemistry_qc_cints_int2e_h
34
35
#include <limits.h>
36
37
#include <util/ref/ref.h>
38
#include <chemistry/qc/basis/basis.h>
39
#include <chemistry/qc/basis/tbint.h>
40
41
namespace
sc {
42
43
class
Integral;
44
48
class
Int2eCints
:
public
RefCount
{
49
protected
:
50
Integral
*integral_;
51
52
Ref<GaussianBasisSet>
bs1_;
53
Ref<GaussianBasisSet>
bs2_;
54
Ref<GaussianBasisSet>
bs3_;
55
Ref<GaussianBasisSet>
bs4_;
56
57
Ref<MessageGrp>
grp_;
58
59
GaussianShell
*int_shell1_;
60
GaussianShell
*int_shell2_;
61
GaussianShell
*int_shell3_;
62
GaussianShell
*int_shell4_;
63
64
// Whether shells can be permuted
65
int
permute_;
66
// Whether redundant integrals are needed or only unique ones
67
int
redundant_;
68
69
/*--- Storage related stuff ---*/
70
// Available storage
71
size_t
storage_;
72
// Storage currently used
73
size_t
storage_used_;
74
// Checks if too much storage is used
75
void
check_storage_()
const
;
76
// Reports minimum "significant" storage needed to initialize the Int2e base
77
static
size_t
storage_required_(
const
Ref<GaussianBasisSet>
& b1,
78
const
Ref<GaussianBasisSet>
& b2 = 0,
79
const
Ref<GaussianBasisSet>
& b3 = 0,
80
const
Ref<GaussianBasisSet>
& b4 = 0);
81
82
/*--- Scratch ---*/
83
double
*tformbuf_;
// stores one partially transformed contraction quartet
84
85
/*--- helper functions ---*/
86
// cart.->sph.harm. transform functions
87
void
transform_contrquartets_(
double
*,
double
*);
88
// sort from by-contraction-quartet to shell-quartet order
89
void
sort_contrquartets_to_shellquartet_(
double
*,
double
*);
90
// permute perm_ints_ into target_int_buf_
91
void
permute_target_(
double
*,
double
*,
int
,
int
,
int
);
92
void
permute_1234_to_1243_(
double
*,
double
*);
93
void
permute_1234_to_2134_(
double
*,
double
*);
94
void
permute_1234_to_2143_(
double
*,
double
*);
95
void
permute_1234_to_3412_(
double
*,
double
*);
96
void
permute_1234_to_3421_(
double
*,
double
*);
97
void
permute_1234_to_4312_(
double
*,
double
*);
98
void
permute_1234_to_4321_(
double
*,
double
*);
99
// retrieve nonredundant integrals
100
void
get_nonredundant_ints_(
double
*,
double
*,
int
,
int
,
int
);
101
102
public
:
103
Int2eCints
(
Integral
*,
104
const
Ref<GaussianBasisSet>
&,
105
const
Ref<GaussianBasisSet>
&,
106
const
Ref<GaussianBasisSet>
&,
107
const
Ref<GaussianBasisSet>
&,
108
size_t
storage);
109
~
Int2eCints
();
110
112
void
init_storage
(
size_t
);
114
void
done_storage
();
116
size_t
storage_used
()
const
{
return
storage_used_; }
117
119
int
redundant
()
const
{
return
redundant_; }
121
void
set_redundant
(
int
flag) { redundant_ = flag; }
122
124
int
permute
()
const
{
return
permute_; }
126
void
set_permute
(
int
flag) { permute_ = flag; }
127
129
virtual
void
compute_quartet
(
int
*,
int
*,
int
*,
int
*) =0;
131
virtual
double
*
buffer
(
TwoBodyInt::tbint_type
= TwoBodyInt::eri)
const
=0;
132
133
Ref<GaussianBasisSet>
basis()
134
{
135
if
(bs1_==bs2_ && bs1_ == bs3_ && bs1_ == bs4_)
return
bs1_;
136
return
0;
137
}
138
Ref<GaussianBasisSet> basis1() {
return
bs1_; }
139
Ref<GaussianBasisSet> basis2() {
return
bs2_; }
140
Ref<GaussianBasisSet> basis3() {
return
bs3_; }
141
Ref<GaussianBasisSet> basis4() {
return
bs4_; }
142
143
};
144
145
}
146
147
#endif
148
149
// Local Variables:
150
// mode: c++
151
// c-file-style: "CLJ"
152
// End:
sc::Int2eCints::init_storage
void init_storage(size_t)
Sets storage limit and starts storage tracking.
sc::Int2eCints::set_permute
void set_permute(int flag)
Set shell permutation flag.
Definition:
cints/int2e.h:126
sc::Int2eCints::compute_quartet
virtual void compute_quartet(int *, int *, int *, int *)=0
Evaluate the target quartet of integrals.
sc::Ref< GaussianBasisSet >
sc::Int2eCints::set_redundant
void set_redundant(int flag)
Set redundant flag.
Definition:
cints/int2e.h:121
sc::Int2eCints::buffer
virtual double * buffer(TwoBodyInt::tbint_type=TwoBodyInt::eri) const =0
Returns the location of the buffer with target integrals.
sc::Int2eCints
Int2eCints is an interface to various specializations of two-electron integral evaluators implemented...
Definition:
cints/int2e.h:48
sc::Int2eCints::permute
int permute() const
Whether shells can be permuted.
Definition:
cints/int2e.h:124
sc::Int2eCints::done_storage
void done_storage()
Finishes storage tracking.
sc::Integral
The Integral abstract class acts as a factory to provide objects that compute one and two electron in...
Definition:
integral.h:58
sc::Int2eCints::redundant
int redundant() const
Whether redundant integrals are returned.
Definition:
cints/int2e.h:119
sc::RefCount
The base class for all reference counted objects.
Definition:
ref.h:194
sc::TwoBodyInt::tbint_type
tbint_type
Types of two-body integrals that TwoBodyInt understands: eri stands for electron repulsion integral,...
Definition:
tbint.h:111
sc::Int2eCints::storage_used
size_t storage_used() const
Reports how much storage is actually used at a given time.
Definition:
cints/int2e.h:116
sc::GaussianShell
A Gaussian orbital shell.
Definition:
gaussshell.h:47
Generated at Sun Jan 26 2020 23:33:03 for
MPQC
2.3.1 using the documentation package
Doxygen
1.8.16.