|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
k-space AO-representation symmetry restoration: reconstructs D(k) at every k-star member from D(k_ibz), for crystal-symmetry-reduced BZ sampling. More...
#include <symm_rotation_k.h>
Public Member Functions | |
| Symmetry_rotation_k () | |
| virtual | ~Symmetry_rotation_k () |
| void | reset_symmetry () |
| Discard geometry-dependent caches before rebuilding symmetry for a new cell. | |
| const std::map< Tap, std::set< TC > > & | get_irred_sector () const |
| TCdouble | get_return_lattice (const Symmetry &symm, const ModuleBase::Matrix3 &gmatd, const TCdouble gtransd, const TCdouble &posd_a1, const TCdouble &posd_a2) const |
| TCdouble | get_return_lattice (const int iat, const int isym) const |
| void | find_irred_sector (const Symmetry &symm, const Atom *atoms, const int nat, const int ntype, const std::vector< int > &iat2it, const std::vector< int > &iat2ia, const std::vector< TC > &Rs, const TC &period, const Lattice &lat, const std::string &output_dir="") |
| void | set_abfs_Lmax (const int l) |
| void | cal_Ms (const K_Vectors &kv, const Symmetry &symm, const Atom *atoms, const ModuleBase::Matrix3 &latvec, const int lmax, const int nat, const std::vector< int > &iat2it, const std::vector< int > &iat2ia, const Parallel_Blkcyclic &pv, const int nspin) |
| functions to contruct rotation matrix in AO-representation | |
| std::vector< std::vector< std::complex< double > > > | restore_dm (const K_Vectors &kv, const std::vector< std::vector< std::complex< double > > > &dm_k_ibz, const Parallel_Blkcyclic &pv) const |
| std::vector< std::vector< double > > | restore_dm (const K_Vectors &kv, const std::vector< std::vector< double > > &dm_k_ibz, const Parallel_Blkcyclic &pv) const |
| std::vector< std::complex< double > > | rot_matrix_ao (const std::vector< std::complex< double > > &DMkibz, const int ik_ibz, const int kstar_size, const int isym, const Parallel_Blkcyclic &pv, const bool TRS_conj=false) const |
| std::vector< std::complex< double > > | set_sigma_y_2d (const Parallel_Blkcyclic &pv) const |
| (nspin=4) build the 2*nao spin operator Sigma_y = I_nao (x) sigma_y in 2d-block layout. | |
| std::vector< std::complex< double > > | trs_spin_rotate (const std::vector< std::complex< double > > &X, const std::vector< std::complex< double > > &sigma_y, const Parallel_Blkcyclic &pv, const double scale) const |
| double | wigner_d (const double beta, const int l, const int m1, const int m2) const |
| calculate Wigner D matrix | |
| std::complex< double > | wigner_D (const TCdouble &euler_angle, const int l, const int m1, const int m2, const bool inv) const |
| std::complex< double > | ovlp_Ylm_Slm (const int l, const int m1, const int m2) const |
| c^l_{m1, m2}=<Y_l^m1|S_l^m2> | |
| TCdouble | get_euler_angle (const ModuleBase::Matrix3 &gmatc) const |
| calculate euler angle from rotation matrix | |
| void | cal_rotmat_Slm (const ModuleBase::Matrix3 *gmatc, const int lmax, const int nop) |
| T_mm' = [c^\dagger D c]_mm'. | |
| void | set_block_to_mat2d (const int starti, const int startj, const ModuleBase::ComplexMatrix &block, std::vector< std::complex< double > > &obj_mat, const Parallel_Blkcyclic &pv, const bool trans=false) const |
| void | set_block_to_mat2d (const int starti, const int startj, const ModuleBase::ComplexMatrix &block, std::vector< double > &obj_mat, const Parallel_Blkcyclic &pv, const bool trans=false) const |
| std::vector< std::complex< double > > | contruct_2d_rot_mat_ao (const Symmetry &symm, const Atom *atoms, const int nat, const std::vector< int > &iat2it, const std::vector< int > &iat2ia, const TCdouble &kvec_d_ibz, int isym, const Parallel_Blkcyclic &pv, const SpinRotation::Su2 &spin_U) const |
| std::vector< std::vector< ModuleBase::ComplexMatrix > > & | get_rotmat_Slm () |
| void | set_density_rotations_for_testing (const std::vector< std::map< int, std::vector< std::complex< double > > > > &Ms, const std::vector< std::vector< int > > &little_groups, const int nsym, const int nspin) |
Static Public Member Functions | |
| static std::vector< TC > | get_bvk_cells (const TC &period) |
Public Attributes | |
| const std::vector< std::vector< ModuleBase::ComplexMatrix > > & | rotmat_Slm = this->rotmat_Slm_ |
| the rotation matrix under the basis of S_l^m. size: [nsym][lmax][nm*nm] | |
| const int & | abfs_Lmax = this->abfs_Lmax_ |
Protected Attributes | |
| int | nspin_ = 1 |
| int | nsym_ = 1 |
| int | nanti_ = 0 |
| bool | magnetic_nspin4_ = false |
| double | eps_ = 1e-6 |
| int | abfs_Lmax_ = 0 |
| std::vector< std::vector< ModuleBase::ComplexMatrix > > | rotmat_Slm_ |
| the rotation matrix under the basis of S_l^m. size: [nsym][lmax][nm*nm] | |
| int | rotmat_Slm_version_ = 0 |
| std::vector< std::map< int, std::vector< std::complex< double > > > > | Ms_ |
| std::vector< std::vector< int > > | little_groups_ |
| std::vector< SpinRotation::Su2 > | spin_U_ |
| Irred_Sector | irs_ |
| irreducible sector | |
k-space AO-representation symmetry restoration: reconstructs D(k) at every k-star member from D(k_ibz), for crystal-symmetry-reduced BZ sampling.
This is the LibRI-independent subset of what used to be a single source_lcao/module_ri/module_exx_symmetry/Symmetry_rotation class: everything needed to go from an irreducible-k-point density matrix to the full-BZ one, so callers that only need that (e.g. DFT+U's occupation-matrix/DMR restoration) do not have to depend on module_ri or LibRI. EXX/RPA's own real-space H(R)/RI-coefficient restoration (which does need RI::Tensor) is built on top of this class in source_lcao/module_ri/module_exx_symmetry/symm_rotation.h (ModuleSymmetry::Symmetry_rotation, which inherits from this one).
|
inline |
|
inlinevirtual |
| void ModuleSymmetry::Symmetry_rotation_k::cal_Ms | ( | const K_Vectors & | kv, |
| const Symmetry & | symm, | ||
| const Atom * | atoms, | ||
| const ModuleBase::Matrix3 & | latvec, | ||
| const int | lmax, | ||
| const int | nat, | ||
| const std::vector< int > & | iat2it, | ||
| const std::vector< int > & | iat2ia, | ||
| const Parallel_Blkcyclic & | pv, | ||
| const int | nspin ) |
functions to contruct rotation matrix in AO-representation
The top-level calculation interface of this class. calculate the rotation matrix in AO representation: M only need once call in each ion step (decided by the configuration)
| kstars | equal k points to each ibz-kpont, corresponding to a certain symmetry operations. |
| symm | analyzed symmetry of the cell (gmatrix, gmatrix_anti, kgmatrix, ...) |
| atoms | all atoms |
| latvec | Cartesian lattice vectors, as rows of a 3x3 matrix |
| lmax | maximum angular momentum of the atomic orbitals |
| nat | total number of atoms |
| iat2it | map from global atom index iat to its species index it |
| iat2ia | map from global atom index iat to its index ia within the species |
| nspin | stored as a member so restore_dm()/contruct_2d_rot_mat_ao() do not each need to read the global nspin config setting (keeps this LibRI-free class free of a module_parameter link dependency; every existing caller already has nspin in scope). |
| void ModuleSymmetry::Symmetry_rotation_k::cal_rotmat_Slm | ( | const ModuleBase::Matrix3 * | gmatc, |
| const int | lmax, | ||
| const int | nop ) |
T_mm' = [c^\dagger D c]_mm'.
T_mm' = [c^\dagger D c]_mm', the rotation matrix in the representation of real sphere harmonics
| nop | number of operations in gmatc; <0 means nsym_ (the unitary ones only). Pass nsym_+nanti_ to also build the antiunitary operations' T_l. |
| std::vector< std::complex< double > > ModuleSymmetry::Symmetry_rotation_k::contruct_2d_rot_mat_ao | ( | const Symmetry & | symm, |
| const Atom * | atoms, | ||
| const int | nat, | ||
| const std::vector< int > & | iat2it, | ||
| const std::vector< int > & | iat2ia, | ||
| const TCdouble & | kvec_d_ibz, | ||
| int | isym, | ||
| const Parallel_Blkcyclic & | pv, | ||
| const SpinRotation::Su2 & | spin_U ) const |
2d-block parallized rotation matrix in AO-representation, denoted as M. finally we will use D(k)=M(R, k)^\dagger*D(Rk)*M(R, k) to recover D(k) from D(Rk).
|
inline |
list all cells in a Born-von-Karman supercell of the given period (no LibRI dependency, unlike RI_Util::get_Born_von_Karmen_cells which this mirrors for 3D periods).
| TCdouble ModuleSymmetry::Symmetry_rotation_k::get_euler_angle | ( | const ModuleBase::Matrix3 & | gmatc | ) | const |
calculate euler angle from rotation matrix
|
inline |
|
inline |
|
inline |
|
inline |
| std::complex< double > ModuleSymmetry::Symmetry_rotation_k::ovlp_Ylm_Slm | ( | const int | l, |
| const int | m1, | ||
| const int | m2 ) const |
c^l_{m1, m2}=<Y_l^m1|S_l^m2>
| void ModuleSymmetry::Symmetry_rotation_k::reset_symmetry | ( | ) |
Discard geometry-dependent caches before rebuilding symmetry for a new cell.
| std::vector< std::vector< double > > ModuleSymmetry::Symmetry_rotation_k::restore_dm | ( | const K_Vectors & | kv, |
| const std::vector< std::vector< double > > & | dm_k_ibz, | ||
| const Parallel_Blkcyclic & | pv ) const |
| std::vector< std::vector< std::complex< double > > > ModuleSymmetry::Symmetry_rotation_k::restore_dm | ( | const K_Vectors & | kv, |
| const std::vector< std::vector< std::complex< double > > > & | dm_k_ibz, | ||
| const Parallel_Blkcyclic & | pv ) const |
Use calculated M matrix to recover D(k) from D(k_ibz): D(k) = M(R, k)^\dagger D(k_ibz) M(R, k) the link "ik_ibz-isym-ik" can be found in kstars: k_bz = gmat[isym](k)
| std::vector< std::complex< double > > ModuleSymmetry::Symmetry_rotation_k::rot_matrix_ao | ( | const std::vector< std::complex< double > > & | DMkibz, |
| const int | ik_ibz, | ||
| const int | kstar_size, | ||
| const int | isym, | ||
| const Parallel_Blkcyclic & | pv, | ||
| const bool | TRS_conj = false ) const |
|
inline |
| void ModuleSymmetry::Symmetry_rotation_k::set_block_to_mat2d | ( | const int | starti, |
| const int | startj, | ||
| const ModuleBase::ComplexMatrix & | block, | ||
| std::vector< double > & | obj_mat, | ||
| const Parallel_Blkcyclic & | pv, | ||
| const bool | trans = false ) const |
| void ModuleSymmetry::Symmetry_rotation_k::set_block_to_mat2d | ( | const int | starti, |
| const int | startj, | ||
| const ModuleBase::ComplexMatrix & | block, | ||
| std::vector< std::complex< double > > & | obj_mat, | ||
| const Parallel_Blkcyclic & | pv, | ||
| const bool | trans = false ) const |
set a block matrix onto a 2d-parallelized matrix(col-maj), at the position (starti, startj) if trans=true, the block matrix is transposed before setting
|
inline |
test-only: inject Ms_/little_groups_/nsym_ directly, bypassing cal_Ms(), so restore_dm() can be unit-tested against synthetic k-stars without a real UnitCell/K_Vectors setup.
| std::vector< std::complex< double > > ModuleSymmetry::Symmetry_rotation_k::set_sigma_y_2d | ( | const Parallel_Blkcyclic & | pv | ) | const |
(nspin=4) build the 2*nao spin operator Sigma_y = I_nao (x) sigma_y in 2d-block layout.
| std::vector< std::complex< double > > ModuleSymmetry::Symmetry_rotation_k::trs_spin_rotate | ( | const std::vector< std::complex< double > > & | X, |
| const std::vector< std::complex< double > > & | sigma_y, | ||
| const Parallel_Blkcyclic & | pv, | ||
| const double | scale ) const |
(nspin=4) time-reversal on the spin density matrix: D(k) = sigma_y D^*(-k) sigma_y, realized distribution-safely as scale * Sigma_y * conj(X) * Sigma_y (X is the already space-group-rotated D(-k) stored in the transposed 2d-block convention).
| std::complex< double > ModuleSymmetry::Symmetry_rotation_k::wigner_D | ( | const TCdouble & | euler_angle, |
| const int | l, | ||
| const int | m1, | ||
| const int | m2, | ||
| const bool | inv ) const |
| double ModuleSymmetry::Symmetry_rotation_k::wigner_d | ( | const double | beta, |
| const int | l, | ||
| const int | m1, | ||
| const int | m2 ) const |
calculate Wigner D matrix
| const int& ModuleSymmetry::Symmetry_rotation_k::abfs_Lmax = this->abfs_Lmax_ |
|
protected |
|
protected |
|
protected |
irreducible sector
|
protected |
The little group of each ibz-kpoint: the subset of unitary space-group operations that fix kvec_d_ibz modulo a reciprocal lattice vector. D(k_ibz) is averaged over this group before star-expansion, since a finite-grid SCF density need not exactly respect it. size: [nks_ibz][<=nsym_], always non-empty (identity is always a member).
|
protected |
(nspin=4) true when the configuration carries a non-zero local moment. Then pure time reversal is NOT a symmetry (it reverses m) and the k-star must be restored with the Shubnikov elements Theta*gmatrix_anti[] instead of the generic -k shortcut.
|
protected |
The unitary matrix associate D(Rk) with D(k) for each ibz-kpoint Rk and each symmetry operation. size: [nks_ibz][nsym][nbasis*nbasis], only need to calculate once.
|
protected |
(nspin=4, magnetic) number of ANTIUNITARY elements Theta*g of the Shubnikov group. Their orbital rotations / return lattices / Ms are appended after the nsym_ unitary ones, so the raw index isym in [nsym_, nsym_+nanti_) addresses gmatrix_anti[isym-nsym_].
|
protected |
set by cal_Ms() (or set_density_rotations_for_testing()); avoids reading the global nspin config setting in restore_dm()/contruct_2d_rot_mat_ao(), which would otherwise pull a module_parameter link dependency into every target that links this LibRI-free class.
|
protected |
| const std::vector<std::vector<ModuleBase::ComplexMatrix> >& ModuleSymmetry::Symmetry_rotation_k::rotmat_Slm = this->rotmat_Slm_ |
the rotation matrix under the basis of S_l^m. size: [nsym][lmax][nm*nm]
|
protected |
the rotation matrix under the basis of S_l^m. size: [nsym][lmax][nm*nm]
|
protected |
bumped every time cal_rotmat_Slm() (re)fills rotmat_Slm_, so derived classes caching a converted copy of rotmat_Slm_ (e.g. EXX's RI::Tensor mirror) can detect staleness without recomparing the whole matrix.
|
protected |
(nspin=4) the SU(2) spin-1/2 rotation U(isym) for each symmetry operation, size [nsym]. The spinor AO rotation is T(isym) (x) U(isym); restore_HR_nspin4 (EXX) uses it to mix the 4 spin channels of the real-space H(R). Filled in cal_Ms (identity for nspin<4).