ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
symm_rotation.h
Go to the documentation of this file.
1#ifndef ABACUS_SOURCE_LCAO_MODULE_RI_MODULE_EXX_SYMMETRY_SYMM_ROTATION_H
2#define ABACUS_SOURCE_LCAO_MODULE_RI_MODULE_EXX_SYMMETRY_SYMM_ROTATION_H
3
6#include <RI/global/Tensor.h>
8
9class UnitCell;
10
11namespace ModuleSymmetry
12{
20 {
21 public:
24
25 //--------------------------------------------------------------------------------
26 // setters
27 void set_Cs_rotation(const std::vector<std::vector<int>>& abfs_l_nchi);
28 //--------------------------------------------------------------------------------
29
30 //--------------------------------------------------------------------------------
34 template<typename Tdata> // RI::Tensor type
35 std::map<int, std::map<std::pair<int, TC>, RI::Tensor<Tdata>>> restore_HR(
36 const Symmetry& symm, const Atom* atoms, const std::vector<int>& iat2it, const char mode,
37 const std::map<int, std::map<std::pair<int, TC>, RI::Tensor<Tdata>>>& HR_irreduceble)const;
40 template<typename TR> // HContainer type
41 void restore_HR(
42 const Symmetry& symm, const Atom* atoms,
43 const std::vector<int>& iat2it, const std::vector<int>& iat2ia, const char mode,
44 const hamilt::HContainer<TR>& HR_irreduceble, hamilt::HContainer<TR>& HR_rotated)const;
53 template<typename Tdata> // RI::Tensor type
54 std::array<std::map<int, std::map<std::pair<int, TC>, RI::Tensor<Tdata>>>, 4> restore_HR_nspin4(
55 const Symmetry& symm, const Atom* atoms, const std::vector<int>& iat2it, const char mode,
56 const std::array<std::map<int, std::map<std::pair<int, TC>, RI::Tensor<Tdata>>>, 4>& HR_irreducible_soc)const;
57
58 //--------------------------------------------------------------------------------
59 template<typename Tdata> // HContainer type
60 void print_HR(const std::map<int, std::map<std::pair<int, TC>, RI::Tensor<Tdata>>>& HR, const std::string name, const double& threshold = 0.0);
61 //--------------------------------------------------------------------------------
62
63 private:
64 //--------------------------------------------------------------------------------
65
66 //--------------------------------------------------------------------------------
67
71 template<typename Tdata> // RI::Tensor type, blas
73 const Atom& a1, const Atom& a2, const char mode, bool output = false)const;
74 template<typename Tdata> // pointer type, blas
75 void rotate_atompair_serial(Tdata* TAT, const Tdata* A, const int& nw1, const int& nw2, const int isym,
76 const Atom& a1, const Atom& a2, const char mode)const;
77 template<typename TR> // HContainer type, pblas
78 void rotate_atompair_parallel(const TR* Alocal_in, const int isym, const Atom* atoms,
79 const std::vector<int>& iat2it, const std::vector<int>& iat2ia,
80 const Tap& ap_in, const Tap& ap_out, const char mode, const Parallel_Orbitals& pv, TR* Alocal_out, const bool output = false)const;
81
83 template<typename Tdata>
85 const Atom& a1, const Atom& a2, const int& type1, bool output = false)const;
86
87 template<typename Tdata>
88 RI::Tensor<Tdata> set_rotation_matrix(const Atom& a, const int& isym)const;
89 template<typename Tdata>
90 RI::Tensor<Tdata> set_rotation_matrix_abf(const int& type, const int& isym)const;
91
96 const RI::Tensor<std::complex<double>>& get_rotmat_Slm_tensor(const int isym, const int l)const;
97 mutable std::vector<std::vector<RI::Tensor<std::complex<double>>>> rotmat_Slm_tensor_;
99 //--------------------------------------------------------------------------------
100
101 bool reduce_Cs_ = false;
102
103 std::vector<std::vector<int>> abfs_l_nchi_;
104 };
105
106 template<typename T> std::string vec3_fmt(const T& x, const T& y, const T& z)
107 {
108 return "(" + std::to_string(x) + " " + std::to_string(y) + " " + std::to_string(z) + ")";
109 }
110 template<typename T> std::string vec3_fmt(const ModuleBase::Vector3<T>& v)
111 {
112 return vec3_fmt(v.x, v.y, v.z);
113 }
114 // output k stars and the rotation matrices of Bloch orbitals
116 const K_Vectors& kv, const UnitCell& ucell);
117 void print_symrot_info_R(const Symmetry_rotation& symrot, const Symmetry& symm,
118 const int lmax_ao, const std::vector<TC>& Rs);
119}
120
121#include "symm_rotation_r.hpp"
123
124#endif // ABACUS_SOURCE_LCAO_MODULE_RI_MODULE_EXX_SYMMETRY_SYMM_ROTATION_H
Atom class for storing atom information.
Definition atom_spec.h:14
Class for k-points management.
Definition klist.h:20
3 elements vector
Definition vector3.h:21
T x
Definition vector3.h:23
T y
Definition vector3.h:24
T z
Definition vector3.h:25
Symmetry_rotation_k()
Definition symm_rotation_k.h:24
Definition symm_rotation.h:20
std::vector< std::vector< RI::Tensor< std::complex< double > > > > rotmat_Slm_tensor_
Definition symm_rotation.h:97
const RI::Tensor< std::complex< double > > & get_rotmat_Slm_tensor(const int isym, const int l) const
Definition symm_rotation_r.hpp:25
bool reduce_Cs_
Definition symm_rotation.h:101
void rotate_atompair_parallel(const TR *Alocal_in, const int isym, const Atom *atoms, const std::vector< int > &iat2it, const std::vector< int > &iat2ia, const Tap &ap_in, const Tap &ap_out, const char mode, const Parallel_Orbitals &pv, TR *Alocal_out, const bool output=false) const
Definition symm_rotation_r_hcontainer.hpp:82
Symmetry_rotation()
Definition symm_rotation.h:22
int rotmat_Slm_tensor_version_
Definition symm_rotation.h:98
~Symmetry_rotation()
Definition symm_rotation.h:23
void set_Cs_rotation(const std::vector< std::vector< int > > &abfs_l_nchi)
Definition symm_rotation.cpp:7
std::array< std::map< int, std::map< std::pair< int, TC >, RI::Tensor< Tdata > > >, 4 > restore_HR_nspin4(const Symmetry &symm, const Atom *atoms, const std::vector< int > &iat2it, const char mode, const std::array< std::map< int, std::map< std::pair< int, TC >, RI::Tensor< Tdata > > >, 4 > &HR_irreducible_soc) const
Definition symm_rotation_r.hpp:173
std::vector< std::vector< int > > abfs_l_nchi_
number of abfs for each angular momentum
Definition symm_rotation.h:103
RI::Tensor< Tdata > rotate_atompair_serial(const RI::Tensor< Tdata > &A, const int isym, const Atom &a1, const Atom &a2, const char mode, bool output=false) const
Definition symm_rotation_r.hpp:309
std::map< int, std::map< std::pair< int, TC >, RI::Tensor< Tdata > > > restore_HR(const Symmetry &symm, const Atom *atoms, const std::vector< int > &iat2it, const char mode, const std::map< int, std::map< std::pair< int, TC >, RI::Tensor< Tdata > > > &HR_irreduceble) const
Definition symm_rotation_r.hpp:79
RI::Tensor< Tdata > set_rotation_matrix(const Atom &a, const int &isym) const
Definition symm_rotation_r.hpp:295
RI::Tensor< Tdata > set_rotation_matrix_abf(const int &type, const int &isym) const
Definition symm_rotation_r.hpp:351
void print_HR(const std::map< int, std::map< std::pair< int, TC >, RI::Tensor< Tdata > > > &HR, const std::string name, const double &threshold=0.0)
Definition symm_rotation_r.hpp:392
RI::Tensor< Tdata > rotate_singleC_serial(const RI::Tensor< Tdata > &C, const int isym, const Atom &a1, const Atom &a2, const int &type1, bool output=false) const
rotate a 3-dim C tensor in RI technique
Definition symm_rotation_r.hpp:373
Symmetry analysis class.
Definition symmetry.h:24
Definition parallel_orbitals.h:16
Definition rpa_lri_coeff_v1.h:11
Provide the basic information about unitcell.
Definition unitcell.h:16
Definition hcontainer.h:147
Definition output.h:13
#define T
Definition exp.cpp:237
Definition klist_io.h:13
std::pair< int, int > Tap
Definition irred_sec.h:14
std::string vec3_fmt(const T &x, const T &y, const T &z)
Definition symm_rotation.h:106
void print_symrot_info_k(const Symmetry_rotation &symrot, const K_Vectors &kv, const UnitCell &ucell)
Definition symm_rot_out.cpp:56
void print_symrot_info_R(const Symmetry_rotation &symrot, const Symmetry &symm, const int lmax_ao, const std::vector< TC > &Rs)
Definition symm_rot_out.cpp:16
#define threshold
Definition sph_bessel_rec_test.cpp:4