ergo
Main Page
Namespaces
Classes
Files
File List
File Members
basisinfo.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 BASISINFO_HEADER
29
#define BASISINFO_HEADER
30
31
/* for NULL */
32
#include <stdlib.h>
33
34
#include "
realtype.h
"
35
#include "
integral_info.h
"
36
/* for Molecule */
37
#include "
molecule.h
"
38
39
#include "
basisset.h
"
40
41
#define MAX_NO_OF_PRIMITIVES_PER_BASIS_FUNC 44
42
43
struct
DistributionSpecStruct_
{
44
ergo_real
coeff
;
45
ergo_real
exponent
;
46
ergo_real
extent
;
47
ergo_real
centerCoords
[3];
48
char
monomialInts
[4];
49
};
50
typedef
struct
DistributionSpecStruct_
DistributionSpecStruct
;
51
52
typedef
struct
53
{
54
int
basisFuncIndex_1
;
55
int
basisFuncIndex_2
;
56
int
pairIndex
;
57
int
groupID
;
58
ergo_real
limitingFactor
;
// squareroot of repulsion integral of this distr with itself.
59
ergo_real
dmatElement
;
60
DistributionSpecStruct
distr
;
61
}
DistributionSpecStructLabeled
;
62
63
64
#define MAX_NO_OF_CONTR_GAUSSIANS 20
65
66
struct
ShellSpecStruct_
{
67
ergo_real
coeffList
[
MAX_NO_OF_CONTR_GAUSSIANS
];
68
ergo_real
exponentList
[
MAX_NO_OF_CONTR_GAUSSIANS
];
69
ergo_real
sizeList
[
MAX_NO_OF_CONTR_GAUSSIANS
];
70
ergo_real
padding
;
/* We keep this for compatibility with old density files... */
71
ergo_real
centerCoords
[3];
/* x0, y0, z0 */
72
int
noOfContr
;
73
int
shellType
;
74
int
shell_ID
;
75
int
noOfBasisFuncs
;
76
int
startIndexInMatrix
;
/* start index in density matrix */
77
int
dummy
;
/* padding to make sure the size of this structure is a multiple of 8 bytes */
78
};
79
typedef
struct
ShellSpecStruct_
ShellSpecStruct
;
80
81
struct
BasisFuncStruct_
{
82
int
noOfContr
;
83
ergo_real
coeffList
[
MAX_NO_OF_CONTR_GAUSSIANS
];
84
ergo_real
exponentList
[
MAX_NO_OF_CONTR_GAUSSIANS
];
85
ergo_real
extent
;
86
Vector3D
centerCoords
;
/* x0, y0, z0 */
87
int
shellType
;
/* 0 <-> 's', 1 <-> 'p', 2 <-> 'd' etc */
88
int
functionNumber
;
/* -1,0,1 for 'p', -2,-1,0,1,2 for 'd', etc */
89
int
noOfSimplePrimitives
;
90
int
simplePrimitiveIndex
;
91
int
noOfTermsInPolynomial
;
92
basis_func_term_struct
poly
[
MAX_NO_OF_TERMS_IN_BASIS_FUNC_POLY
];
93
};
94
typedef
struct
BasisFuncStruct_
BasisFuncStruct
;
95
96
97
typedef
struct
98
{
99
int
startAtomIndex
;
100
int
count
;
101
basisset_struct
*
basisset
;
102
}
basis_set_range_struct
;
103
104
typedef
struct
105
{
106
int
startAtomIndex
;
107
int
count
;
108
char
*
basisSetFileName
;
109
}
BasissetNameRange
;
110
111
struct
BasisInfoStruct
{
112
int
use_6_d_funcs
;
117
int
noOfShells
;
118
ShellSpecStruct
*
shellList
;
119
int
noOfBasisFuncs
;
120
BasisFuncStruct
*
basisFuncList
;
121
int
noOfSimplePrimitives
;
122
DistributionSpecStruct
*
simplePrimitiveList
;
123
125
BasisInfoStruct
(
int
use_6_d_funcs_ = 0) :
126
use_6_d_funcs
(use_6_d_funcs_),
127
noOfShells
(0),
128
shellList
(NULL),
129
noOfBasisFuncs
(0),
130
basisFuncList
(NULL),
131
noOfSimplePrimitives
(0),
132
simplePrimitiveList
(NULL)
133
{
134
}
135
136
~BasisInfoStruct
()
137
{
138
if
(
shellList
)
delete
[]
shellList
;
139
if
(
basisFuncList
)
delete
[]
basisFuncList
;
140
if
(
simplePrimitiveList
)
delete
[]
simplePrimitiveList
;
141
}
142
143
int
addBasisfuncsForMolecule
(
const
Molecule
& molecule,
144
const
char
* basisset_filename_default,
145
int
noOfRanges,
146
const
BasissetNameRange
* rangeList,
147
const
IntegralInfo
& integralInfo,
148
int
print_raw,
149
int
do_normalization,
150
int
skip_sort_shells);
151
152
BasisInfoStruct
*
permuteShells
(
const
int
*shellMap,
153
const
IntegralInfo
& ii)
const
;
154
155
int
normalizeShells
(
const
IntegralInfo
& integralInfo);
156
157
int
get_basis_funcs
();
158
159
int
getSimplePrimitivesAll
(
const
IntegralInfo
& integralInfo);
160
};
161
162
163
169
struct
SquareFuncIntegrator
{
170
const
int
MAX_NO_OF_PRIMS
;
171
DistributionSpecStruct
*
list
;
172
DistributionSpecStruct
*
productlist
;
173
SquareFuncIntegrator
() :
MAX_NO_OF_PRIMS
(44444)
174
{
175
list
=
new
DistributionSpecStruct
[
MAX_NO_OF_PRIMS
];
176
productlist
=
new
DistributionSpecStruct
[
MAX_NO_OF_PRIMS
];
177
}
178
~SquareFuncIntegrator
()
179
{
180
delete
[]
list
;
181
delete
[]
productlist
;
182
}
183
ergo_real
computeIntegralOfSquareOfBasisFunc
184
(
const
IntegralInfo
& integralInfo,
BasisFuncStruct
* basisFunc,
int
use_6_d_funcs);
185
186
ergo_real
getShellFactor
(
const
IntegralInfo
& integralInfo,
187
ergo_real
exponent,
int
shellType,
int
use_6_d_funcs);
188
};
189
190
191
192
193
#ifdef ERGO_ENABLE_DEPRECATED
194
195
int
basisinfo_construct_multi_basis(
BasisInfoStruct
* result_basisInfo,
196
const
Molecule
* molecule,
197
const
char
* basisset_filename_default,
198
const
Molecule
* ghostMolecule,
199
const
char
* ghost_molecule_basisset_filename,
200
int
noOfRanges,
201
const
BasissetNameRange
* rangeList,
202
IntegralInfo
* integralInfo,
203
int
print_raw,
204
int
do_normalization,
205
int
skip_sort_shells,
206
int
skip_standard_basis);
207
struct
AtomInfoStruct_{
208
int
charge
;
209
ergo_real
coords[3];
210
};
211
typedef
struct
AtomInfoStruct_ AtomInfoStruct;
212
#endif
213
214
int
get_basis_funcs
(
BasisInfoStruct
* basisInfo,
215
const
IntegralInfo
* integralInfo,
216
int
do_normalization);
217
218
int
get_simple_primitives_all
(
BasisInfoStruct
* basisInfo,
219
const
IntegralInfo
* integralInfo);
220
221
int
output_basisinfo
(
const
BasisInfoStruct
& basisInfo);
222
223
ergo_real
getSafeMaxDistance
(
const
BasisInfoStruct
& basisInfo);
224
225
226
#endif
source
basisset
basisinfo.h
Generated on Thu Jan 31 2013 18:51:00 for ergo by
1.8.1.1