ergo
Main Page
Namespaces
Classes
Files
File List
File Members
integrals_2el_utils.h
Go to the documentation of this file.
1
/* Ergo, version 3.2, a program for linear scaling electronic structure
2
* calculations.
3
* Copyright (C) 2012 Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek.
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*
18
* Primary academic reference:
19
* KohnâSham Density Functional Theory Electronic Structure Calculations
20
* with Linearly Scaling Computational Time and Memory Usage,
21
* Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek,
22
* J. Chem. Theory Comput. 7, 340 (2011),
23
* <http://dx.doi.org/10.1021/ct100611z>
24
*
25
* For further information about Ergo, see <http://www.ergoscf.org>.
26
*/
27
28
#ifndef INTEGRALS_2EL_UTILS_HEADER
29
#define INTEGRALS_2EL_UTILS_HEADER
30
31
32
#include "
organize_distrs.h
"
33
#include "
box_system.h
"
34
35
36
struct
distr_list_description_struct
{
37
distr_org_struct
org
;
38
ergo_real
totCharge
;
39
ergo_real
multipolePoint
[3];
40
multipole_struct_large
multipole
;
41
ergo_real
maxMomentVectorNormForDistrsList
[
MAX_MULTIPOLE_DEGREE_BASIC
+1];
42
distr_list_description_struct
();
43
};
44
45
46
#define MAX_NO_OF_BRANCHES 10
47
48
49
typedef
struct
50
{
51
int
basisFuncGroupIndex
;
52
ergo_real
max_CS_factor
;
53
ergo_real
maxMomentVectorNormList[
MAX_MULTIPOLE_DEGREE_BASIC
+1];
54
int
maxMultipoleDegree
;
55
}
basis_func_group_info_for_box
;
56
57
58
struct
box_struct
{
59
box_struct_basic
basicBox
;
60
distr_list_description_struct
distrListForK
;
61
distr_list_description_struct
branchList
[
MAX_NO_OF_BRANCHES
];
62
ergo_real
multipolePoint
[3];
63
int
branchIndexList
[
MAX_NO_OF_BRANCHES
];
64
int
branchCountList
[
MAX_NO_OF_BRANCHES
];
65
int
noOfBasisFuncs
;
66
int
noOfRelevantBasisFuncGroups
;
67
basis_func_group_info_for_box
*
basisFuncGroupInfoList
;
68
ergo_real
largestCSfactor
;
// Largest Cauchy-Schwartz factor in box
69
ergo_real
multipoleEuclideanNormList
[
MAX_MULTIPOLE_DEGREE_BASIC
+1];
70
box_struct
();
71
};
72
73
74
typedef
struct
75
{
76
ergo_real
*
summedIntegralList
;
77
ergo_real
*
primitiveIntegralList
;
78
ergo_real
*
primitiveIntegralList_work
;
79
ergo_real
*
partial_dmat_1
;
80
ergo_real
*
partial_dmat_2
;
// used in non-symmetric case
81
ergo_real
*
partial_K_1
;
82
ergo_real
*
partial_K_2
;
// used in non-symmetric case
83
}
JK_contribs_buffer_struct
;
84
85
86
87
88
ergo_real
get_max_abs_vector_element
(
int
n,
const
ergo_real
* vector);
89
90
void
91
allocate_buffers_needed_by_integral_code
(
const
IntegralInfo
* integralInfo,
92
int
maxNoOfMonomials,
93
int
basisFuncListCount_max,
94
JK_contribs_buffer_struct
* bufferStruct);
95
96
void
97
free_buffers_needed_by_integral_code
(
JK_contribs_buffer_struct
* bufferStruct);
98
99
int
100
get_related_integrals_h
(
const
IntegralInfo
* b,
101
const
JK::ExchWeights
& CAM_params,
102
int
n1max,
int
noOfMonomials_1,
103
int
n2max,
int
noOfMonomials_2,
104
ergo_real
dx0,
105
ergo_real
dx1,
106
ergo_real
dx2,
107
ergo_real
alpha1,
108
ergo_real
alpha2,
109
ergo_real
alpha0,
110
ergo_real
* primitiveIntegralList,
111
ergo_real
* primitiveIntegralList_work,
112
ergo_real
resultPreFactor);
113
114
void
115
compute_extent_for_list_of_distributions
(
int
n,
116
DistributionSpecStructLabeled
* distrList,
117
ergo_real
threshold,
118
ergo_real
maxLimitingFactor,
119
ergo_real
maxabsDmatelement);
120
121
int
122
get_list_of_labeled_distrs_maxLimitingFactor
(
const
BasisInfoStruct
& basisInfo,
123
const
IntegralInfo
* integralInfo,
124
ergo_real
threshold,
125
ergo_real
* resultMaxLimitingFactor,
126
ergo_real
maxDensityMatrixElement);
127
128
int
129
get_list_of_labeled_distrs
(
const
BasisInfoStruct
& basisInfo,
130
const
IntegralInfo
* integralInfo,
131
ergo_real
threshold,
132
DistributionSpecStructLabeled
* resultList,
133
int
maxCountDistrs,
134
ergo_real
maxLimitingFactor,
135
const
ergo_real
* dens,
136
ergo_real
maxDensityMatrixElement);
137
138
int
139
create_box_system_and_reorder_distrs
(
int
distrCount,
140
DistributionSpecStructLabeled
* distrList,
141
ergo_real
toplevelBoxSize,
142
BoxSystem
& boxSystem);
143
144
145
146
#endif
source
integrals
integrals_2el_utils.h
Generated on Tue Nov 27 2012 21:33:20 for ergo by
1.8.1.2