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"
7// #include "module_xc/exx_info.h"
8// #include "module_basis/module_ao/orb_atomic_lm.h"
9#include "exx_lri.h"
10// #include "module_ri/exx_lri.h"
11// #include <RI/physics/Exx.h>
12#include <RI/ri/RI_Tools.h>
13#include <array>
14#include <map>
15#include <mpi.h>
16#include <vector>
17
18template <typename Tdata>
20{
21 private:
22 using TA = int;
23 using Tcell = int;
24 static constexpr std::size_t Ndim = 3;
25 using TC = std::array<Tcell, Ndim>;
26 using Tq = std::array<double, Ndim>;
27 using TAC = std::pair<TA, TC>;
28 using TAq = std::pair<TA, Tq>;
29
30 public:
31 Moment_abfs(Exx_Info_RI& info_in) : info(info_in) {};
33 void cal_VR(
34 const UnitCell& ucell,
35 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>>& orb_in,
36 const std::pair<std::vector<TA>, std::vector<std::vector<std::pair<TA, std::array<Tcell, Ndim>>>>>& list_r,
37 const std::vector<double>& orb_cutoff,
38 const double Rc,
39 LRI_CV<Tdata>& cv,
40 std::map<TA, std::map<TAC, RI::Tensor<Tdata>>>& Vs_cut);
41 void discard0_VR(
42 const UnitCell& ucell,
43 const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>>& orb_in,
44 const std::pair<std::vector<TA>, std::vector<std::vector<std::pair<TA, std::array<Tcell, Ndim>>>>>& list_r,
45 const std::vector<double>& orb_cutoff,
46 const double Rc,
47 LRI_CV<Tdata>& cv,
48 std::map<TA, std::map<TAC, RI::Tensor<Tdata>>>& Vs_cut);
49 void cal_multipole(const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>>& orb_in);
50 void rotate_abfs(std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>>& orb_in);
51 double sum_triple_Y_YLM_real(int l1,
52 int m1, // real m1, not index
53 int l2,
54 int m2, // real m2, not index
55 const std::vector<double>& rly, // real Y_LM(R)
56 const ORB_gaunt_table& MGT,
57 const double distance);
58 double cal_cl1l2(int l1, int l2) const;
60 double dfact(const int& l) const;
61 int factorial(const int& n) const;
62 double ln_factorial(int n) const;
63
64 void out_pure_ri_tensor(const std::string fn, RI::Tensor<std::complex<double>>& olp, const double threshold);
65 void out_pure_ri_tensor(const std::string fn, RI::Tensor<double>& olp, const double threshold);
66
67 std::vector<std::vector<std::vector<double>>> multipole;
68
69 private:
70 // std::map<TA, std::map<TAC, RI::Tensor<Tdata>>> VR;
71 // WARNING: reference to Exx_Info_RI.
72 // Must not outlive the Exx_Info_RI passed to the constructor.
74};
75#include "exx_rotate_abfs.hpp"
76
77#endif
Definition lri_cv.h:26
void out_pure_ri_tensor(const std::string fn, RI::Tensor< std::complex< double > > &olp, const double threshold)
Definition exx_rotate_abfs.hpp:600
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:27
double cal_cl1l2(int l1, int l2) const
Definition exx_rotate_abfs.hpp:141
int TA
Definition exx_rotate_abfs.h:22
std::array< double, Ndim > Tq
Definition exx_rotate_abfs.h:26
std::array< Tcell, Ndim > TC
Definition exx_rotate_abfs.h:25
Exx_Info_RI & info
Definition exx_rotate_abfs.h:73
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:32
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:67
static constexpr std::size_t Ndim
Definition exx_rotate_abfs.h:24
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:28
int Tcell
Definition exx_rotate_abfs.h:23
Moment_abfs(Exx_Info_RI &info_in)
Definition exx_rotate_abfs.h:31
Definition orb_gaunt_table.h:9
Definition rpa_lri_coeff_v1.h:11
Provide the basic information about unitcell.
Definition unitcell.h:16
#define threshold
Definition sph_bessel_rec_test.cpp:4
Definition exx_info_ri.h:11
std::pair< int, TC > TAC
Definition test_write_ri_cv.cpp:10