ergo
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 
43 };
44 
45 
46 #define MAX_NO_OF_BRANCHES 10
47 
48 
49 typedef struct
50 {
53  ergo_real maxMomentVectorNormList[MAX_MULTIPOLE_DEGREE_BASIC+1];
56 
57 
58 struct box_struct {
68  ergo_real largestCSfactor; // Largest Cauchy-Schwartz factor in box
70  box_struct();
71 };
72 
73 
74 typedef struct
75 {
80  ergo_real* partial_dmat_2; // used in non-symmetric case
82  ergo_real* partial_K_2; // used in non-symmetric case
84 
85 
86 
87 
88 ergo_real get_max_abs_vector_element(int n, const ergo_real* vector);
89 
90 void
92  int maxNoOfMonomials,
93  int basisFuncListCount_max,
94  JK_contribs_buffer_struct* bufferStruct);
95 
96 void
98 
99 int
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
117  ergo_real threshold,
118  ergo_real maxLimitingFactor,
119  ergo_real maxabsDmatelement);
120 
121 int
123  const IntegralInfo* integralInfo,
124  ergo_real threshold,
125  ergo_real* resultMaxLimitingFactor,
126  ergo_real maxDensityMatrixElement);
127 
128 int
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
141  ergo_real toplevelBoxSize,
142  BoxSystem & boxSystem);
143 
144 
145 
146 #endif