ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
exx_rotate_abfs.h
Go to the documentation of this file.
1
2#ifndef EXX_ROTATE_ABFS_H
3#define EXX_ROTATE_ABFS_H
4
5#include "LRI_CV.h"
6// #include "module_xc/exx_info.h"
7// #include "module_basis/module_ao/ORB_atomic_lm.h"
8#include "Exx_LRI.h"
9// #include "module_ri/Exx_LRI.h"
10// #include <RI/physics/Exx.h>
11#include <RI/ri/RI_Tools.h>
12#include <array>
13#include <map>
14#include <mpi.h>
15#include <vector>
16
17template <typename Tdata>
19{
20 private:
21 using TA = int;
22 using Tcell = int;
23 static constexpr std::size_t Ndim = 3;
24 using TC = std::array<Tcell, Ndim>;
25 using Tq = std::array<double, Ndim>;
26 using TAC = std::pair<TA, TC>;
27 using TAq = std::pair<TA, Tq>;
28
29 public:
30 Moment_abfs(Exx_Info::Exx_Info_RI& info_in) : info(info_in) {};
32 void cal_VR(
33 const UnitCell& ucell,
34 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>>& orb_in,
35 const std::pair<std::vector<TA>, std::vector<std::vector<std::pair<TA, std::array<Tcell, Ndim>>>>>& list_r,
36 const std::vector<double>& orb_cutoff,
37 const double Rc,
38 LRI_CV<Tdata>& cv,
39 std::map<TA, std::map<TAC, RI::Tensor<Tdata>>>& Vs_cut);
40 void discard0_VR(
41 const UnitCell& ucell,
42 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>>& orb_in,
43 const std::pair<std::vector<TA>, std::vector<std::vector<std::pair<TA, std::array<Tcell, Ndim>>>>>& list_r,
44 const std::vector<double>& orb_cutoff,
45 const double Rc,
46 LRI_CV<Tdata>& cv,
47 std::map<TA, std::map<TAC, RI::Tensor<Tdata>>>& Vs_cut);
48 void cal_multipole(const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>>& orb_in);
49 void rotate_abfs(std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>>& orb_in);
50 double sum_triple_Y_YLM_real(int l1,
51 int m1, // real m1, not index
52 int l2,
53 int m2, // real m2, not index
54 const std::vector<double>& rly, // real Y_LM(R)
55 const ORB_gaunt_table& MGT,
56 const double distance);
57 double cal_cl1l2(int l1, int l2) const;
59 double dfact(const int& l) const;
60 int factorial(const int& n) const;
61 double ln_factorial(int n) const;
62
63 void out_pure_ri_tensor(const std::string fn, RI::Tensor<std::complex<double>>& olp, const double threshold);
64 void out_pure_ri_tensor(const std::string fn, RI::Tensor<double>& olp, const double threshold);
65
66 std::vector<std::vector<std::vector<double>>> multipole;
67
68 private:
69 // std::map<TA, std::map<TAC, RI::Tensor<Tdata>>> VR;
71};
72#include "exx_rotate_abfs.hpp"
73
74#endif
Definition LRI_CV.h:25
Definition exx_rotate_abfs.h:19
Moment_abfs(Exx_Info::Exx_Info_RI &info_in)
Definition exx_rotate_abfs.h:30
void out_pure_ri_tensor(const std::string fn, RI::Tensor< std::complex< double > > &olp, const double threshold)
Definition exx_rotate_abfs.hpp:600
Exx_Info::Exx_Info_RI & info
Definition exx_rotate_abfs.h:70
double ln_factorial(int n) const
Definition exx_rotate_abfs.hpp:132
double sum_triple_Y_YLM_real(int l1, int m1, int l2, int m2, const std::vector< double > &rly, const ORB_gaunt_table &MGT, const double distance)
Definition exx_rotate_abfs.hpp:152
double dfact(const int &l) const
double factorial
Definition exx_rotate_abfs.hpp:103
std::pair< TA, TC > TAC
Definition exx_rotate_abfs.h:26
double cal_cl1l2(int l1, int l2) const
Definition exx_rotate_abfs.hpp:141
int TA
Definition exx_rotate_abfs.h:21
std::array< double, Ndim > Tq
Definition exx_rotate_abfs.h:25
std::array< Tcell, Ndim > TC
Definition exx_rotate_abfs.h:24
void cal_VR(const UnitCell &ucell, const std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &orb_in, const std::pair< std::vector< TA >, std::vector< std::vector< std::pair< TA, std::array< Tcell, Ndim > > > > > &list_r, const std::vector< double > &orb_cutoff, const double Rc, LRI_CV< Tdata > &cv, std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > &Vs_cut)
Definition exx_rotate_abfs.hpp:184
void rotate_abfs(std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &orb_in)
Definition exx_rotate_abfs.hpp:41
~Moment_abfs()
Definition exx_rotate_abfs.h:31
void discard0_VR(const UnitCell &ucell, const std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &orb_in, const std::pair< std::vector< TA >, std::vector< std::vector< std::pair< TA, std::array< Tcell, Ndim > > > > > &list_r, const std::vector< double > &orb_cutoff, const double Rc, LRI_CV< Tdata > &cv, std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > &Vs_cut)
Definition exx_rotate_abfs.hpp:402
std::vector< std::vector< std::vector< double > > > multipole
Definition exx_rotate_abfs.h:66
static constexpr std::size_t Ndim
Definition exx_rotate_abfs.h:23
void cal_multipole(const std::vector< std::vector< std::vector< Numerical_Orbital_Lm > > > &orb_in)
Definition exx_rotate_abfs.hpp:12
int factorial(const int &n) const
Definition exx_rotate_abfs.hpp:114
std::pair< TA, Tq > TAq
Definition exx_rotate_abfs.h:27
int Tcell
Definition exx_rotate_abfs.h:22
Definition ORB_gaunt_table.h:9
Definition unitcell.h:15
std::pair< int, TC > TAC
Definition ri_cv_io_test.cpp:10
#define threshold
Definition sph_bessel_recursive_test.cpp:4
Definition exx_info.h:52