ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
dftu_nao_folding.h
Go to the documentation of this file.
1#ifndef DFTU_NAO_FOLDING_H
2#define DFTU_NAO_FOLDING_H
3
10
16
17#include <complex>
18#include <string>
19#include <vector>
20
21
22namespace DFTU_LCAO {
23
29{
30 int npol;
31 std::string ks_solver;
32 std::vector<double> orb_cutoff;
36};
37
43bool is_adjacent_pair(const std::vector<double>& orb_cutoff,
44 const UnitCell& ucell,
45 const Grid_Driver& gd,
46 int T1,
47 int T2,
49 const ModuleBase::Vector3<double>& tau2);
50
53int get_linear_index(const std::string& ks_solver,
54 int mu,
55 int nu,
56 const Parallel_Orbitals& pv);
57
61void fold_dSR_gamma(const FoldingCtx& ctx,
62 double* dsloc_x,
63 double* dsloc_y,
64 double* dsloc_z,
65 double* dh_r,
66 int dim1,
67 int dim2,
68 double* dSR_gamma);
69
70// dim1 = 0 : S, for Hamiltonian
71// dim1 = 1-3 : dS, for force
72// dim1 = 4-6 : dS * dR, for stress
73void folding_matrix_k(const FoldingCtx& ctx,
75 int ik,
76 int dim1,
77 int dim2,
78 std::complex<double>* mat_k,
79 const ModuleBase::Vector3<double>& kvec_d);
80
86void folding_matrix_k_new(const std::string& ks_solver,
87 bool gamma_only_local,
88 int nspin,
89 int ik,
90 hamilt::Hamilt<std::complex<double>>* p_ham);
91
92} // namespace DFTU_LCAO
93
94#endif // DFTU_NAO_FOLDING_H
Definition force_stress_arrays.h:7
Grid_Driver class for neighbor search interface.
Definition sltk_grid_driver.h:63
3 elements vector
Definition vector3.h:21
Definition parallel_orbitals.h:16
Provide the basic information about unitcell.
Definition unitcell.h:16
Definition hamilt.h:17
Definition dftu_nao_adj.cpp:14
bool is_adjacent_pair(const std::vector< double > &orb_cutoff, const UnitCell &ucell, const Grid_Driver &gd, const int T1, const int T2, const ModuleBase::Vector3< double > &tau1, const ModuleBase::Vector3< double > &tau2)
Judge whether atom pair (T1,I1) and (T2,I2,tau2) are adjacent by direct orbital cutoff overlap or thr...
Definition dftu_nao_folding.cpp:11
void folding_matrix_k_new(const std::string &ks_solver, bool gamma_only_local, int nspin, const int ik, hamilt::Hamilt< std::complex< double > > *p_ham)
new function of folding_S_matrix only for Hamiltonian now, for force and stress will be developed lat...
Definition dftu_nao_folding.cpp:264
void fold_dSR_gamma(const FoldingCtx &ctx, double *dsloc_x, double *dsloc_y, double *dsloc_z, double *dh_r, int dim1, int dim2, double *dSR_gamma)
Fold the dSR matrix for gamma-only calculations. npol is the spin-polarization factor; orb_cutoff and...
Definition dftu_nao_folding.cpp:57
int get_linear_index(const std::string &ks_solver, const int mu, const int nu, const Parallel_Orbitals &pv)
Get the linear index of local matrix element (mu, nu) based on ks_solver (column-major or row-major).
Definition dftu_nao_folding.cpp:45
void folding_matrix_k(const FoldingCtx &ctx, ForceStressArrays &fsr, int ik, int dim1, int dim2, std::complex< double > *mat_k, const ModuleBase::Vector3< double > &kvec_d)
Definition dftu_nao_folding.cpp:149
Grid_Driver class for neighbor search interface.
Shared context for the folding helpers. Bundles the read-only parameters that every folding variant n...
Definition dftu_nao_folding.h:29
const UnitCell * ucell
Definition dftu_nao_folding.h:33
const Grid_Driver * gd
Definition dftu_nao_folding.h:35
std::string ks_solver
Definition dftu_nao_folding.h:31
std::vector< double > orb_cutoff
Definition dftu_nao_folding.h:32
const Parallel_Orbitals * pv
Definition dftu_nao_folding.h:34
int npol
Definition dftu_nao_folding.h:30