ergo
integrals_2el_boxed.h
Go to the documentation of this file.
1 /* Ergo, version 3.8, a program for linear scaling electronic structure
2  * calculations.
3  * Copyright (C) 2019 Elias Rudberg, Emanuel H. Rubensson, Pawel Salek,
4  * and Anastasia Kruchinina.
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * Primary academic reference:
20  * Ergo: An open-source program for linear-scaling electronic structure
21  * calculations,
22  * Elias Rudberg, Emanuel H. Rubensson, Pawel Salek, and Anastasia
23  * Kruchinina,
24  * SoftwareX 7, 107 (2018),
25  * <http://dx.doi.org/10.1016/j.softx.2018.03.005>
26  *
27  * For further information about Ergo, see <http://www.ergoscf.org>.
28  */
29 
38 #ifndef INTEGRALS_2EL_BOXED_HEADER
39 #define INTEGRALS_2EL_BOXED_HEADER
40 
41 #include "integral_info.h"
42 #include "basisinfo.h"
43 #include "integrals_2el.h"
44 #include "basis_func_pair_list.h"
45 #include "csr_matrix.h"
46 
47 int
48 compute_JK_single_box(const BasisInfoStruct & basisInfo,
49  const IntegralInfo & integralInfo,
50  ergo_real* J,
51  ergo_real* K,
52  const ergo_real* dens,
53  ergo_real threshold);
54 
55 #endif
basis_func_pair_struct::index_2
int index_2
Definition: organize_distrs.h:84
template_blas_sqrt
Treal template_blas_sqrt(Treal x)
HUGE_INTEGER_NUMBER
static const int HUGE_INTEGER_NUMBER
Definition: integrals_2el_boxed.cc:47
JK_contribs_buffer_struct::summedIntegralList
ergo_real * summedIntegralList
Definition: integrals_2el_utils.h:86
BasisInfoStruct::noOfBasisFuncs
int noOfBasisFuncs
Definition: basisinfo.h:120
pi.h
Constants for the number pi and some related numbers like sqrt(pi).
get_list_of_labeled_distrs_maxLimitingFactor
int get_list_of_labeled_distrs_maxLimitingFactor(const BasisInfoStruct &basisInfo, const IntegralInfo &integralInfo, ergo_real threshold, ergo_real *resultMaxLimitingFactor, ergo_real maxDensityMatrixElement)
Definition: integrals_2el_utils.cc:269
csr_matrix.h
Compressed sparse row (CSR) matrix functionality.
minimal_distr_struct::monomialIndex
int monomialIndex
Definition: organize_distrs.h:67
distr_org_struct::minimalDistrList
std::vector< minimal_distr_struct > minimalDistrList
Definition: organize_distrs.h:122
LOG_CAT_ERROR
#define LOG_CAT_ERROR
Definition: output.h:47
abcd_struct::c
int c
Definition: integrals_2el_boxed.cc:53
ergo_real
double ergo_real
Definition: realtype.h:69
distr_org_struct::batchList
std::vector< batch_struct > batchList
Definition: organize_distrs.h:125
distr_group_struct
Definition: organize_distrs.h:51
abcd_struct::idx1
int idx1
Definition: integrals_2el_boxed.cc:56
distr_group_struct::maxAbsDmatElementGroup
ergo_real maxAbsDmatElementGroup
Definition: organize_distrs.h:60
abcd_struct::d
int d
Definition: integrals_2el_boxed.cc:53
BasisInfoStruct
Definition: basisinfo.h:112
abcd_struct::a
int a
Definition: integrals_2el_boxed.cc:53
batch_struct::basisFuncPairListIndex
int basisFuncPairListIndex
Definition: organize_distrs.h:107
distr_group_struct::centerCoords
ergo_real centerCoords[3]
Definition: organize_distrs.h:55
template_blas_fabs
Treal template_blas_fabs(Treal x)
minimal_distr_struct
Definition: organize_distrs.h:65
distr_org_struct::groupList
std::vector< distr_group_struct > groupList
Definition: organize_distrs.h:123
compute_extent_for_list_of_distributions
void compute_extent_for_list_of_distributions(int n, DistributionSpecStructLabeled *distrList, ergo_real threshold, ergo_real maxLimitingFactor, ergo_real maxabsDmatelement)
Definition: integrals_2el_utils.cc:252
distr_org_struct::clusterList
std::vector< cluster_struct > clusterList
Definition: organize_distrs.h:124
cluster_struct
Definition: organize_distrs.h:72
allocate_buffers_needed_by_integral_code
void allocate_buffers_needed_by_integral_code(const IntegralInfo &integralInfo, int maxNoOfMonomials, int basisFuncListCount_max, JK_contribs_buffer_struct *bufferStruct)
Definition: integrals_2el_utils.cc:126
IntegralInfo::monomial_info
monomial_info_struct monomial_info
Definition: integral_info.h:105
point_3d_struct::id
int id
Definition: integrals_2el_boxed.cc:364
monomial_info_struct::no_of_monomials_list
int no_of_monomials_list[MONOMIAL_N_MAX+1]
Definition: monomial_info.h:61
distr_group_struct::distrCount
int distrCount
Definition: organize_distrs.h:53
set_abcd_list_item_macro
#define set_abcd_list_item_macro(i, A, B, C, D, v, i1, i2)
Definition: integrals_2el_boxed.cc:61
distr_group_struct::maxLimitingFactorGroup
ergo_real maxLimitingFactorGroup
Definition: organize_distrs.h:59
IntegralInfo
Contains coefficients needed for quick integral evaluation.
Definition: integral_info.h:94
cluster_struct::noOfGroups
int noOfGroups
Definition: organize_distrs.h:76
abcd_struct::b
int b
Definition: integrals_2el_boxed.cc:53
integrals_2el_boxed.h
Code for 2-electron integrals, computation of Coulomb (J) and HF exchange (K) matrices using a single...
integrals_2el_utils.h
Code for various utilities used by 2-electron integral computation (i.e. computation of J and K matri...
get_max_abs_vector_element
ergo_real get_max_abs_vector_element(int n, const ergo_real *vector)
Definition: integrals_2el_utils.cc:103
Util::TimeMeter::print
void print(int area, const char *routine)
Definition: utilities.h:111
integral_info.h
Defines IntegralInfo object, providing the coefficients needed for integral evaluation.
distr_list_description_struct::org
distr_org_struct org
Definition: organize_distrs_mm.h:64
get_list_of_labeled_distrs
int get_list_of_labeled_distrs(const BasisInfoStruct &basisInfo, const IntegralInfo &integralInfo, ergo_real threshold, DistributionSpecStructLabeled *resultList, int maxCountDistrs, ergo_real maxLimitingFactor, const ergo_real *dens, ergo_real maxDensityMatrixElement)
Definition: integrals_2el_utils.cc:369
utilities.h
Basic OS access utilities.
free_buffers_needed_by_integral_code
void free_buffers_needed_by_integral_code(JK_contribs_buffer_struct *bufferStruct)
Definition: integrals_2el_utils.cc:152
NUMBER_OF_PARTS
#define NUMBER_OF_PARTS
LOG_CAT_INFO
#define LOG_CAT_INFO
Definition: output.h:49
abcd_struct::poly_ab_index
int poly_ab_index
Definition: integrals_2el_boxed.cc:54
batch_struct
Definition: organize_distrs.h:103
minimal_distr_struct::coeff
ergo_real coeff
Definition: organize_distrs.h:68
basis_func_pair_struct
Definition: organize_distrs.h:82
abcd_struct::poly_cd_index
int poly_cd_index
Definition: integrals_2el_boxed.cc:55
basisinfo.h
Code for setting up basis functions starting from shells.
get_JK_contribs_from_2_interacting_boxes
static int get_JK_contribs_from_2_interacting_boxes(const BasisInfoStruct &basisInfo, const IntegralInfo &integralInfo, int maxNoOfMonomials, ergo_real *J, ergo_real *K, const ergo_real *dens, const minimal_distr_struct *minimalDistrList_1, int noOfGroups_1, const distr_group_struct *groupList_1, const minimal_distr_struct *minimalDistrList_2, int noOfGroups_2, const distr_group_struct *groupList_2, const cluster_struct *clusterList_1, int nClusters_1, const cluster_struct *clusterList_2, int nClusters_2, const batch_struct *batchList_1, int nBatchs_1, const batch_struct *batchList_2, int nBatchs_2, const basis_func_pair_struct *basisFuncPairList_1, const basis_func_pair_struct *basisFuncPairList_2, int interactionWithSelf, ergo_real threshold, JK_contribs_buffer_struct *bufferStructPtr)
Definition: integrals_2el_boxed.cc:67
basis_func_pair_struct::index_1
int index_1
Definition: organize_distrs.h:83
integrals_2el.h
Parameters related to integral evaluation.
abcd_struct::densValue
ergo_real densValue
Definition: integrals_2el_boxed.cc:58
LOG_AREA_INTEGRALS
#define LOG_AREA_INTEGRALS
Definition: output.h:60
JK::ExchWeights
Definition: integral_info.h:148
JK_contribs_buffer_struct::primitiveIntegralList_work
ergo_real * primitiveIntegralList_work
Definition: integrals_2el_utils.h:88
minimal_distr_struct::basisFuncPairIndex
int basisFuncPairIndex
Definition: organize_distrs.h:66
abcd_struct
Definition: integrals_2el_boxed.cc:52
distr_list_description_struct
Definition: organize_distrs_mm.h:63
JK_contribs_buffer_struct
Definition: integrals_2el_utils.h:85
abcd_struct::idx2
int idx2
Definition: integrals_2el_boxed.cc:57
distr_org_struct::basisFuncPairList
std::vector< basis_func_pair_struct > basisFuncPairList
Definition: organize_distrs.h:126
basis_func_pair_list.h
Functions for setting up lists of non-negligible basis function pairs, for 2-electron integrals.
compute_JK_single_box
int compute_JK_single_box(const BasisInfoStruct &basisInfo, const IntegralInfo &integralInfo, ergo_real *J, ergo_real *K, const ergo_real *dens, ergo_real threshold)
Definition: integrals_2el_boxed.cc:373
compute_JK_single_box
int compute_JK_single_box(const BasisInfoStruct &basisInfo, const IntegralInfo &integralInfo, ergo_real *J, ergo_real *K, const ergo_real *dens, ergo_real threshold)
Definition: integrals_2el_boxed.cc:373
organize_distrs.h
Code for organizing a given set of primitive Gaussian distributions (typically coming from basis func...
organize_distributions
int organize_distributions(const IntegralInfo &integralInfo, DistributionSpecStructLabeled *distrList_in, int distrCount, distr_org_struct *result, const ergo_real *boxCenterCoords, ergo_real boxWidth)
Definition: organize_distrs.cc:180
cluster_struct::nmax
int nmax
Definition: organize_distrs.h:73
distr_group_struct::startIndex
int startIndex
Definition: organize_distrs.h:52
get_related_integrals_h
int get_related_integrals_h(const IntegralInfo &integralInfo, const JK::ExchWeights &CAM_params, int n1max, int noOfMonomials_1, int n2max, int noOfMonomials_2, ergo_real dx0, ergo_real dx1, ergo_real dx2, ergo_real alpha1, ergo_real alpha2, ergo_real alpha0, ergo_real *primitiveIntegralList, ergo_real *primitiveIntegralList_work, ergo_real resultPreFactor)
Definition: integrals_2el_utils.cc:176
batch_struct::clusterStartIndex
int clusterStartIndex
Definition: organize_distrs.h:104
point_3d_struct
Definition: integrals_2el_boxed.cc:363
do_output
void do_output(int logCategory, int logArea, const char *format,...)
Definition: output.cc:53
batch_struct::noOfClusters
int noOfClusters
Definition: organize_distrs.h:105
distr_group_struct::exponent
ergo_real exponent
Definition: organize_distrs.h:56
JK_contribs_buffer_struct::primitiveIntegralList
ergo_real * primitiveIntegralList
Definition: integrals_2el_utils.h:87
batch_struct::noOfBasisFuncPairs
int noOfBasisFuncPairs
Definition: organize_distrs.h:106
Util::TimeMeter
Time-measuring class.
Definition: utilities.h:80
pitopow52
#define pitopow52
Definition: pi.h:59
cluster_struct::groupStartIndex
int groupStartIndex
Definition: organize_distrs.h:75