ergo
integral_info.h
Go to the documentation of this file.
1/* Ergo, version 3.8.2, a program for linear scaling electronic structure
2 * calculations.
3 * Copyright (C) 2023 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 BASISINFO_BASIC_HEADER
39#define BASISINFO_BASIC_HEADER
40
41
42#include "realtype.h"
43#include "monomial_info.h"
45#include "boysfunction.h"
46#include "multipole_prep.h"
47#include "mm_limit_table.h"
48
49#ifndef BASIS_FUNC_POLY_MAX_DEGREE
50#error The constant BASIS_FUNC_POLY_MAX_DEGREE must be defined.
51#endif
52#if BASIS_FUNC_POLY_MAX_DEGREE<6
53#define MAX_NO_OF_TERMS_IN_BASIS_FUNC_POLY 12
54#define MAX_NO_OF_POLY_12_TERMS 180
55#define MAX_NO_OF_BASIS_FUNC_POLYS 50
56#else
57#define MAX_NO_OF_TERMS_IN_BASIS_FUNC_POLY 16
58#define MAX_NO_OF_POLY_12_TERMS 360
59#define MAX_NO_OF_BASIS_FUNC_POLYS 100
60#endif
61
62typedef struct
63{
65 char monomialInts[4]; /* nx, ny, nz */
68
69typedef struct
70{
75
76typedef struct
77{
78 int id_1;
79 int id_2;
82
83typedef struct
84{
88
94{
95 private:
101 IntegralInfo(); // This is to make it forbidden to create it without argument.
102 public:
106 void init();
107 ergo_real BoysFunction(int n, ergo_real x) const;
108 ergo_real BoysFunction_expensive(int n, ergo_real x, int noOfIntegrationIntervals) const;
110 const MMLimitTable & GetMMLimitTable() const { return mmLimitTable; }
112 int n2max,
113 ergo_real a,
114 ergo_real* A,
115 ergo_real* result) const;
117 int n2max,
118 ergo_real a,
119 ergo_real* A,
120 ergo_real* result) const;
122 ergo_real a,
123 ergo_real* result) const;
125 ergo_real a,
126 ergo_real* result) const;
128 ergo_real a,
129 i_j_val_struct* result) const;
130
131 IntegralInfo(bool initialize);
133
134 // Stuff needed for Chunks&Tasks usage
135 IntegralInfo(const IntegralInfo & ii);
136 void write_to_buffer ( char * dataBuffer, size_t const bufferSize ) const;
137 size_t get_size() const;
138 void assign_from_buffer ( char const * dataBuffer, size_t const bufferSize);
139};
140
141
142namespace JK {
143/* Struct ExchWeights holds parameters for CAM-style range-separated HF
144 exchange. We use the following short-long range split
145 (alpha+beta*erf(mu*r))*HF_exchange.
146 */
148{
155 alpha(0),
156 beta(0),
157 mu(0),
159 {}
160
161};
162
163}
164
165
166int get_poly_info_from_shell_type(int* polyid_start, int* poly_count, int shellType);
167
169
171
172
173#endif
Code for Boys function evaluation.
Definition: boysfunction.h:73
Contains coefficients needed for quick integral evaluation.
Definition: integral_info.h:94
void assign_from_buffer(char const *dataBuffer, size_t const bufferSize)
Function needed for Chunks&Tasks usage.
Definition: integral_info.cc:377
hermite_conversion_info_struct hermite_conversion_info
Definition: integral_info.h:99
bool initialized
Definition: integral_info.h:100
ergo_real BoysFunction_expensive(int n, ergo_real x, int noOfIntegrationIntervals) const
Definition: integral_info.cc:249
int no_of_basis_func_polys
Definition: integral_info.h:104
ergo_real BoysFunction(int n, ergo_real x) const
Definition: integral_info.cc:243
MMLimitTable mmLimitTable
Definition: integral_info.h:98
MultipolePrepManager multipolePrep
Definition: integral_info.h:97
void write_to_buffer(char *dataBuffer, size_t const bufferSize) const
Function needed for Chunks&Tasks usage.
Definition: integral_info.cc:331
int multiply_by_hermite_conversion_matrix_from_left(int n1max, int n2max, ergo_real a, ergo_real *A, ergo_real *result) const
Definition: integral_info.cc:261
const MultipolePrepManager & GetMultipolePrep() const
Definition: integral_info.h:109
~IntegralInfo()
Definition: integral_info.cc:312
basis_func_poly_struct basis_func_poly_list[MAX_NO_OF_BASIS_FUNC_POLYS]
Definition: integral_info.h:103
BoysFunctionManager boysFunctionManager
Definition: integral_info.h:96
int get_hermite_conversion_matrix_right(int nmax, ergo_real a, ergo_real *result) const
Definition: integral_info.cc:269
size_t get_size() const
Function needed for Chunks&Tasks usage.
Definition: integral_info.cc:365
int get_hermite_conversion_matrix_left(int nmax, ergo_real a, ergo_real *result) const
Definition: integral_info.cc:275
const MMLimitTable & GetMMLimitTable() const
Definition: integral_info.h:110
void init()
Definition: integral_info.cc:287
int multiply_by_hermite_conversion_matrix_from_right(int n1max, int n2max, ergo_real a, ergo_real *A, ergo_real *result) const
Definition: integral_info.cc:253
monomial_info_struct monomial_info
Definition: integral_info.h:105
int get_hermite_conversion_matrix_right_sparse(int nmax, ergo_real a, i_j_val_struct *result) const
Definition: integral_info.cc:281
Definition: mm_limit_table.h:45
Definition: multipole_prep.h:69
Definition: hermite_conversion_prep.h:71
Code for conversion between integrals computed for Hermite Gaussians and Cartesian Gaussians,...
#define MAX_NO_OF_TERMS_IN_BASIS_FUNC_POLY
Definition: integral_info.h:53
#define MAX_NO_OF_BASIS_FUNC_POLYS
Definition: integral_info.h:55
#define MAX_NO_OF_POLY_12_TERMS
Definition: integral_info.h:54
int get_poly_info_from_shell_type(int *polyid_start, int *poly_count, int shellType)
int get_shell_type_from_basis_func_poly_id(int basfuncpolyid)
int get_no_of_basis_func_polys_used_from_no_of_shell_types(int no_of_shell_types)
#define A
MMLimitTable class used to predict the magnitude of contributions when using truncated multipole expa...
Code used to organize monomials; contributions like x, y, z, xy, xz etc.
This file contains preparatory stuff for computing multipole moments and related things.
Definition: integral_info.h:142
Definition of the main floating-point datatype used; the ergo_real type.
double ergo_real
Definition: realtype.h:69
Definition: integral_info.h:148
ergo_real alpha
Definition: integral_info.h:149
ergo_real beta
Definition: integral_info.h:150
int computeRangeSeparatedExchange
shortcut for |beta| != 0
Definition: integral_info.h:152
ExchWeights()
Definition: integral_info.h:154
ergo_real mu
Definition: integral_info.h:151
Definition: integral_info.h:70
int noOfTerms
Definition: integral_info.h:71
ergo_real scaledSolidHarmonicPrefactor
Definition: integral_info.h:73
Definition: integral_info.h:63
int monomialID
Definition: integral_info.h:66
ergo_real coeff
Definition: integral_info.h:64
Definition: simple_sparse_mat.h:42
Definition: monomial_info.h:58
Definition: integral_info.h:84
int noOfTerms
Definition: integral_info.h:85
Definition: integral_info.h:77
int id_2
Definition: integral_info.h:79
int id_1
Definition: integral_info.h:78
ergo_real coeff
Definition: integral_info.h:80