ergo
grid_atomic.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
34#if !defined(_GRID_ATOMIC_H_)
35#define _GRID_ATOMIC_H_ 1
36
37#include "realtype.h"
38#include "matrix_typedefs.h"
39#include "basisinfo.h"
40#include "grid_interface.h"
41
44
45extern const real BraggRadii[];
46extern const unsigned BraggSize;
47
48
51 const char *name;
53 explicit RadialScheme(const char *n) : name(n), gridSize(0) {}
54 inline int size() const { return gridSize; }
55 virtual void init(int myNumber, int charge, real threshold) = 0;
56 virtual void generate(real *r, real *w) = 0;
57 virtual ~RadialScheme() {}
58};
59
61 void *quadData;
62 RadialSchemeGC2(): RadialScheme("Gauss-Chebychev scheme of second kind")
63 {}
64 virtual void init(int myNumber, int charge, real threshold);
65 virtual void generate(real *r, real *w);
66};
67
70 RadialSchemeTurbo(): RadialScheme("Chebychev T2 scheme/M4 mapping (Turbo)")
71 {}
72 virtual void init(int myNumber, int charge, real threshold);
73 virtual void generate(real *r, real *w);
74};
75
77 explicit RadialSchemeLMG(const GridGenMolInfo& ggmi_);
78
79 virtual void init(int myNumber, int charge, real threshold);
80 virtual void generate(real *r, real *w);
81 virtual ~RadialSchemeLMG();
82 private:
84 int *nucorb;
85 real (*aa)[2];
86 int maxL;
87 /* grid params */
89};
90
91
92
93#endif /* _GRID_ATOMIC_H_ */
Code for setting up basis functions starting from shells.
GridGenMolInfo is an abstract class providing information about the molecule so that the grid generat...
Definition grid_interface.h:45
ergo_real real
Definition test.cc:46
const unsigned BraggSize
Number of defined elements in BraggRadii array.
Definition grid_atomic.cc:75
ergo_long_real long_real
Definition grid_atomic.h:43
ergo_real real
Definition grid_atomic.h:42
const real BraggRadii[]
vector of atoms' Bragg radii.
Definition grid_atomic.cc:39
Grid Generator interface.
int charge
Definition grid_test.cc:51
Header file with typedefs for matrix and vector types.
Definition of the main floating-point datatype used; the ergo_real type.
double ergo_real
Definition realtype.h:69
double ergo_long_real
Definition realtype.h:70
Definition grid_atomic.h:60
void * quadData
Definition grid_atomic.h:61
virtual void generate(real *r, real *w)
Generates grid point positions and weights using Gauss-Chebyshev quadrature of second kind.
Definition grid_atomic.cc:112
virtual void init(int myNumber, int charge, real threshold)
Initializes RadialSchemeGC2 grid generator.
Definition grid_atomic.cc:90
RadialSchemeGC2()
Definition grid_atomic.h:62
Definition grid_atomic.h:76
real(* aa)[2]
Definition grid_atomic.h:85
real h
Definition grid_atomic.h:88
const GridGenMolInfo & ggmi
Definition grid_atomic.h:83
virtual ~RadialSchemeLMG()
Definition grid_atomic.cc:379
int maxL
Definition grid_atomic.h:86
virtual void init(int myNumber, int charge, real threshold)
Initializes the LMG radial grid generator for given atom charge and acceptable error threshold.
Definition grid_atomic.cc:324
real eph
Definition grid_atomic.h:88
real rl
Definition grid_atomic.h:88
real grdc
Definition grid_atomic.h:88
int * nucorb
Definition grid_atomic.h:84
virtual void generate(real *r, real *w)
Generates grid point positions and associated weights using LMG method.
Definition grid_atomic.cc:368
Definition grid_atomic.h:68
RadialSchemeTurbo()
Definition grid_atomic.h:70
virtual void generate(real *r, real *w)
Actual generation of the radial quadrature.
Definition grid_atomic.cc:185
real zeta
Definition grid_atomic.h:69
virtual void init(int myNumber, int charge, real threshold)
This quadrature follows [JCP 102, 346 (1995)].
Definition grid_atomic.cc:146
RadialScheme describes the radial grid.
Definition grid_atomic.h:50
virtual void init(int myNumber, int charge, real threshold)=0
RadialScheme(const char *n)
Definition grid_atomic.h:53
virtual ~RadialScheme()
Definition grid_atomic.h:57
int gridSize
Definition grid_atomic.h:52
const char * name
Definition grid_atomic.h:51
int size() const
Definition grid_atomic.h:54
virtual void generate(real *r, real *w)=0