ergo
multipole.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 MULTIPOLE_HEADER
39 #define MULTIPOLE_HEADER
40 
41 #include "realtype.h"
42 #include "integral_info.h"
43 #include "basisinfo.h"
44 #include "multipole_prep.h"
45 
46 int
47 compute_multipole_moments(const IntegralInfo& integralInfo,
48  const DistributionSpecStruct* distr,
49  multipole_struct_small* result);
50 
51 class MMTranslator {
52  static const int MMDP1 = MAX_MULTIPOLE_DEGREE+1;
58  public:
59  MMTranslator(const MultipolePrepManager & multipolePrepManager);
60  ~MMTranslator();
62  ergo_real dy,
63  ergo_real dz,
64  int l_1,
65  int l_2,
66  ergo_real* result_W) const;
67 };
68 
69 class MMInteractor {
70  static const int MMDP1 = MAX_MULTIPOLE_DEGREE+1;
76  public:
77  MMInteractor(const MultipolePrepManager & multipolePrepManager);
78  ~MMInteractor();
80  ergo_real dy,
81  ergo_real dz,
82  int l_1,
83  int l_2,
84  ergo_real* result_T);
85 };
86 
87 int
89 
90 #endif
MultipolePrepManager::l_m_struct::m
int m
Definition: multipole_prep.h:73
basis_func_poly_struct
Definition: integral_info.h:70
template_blas_sqrt
Treal template_blas_sqrt(Treal x)
MMTranslator::MMDP1
static const int MMDP1
Definition: multipole.h:52
MMTranslator
Definition: multipole.h:51
multipole.h
Code for computing multipole moments, and multipole interaction and translation matrices.
MultipolePrepManager::l_m_struct
Definition: multipole_prep.h:71
realtype.h
Definition of the main floating-point datatype used; the ergo_real type.
DistributionSpecStruct
Definition: basisinfo.h:50
MMTranslator::buffer_W_cs
ergo_real * buffer_W_cs
Definition: multipole.h:54
multipole_prep.h
This file contains preparatory stuff for computing multipole moments and related things.
basis_func_poly_struct::noOfTerms
int noOfTerms
Definition: integral_info.h:71
MAX_MULTIPOLE_DEGREE_BASIC
#define MAX_MULTIPOLE_DEGREE_BASIC
Definition: multipole_prep.h:48
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
MultipolePrepManager::get_lm_factor
ergo_real get_lm_factor(int l, int m) const
Definition: multipole_prep.cc:98
MMInteractor::MMDP1
static const int MMDP1
Definition: multipole.h:70
MMInteractor::buffer_T_cc
ergo_real * buffer_T_cc
Definition: multipole.h:71
MMInteractor
Definition: multipole.h:69
MultipolePrepManager::is_initialized
bool is_initialized() const
Definition: multipole_prep.cc:91
MultipolePrepManager
Definition: multipole_prep.h:69
integrals_general.h
General functionality related to computation of integrals involving Gaussian basis functions.
basis_func_term_struct::monomialInts
char monomialInts[4]
Definition: integral_info.h:65
template_blas_fabs
Treal template_blas_fabs(Treal x)
MAX_MULTIPOLE_DEGREE
#define MAX_MULTIPOLE_DEGREE
Definition: multipole_prep.h:45
MAX_NO_OF_MOMENTS_PER_MULTIPOLE_BASIC
#define MAX_NO_OF_MOMENTS_PER_MULTIPOLE_BASIC
Definition: multipole_prep.h:49
MMInteractor::MMInteractor
MMInteractor(const MultipolePrepManager &multipolePrepManager)
Definition: multipole.cc:275
B
#define B
multipole_struct_large::momentList
ergo_real momentList[MAX_NO_OF_MOMENTS_PER_MULTIPOLE]
Definition: multipole_prep.h:56
MMInteractor::buffer_T_sc
ergo_real * buffer_T_sc
Definition: multipole.h:73
MMInteractor::getInteractionMatrix
int getInteractionMatrix(ergo_real dx, ergo_real dy, ergo_real dz, int l_1, int l_2, ergo_real *result_T)
Definition: multipole.cc:293
multipole_struct_large
Definition: multipole_prep.h:52
IntegralInfo
Contains coefficients needed for quick integral evaluation.
Definition: integral_info.h:94
MMTranslator::~MMTranslator
~MMTranslator()
Definition: multipole.cc:137
MultipolePrepManager::get_l_m_list_ptr
const l_m_struct * get_l_m_list_ptr() const
Definition: multipole_prep.h:83
basis_func_term_struct::coeff
ergo_real coeff
Definition: integral_info.h:64
integral_info.h
Defines IntegralInfo object, providing the coefficients needed for integral evaluation.
MMTranslator::buffer_W_cc
ergo_real * buffer_W_cc
Definition: multipole.h:53
A
#define A
MMInteractor::~MMInteractor
~MMInteractor()
Definition: multipole.cc:284
MMInteractor::multipolePrep
const MultipolePrepManager & multipolePrep
Definition: multipole.h:75
multipole_struct_small::noOfMoments
int noOfMoments
Definition: multipole_prep.h:65
MMTranslator::MMTranslator
MMTranslator(const MultipolePrepManager &multipolePrepManager)
Definition: multipole.cc:128
basisinfo.h
Code for setting up basis functions starting from shells.
IntegralInfo::no_of_basis_func_polys
int no_of_basis_func_polys
Definition: integral_info.h:104
MultipolePrepManager::l_m_struct::l
int l
Definition: multipole_prep.h:72
LOG_AREA_INTEGRALS
#define LOG_AREA_INTEGRALS
Definition: output.h:60
compute_multipole_moments
int compute_multipole_moments(const IntegralInfo &integralInfo, const DistributionSpecStruct *distr, multipole_struct_small *result)
Definition: multipole.cc:49
multipole_struct_small::degree
int degree
Definition: multipole_prep.h:64
multipole_struct_small
Definition: multipole_prep.h:62
setup_multipole_maxAbsMomentList
int setup_multipole_maxAbsMomentList(multipole_struct_large *multipole)
Definition: multipole.cc:418
DistributionSpecStruct::monomialInts
char monomialInts[4]
nx, ny, nz
Definition: basisinfo.h:55
compute_integral_of_simple_prim
ergo_real compute_integral_of_simple_prim(const DistributionSpecStruct &distr)
Definition: integrals_general.cc:318
MMInteractor::buffer_T_cs
ergo_real * buffer_T_cs
Definition: multipole.h:72
DistributionSpecStruct::coeff
ergo_real coeff
Coefficient A.
Definition: basisinfo.h:51
multipole_struct_small::centerCoords
ergo_real centerCoords[3]
Definition: multipole_prep.h:63
multipole_struct_small::momentList
ergo_real momentList[MAX_NO_OF_MOMENTS_PER_MULTIPOLE_BASIC]
Definition: multipole_prep.h:66
MMTranslator::getTranslationMatrix
int getTranslationMatrix(ergo_real dx, ergo_real dy, ergo_real dz, int l_1, int l_2, ergo_real *result_W) const
Definition: multipole.cc:146
multipole_struct_large::maxAbsMomentList
ergo_real maxAbsMomentList[MAX_MULTIPOLE_DEGREE+1]
Definition: multipole_prep.h:57
setup_multipole_maxAbsMomentList
int setup_multipole_maxAbsMomentList(multipole_struct_large *multipole)
Definition: multipole.cc:418
IntegralInfo::basis_func_poly_list
basis_func_poly_struct basis_func_poly_list[MAX_NO_OF_BASIS_FUNC_POLYS]
Definition: integral_info.h:103
MMTranslator::buffer_W_ss
ergo_real * buffer_W_ss
Definition: multipole.h:56
multipole_struct_large::euclideanNormList
ergo_real euclideanNormList[MAX_MULTIPOLE_DEGREE+1]
Definition: multipole_prep.h:58
do_output
void do_output(int logCategory, int logArea, const char *format,...)
Definition: output.cc:53
basis_func_poly_struct::termList
basis_func_term_struct termList[MAX_NO_OF_TERMS_IN_BASIS_FUNC_POLY]
Definition: integral_info.h:72
compute_multipole_moments
int compute_multipole_moments(const IntegralInfo &integralInfo, const DistributionSpecStruct *distr, multipole_struct_small *result)
Definition: multipole.cc:49
basis_func_poly_struct::scaledSolidHarmonicPrefactor
ergo_real scaledSolidHarmonicPrefactor
Definition: integral_info.h:73
MMTranslator::multipolePrep
const MultipolePrepManager & multipolePrep
Definition: multipole.h:57
MMInteractor::buffer_T_ss
ergo_real * buffer_T_ss
Definition: multipole.h:74
output.h
Functionality for writing output messages to a text file.
MMTranslator::buffer_W_sc
ergo_real * buffer_W_sc
Definition: multipole.h:55