ergo
integrals_general.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_GENERAL_HEADER
39 #define INTEGRALS_GENERAL_HEADER
40 
41 #include "integral_info.h"
42 #include "basisinfo.h"
43 
44 #ifndef BASIS_FUNC_POLY_MAX_DEGREE
45 #error The constant BASIS_FUNC_POLY_MAX_DEGREE must be defined.
46 #endif
47 #if BASIS_FUNC_POLY_MAX_DEGREE<6
48 const int POLY_PRODUCT_MAX_DISTRS = 10000;
49 #else
50 const int POLY_PRODUCT_MAX_DISTRS = 20000;
51 #endif
52 
53 typedef struct{
57 
59  const DistributionSpecStruct& primB,
60  DistributionSpecStruct resultList[],
61  int maxCount,
62  ergo_real threshold);
63 
64 int get_product_simple_primitives(const BasisInfoStruct & basisInfoA, int iA,
65  const BasisInfoStruct & basisInfoB, int iB,
66  DistributionSpecStruct resultList[],
67  int maxCount,
68  ergo_real threshold);
69 
71 
72 int multiply_polynomials(ergo_real result[],
73  polydeg1struct* polydeg1,
74  int dim,
75  ergo_real a[]);
76 
78 
80 
81 int get_basis_func_extent_list(const BasisInfoStruct & basisInfo,
82  ergo_real* basisFuncExtentList,
83  ergo_real maxAbsValue);
84 
85 #endif
template_blas_pow
Treal template_blas_pow(Treal x, Treal y)
multiply_polynomials
int multiply_polynomials(ergo_real result[], polydeg1struct *polydeg1, int dim, ergo_real a[])
Definition: integrals_general.cc:60
BasisFuncStruct::noOfSimplePrimitives
int noOfSimplePrimitives
Definition: basisinfo.h:93
template_blas_sqrt
Treal template_blas_sqrt(Treal x)
BasisInfoStruct::noOfBasisFuncs
int noOfBasisFuncs
Definition: basisinfo.h:120
pi.h
Constants for the number pi and some related numbers like sqrt(pi).
DistributionSpecStruct
Definition: basisinfo.h:50
memorymanag.h
Memory allocation/deallocation routines.
LOG_CAT_ERROR
#define LOG_CAT_ERROR
Definition: output.h:47
DistributionSpecStruct::centerCoords
ergo_real centerCoords[3]
x0, y0, z0
Definition: basisinfo.h:54
ergo_real
double ergo_real
Definition: realtype.h:69
boysfunction.h
Code for Boys function evaluation.
template_blas_exp
Treal template_blas_exp(Treal x)
integrals_general.h
General functionality related to computation of integrals involving Gaussian basis functions.
BasisInfoStruct
Definition: basisinfo.h:112
get_product_simple_primitives
int get_product_simple_primitives(const BasisInfoStruct &basisInfoA, int iA, const BasisInfoStruct &basisInfoB, int iB, DistributionSpecStruct resultList[], int maxCount, ergo_real threshold)
Definition: integrals_general.cc:268
template_blas_fabs
Treal template_blas_fabs(Treal x)
K_MAX_DIM
#define K_MAX_DIM
Definition: integrals_general.cc:56
get_largest_simple_integral
ergo_real get_largest_simple_integral(const BasisInfoStruct &basisInfo)
Computes the largest integral of any primitive in the basis set, when any x y z factors are ignored.
Definition: integrals_general.cc:343
pi
#define pi
Definition: pi.h:57
BasisInfoStruct::simplePrimitiveList
DistributionSpecStruct * simplePrimitiveList
Definition: basisinfo.h:123
BasisFuncStruct::simplePrimitiveIndex
int simplePrimitiveIndex
Definition: basisinfo.h:94
polydeg1struct::a1
ergo_real a1
Definition: integrals_general.h:55
get_product_simple_primitives
int get_product_simple_primitives(const BasisInfoStruct &basisInfoA, int iA, const BasisInfoStruct &basisInfoB, int iB, DistributionSpecStruct resultList[], int maxCount, ergo_real threshold)
Definition: integrals_general.cc:268
POLY_PRODUCT_MAX_DISTRS
const int POLY_PRODUCT_MAX_DISTRS
Definition: integrals_general.h:48
get_product_simple_prims
int get_product_simple_prims(const DistributionSpecStruct &primA_in, const DistributionSpecStruct &primB_in, DistributionSpecStruct resultList[], int maxCount, ergo_real threshold)
Definition: integrals_general.cc:91
integral_info.h
Defines IntegralInfo object, providing the coefficients needed for integral evaluation.
utilities.h
Basic OS access utilities.
A
#define A
template_blas_log
Treal template_blas_log(Treal x)
BasisFuncStruct
Definition: basisinfo.h:85
basisinfo.h
Code for setting up basis functions starting from shells.
BasisInfoStruct::basisFuncList
BasisFuncStruct * basisFuncList
Definition: basisinfo.h:121
get_basis_func_extent_list
int get_basis_func_extent_list(const BasisInfoStruct &basisInfo, ergo_real *basisFuncExtentList, ergo_real maxAbsValue)
Computes an "extent" for each basis function in the basis set.
Definition: integrals_general.cc:402
LOG_AREA_INTEGRALS
#define LOG_AREA_INTEGRALS
Definition: output.h:60
multiply_polynomials
int multiply_polynomials(ergo_real result[], polydeg1struct *polydeg1, int dim, ergo_real a[])
Definition: integrals_general.cc:60
get_product_simple_prims
int get_product_simple_prims(const DistributionSpecStruct &primA, const DistributionSpecStruct &primB, DistributionSpecStruct resultList[], int maxCount, ergo_real threshold)
Definition: integrals_general.cc:91
get_max_basis_func_abs_value
ergo_real get_max_basis_func_abs_value(const BasisInfoStruct &basisInfo)
Computes an estimate for the largest absolute value that any basis function takes.
Definition: integrals_general.cc:378
DistributionSpecStruct::monomialInts
char monomialInts[4]
nx, ny, nz
Definition: basisinfo.h:55
get_largest_simple_integral
ergo_real get_largest_simple_integral(const BasisInfoStruct &basisInfo)
Computes the largest integral of any primitive in the basis set, when any x y z factors are ignored.
Definition: integrals_general.cc:343
compute_integral_of_simple_prim
ergo_real compute_integral_of_simple_prim(const DistributionSpecStruct &distr)
Definition: integrals_general.cc:318
polydeg1struct::a0
ergo_real a0
Definition: integrals_general.h:54
DistributionSpecStruct::coeff
ergo_real coeff
Coefficient A.
Definition: basisinfo.h:51
compute_integral_of_simple_prim
ergo_real compute_integral_of_simple_prim(const DistributionSpecStruct &distr)
Definition: integrals_general.cc:318
polydeg1struct
Definition: integrals_general.h:53
get_basis_func_extent_list
int get_basis_func_extent_list(const BasisInfoStruct &basisInfo, ergo_real *basisFuncExtentList, ergo_real maxAbsValue)
Computes an "extent" for each basis function in the basis set.
Definition: integrals_general.cc:402
do_output
void do_output(int logCategory, int logArea, const char *format,...)
Definition: output.cc:53
get_max_basis_func_abs_value
ergo_real get_max_basis_func_abs_value(const BasisInfoStruct &basisInfo)
Computes an estimate for the largest absolute value that any basis function takes.
Definition: integrals_general.cc:378
DistributionSpecStruct::exponent
ergo_real exponent
exponent alfa
Definition: basisinfo.h:52
output.h
Functionality for writing output messages to a text file.