ergo
integral_info.h
Go to the documentation of this file.
1 /* Ergo, version 3.3, a program for linear scaling electronic structure
2  * calculations.
3  * Copyright (C) 2013 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 BASISINFO_BASIC_HEADER
29 #define BASISINFO_BASIC_HEADER
30 
31 
32 #include "realtype.h"
33 #include "monomial_info.h"
35 #include "boysfunction.h"
36 
37 #ifndef BASIS_FUNC_POLY_MAX_DEGREE
38 #error The constant BASIS_FUNC_POLY_MAX_DEGREE must be defined.
39 #endif
40 #if BASIS_FUNC_POLY_MAX_DEGREE<6
41 #define MAX_NO_OF_TERMS_IN_BASIS_FUNC_POLY 12
42 #define MAX_NO_OF_POLY_12_TERMS 180
43 #define MAX_NO_OF_BASIS_FUNC_POLYS 50
44 #else
45 #define MAX_NO_OF_TERMS_IN_BASIS_FUNC_POLY 16
46 #define MAX_NO_OF_POLY_12_TERMS 360
47 #define MAX_NO_OF_BASIS_FUNC_POLYS 100
48 #endif
49 
50 typedef struct
51 {
53  char monomialInts[4]; /* nx, ny, nz */
56 
57 typedef struct
58 {
59  int noOfTerms;
63 
64 typedef struct
65 {
66  int id_1;
67  int id_2;
70 
71 typedef struct
72 {
73  int noOfTerms;
76 
82 {
83  private:
87  IntegralInfo(); // This is to make it forbidden to create it without argument.
88  public:
92  void init();
93  ergo_real BoysFunction(int n, ergo_real x) const;
95  int n2max,
96  ergo_real a,
97  ergo_real* A,
98  ergo_real* result) const;
100  int n2max,
101  ergo_real a,
102  ergo_real* A,
103  ergo_real* result) const;
104  IntegralInfo(bool initialize);
105  ~IntegralInfo();
106 
107  // Stuff needed for Chunks&Tasks usage
108  IntegralInfo(const IntegralInfo & ii);
109  void write_to_buffer ( char * dataBuffer, size_t const bufferSize ) const;
110  size_t get_size() const;
111  void assign_from_buffer ( char const * dataBuffer, size_t const bufferSize);
112 };
113 
114 
115 namespace JK {
116 /* Struct ExchWeights holds parameters for CAM-style range-separated HF
117  exchange. We use the following short-long range split
118  (alpha+beta*erf(mu*r))*HF_exchange.
119  */
121 {
128  alpha(0),
129  beta(0),
130  mu(0),
131  computeRangeSeparatedExchange(0)
132  {}
133 
134 };
135 
136 };
137 
138 
139 int get_poly_info_from_shell_type(int* polyid_start, int* poly_count, int shellType);
140 
142 
143 int get_shell_type_from_basis_func_poly_id(int basfuncpolyid);
144 
145 
146 #endif
#define A
Definition: monomial_info.h:46
BoysFunctionManager boysFunctionManager
Definition: integral_info.h:84
double ergo_real
Definition: realtype.h:53
#define MAX_NO_OF_TERMS_IN_BASIS_FUNC_POLY
Definition: integral_info.h:41
ergo_real mu
Definition: integral_info.h:124
int id_2
Definition: integral_info.h:67
int noOfTerms
Definition: integral_info.h:59
~IntegralInfo()
Definition: integral_info.cc:281
ExchWeights()
Definition: integral_info.h:127
#define MAX_NO_OF_POLY_12_TERMS
Definition: integral_info.h:42
Definition: integral_info.h:57
int monomialID
Definition: integral_info.h:54
int noOfTerms
Definition: integral_info.h:73
ergo_real coeff
Definition: integral_info.h:52
ergo_real beta
Definition: integral_info.h:123
Definition: integral_info.h:120
Contains coefficients needed for quick integral evaluation.
Definition: integral_info.h:81
int get_no_of_basis_func_polys_used_from_no_of_shell_types(int no_of_shell_types)
void write_to_buffer(char *dataBuffer, size_t const bufferSize) const
Function needed for Chunks&Tasks usage.
Definition: integral_info.cc:298
int id_1
Definition: integral_info.h:66
hermite_conversion_info_struct hermite_conversion_info
Definition: integral_info.h:85
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:244
monomial_info_struct monomial_info
Definition: integral_info.h:91
void assign_from_buffer(char const *dataBuffer, size_t const bufferSize)
Function needed for Chunks&Tasks usage.
Definition: integral_info.cc:336
int get_poly_info_from_shell_type(int *polyid_start, int *poly_count, int shellType)
Definition: hermite_conversion_prep.h:49
bool initialized
Definition: integral_info.h:86
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:252
Definition: integral_info.h:50
basis_func_poly_struct basis_func_poly_list[MAX_NO_OF_BASIS_FUNC_POLYS]
Definition: integral_info.h:89
#define MAX_NO_OF_BASIS_FUNC_POLYS
Definition: integral_info.h:43
int get_shell_type_from_basis_func_poly_id(int basfuncpolyid)
Definition: integral_info.h:115
void init()
Definition: integral_info.cc:260
int computeRangeSeparatedExchange
shortcut for |beta| != 0
Definition: integral_info.h:125
ergo_real scaledSolidHarmonicPrefactor
Definition: integral_info.h:61
int no_of_basis_func_polys
Definition: integral_info.h:90
Definition: integral_info.h:64
ergo_real coeff
Definition: integral_info.h:68
size_t get_size() const
Function needed for Chunks&Tasks usage.
Definition: integral_info.cc:326
ergo_real BoysFunction(int n, ergo_real x) const
Definition: integral_info.cc:238
ergo_real alpha
Definition: integral_info.h:122
Definition: boysfunction.h:47
Definition: integral_info.h:71