ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
td_moving_gauge.h
Go to the documentation of this file.
1#ifndef TD_MOVING_GAUGE_H
2#define TD_MOVING_GAUGE_H
3
9
10#include <complex>
11#include <vector>
12
13namespace module_rt
14{
15
17{
18 public:
19 TD_MovingGauge() = default;
21
22 // Initialize the R-space derivative matrices D_R (x, y, z)
23 // using the provided sR_template for consistent sparse atomic pair topology
24 // D_{K,\mu\nu}(R) = <\phi_{\mu 0}|∂\phi_{\nu R}/∂\tau_K> where tau_K is the position of atom K
25 template <typename T_sR>
26 void init_DR(const hamilt::HContainer<T_sR>* sR_template,
27 const UnitCell* ucell,
28 const Parallel_Orbitals* paraV,
29 TwoCenterIntegrator* intor);
30
31 // Update the R-space matrix D_R (x, y, z)
32 template <typename T_sR>
33 void update_DR(const hamilt::HContainer<T_sR>* sR_template,
34 const UnitCell* ucell,
35 const Parallel_Orbitals* paraV,
36 TwoCenterIntegrator* intor);
37
38 // Fourier transform D(R) to D(k)
39 // Note: folding_HR performs an accumulation (+=) operation, need to ensure Dk matrices are zeroed before calling
40 // D_{K,\mu\nu}(k) = \sum_R e^{ikR} D_{K,\mu\nu}(R)
41 template <typename TK>
42 void get_D_k(int K, const ModuleBase::Vector3<double>& kvec_d, TK* Dk_x, TK* Dk_y, TK* Dk_z, int hk_ld) const;
43
44 // Calculate the moving spatial gauge matrix P_k and accumulate it to the input P_k matrix
45 // Note: The unit is converted to Rydberg atomic units, and multiplied by 2 internally
46 // P_{\mu\nu}(k) = -i \sum_K vel_K \cdot D_{K,\mu\nu}(k) where vel_K is the velocity of atom K
47 template <typename TK>
48 void get_P_k(const UnitCell* ucell, const ModuleBase::Vector3<double>& kvec_d, TK* P_k, int matrix_size, int hk_ld)
49 const;
50
51 private:
52 int nat_ = 0;
53
54 std::vector<hamilt::HContainer<double>*> DR_x_;
55 std::vector<hamilt::HContainer<double>*> DR_y_;
56 std::vector<hamilt::HContainer<double>*> DR_z_;
57};
58
59} // namespace module_rt
60
61#endif // TD_MOVING_GAUGE_H
3 elements vector
Definition vector3.h:24
Definition parallel_orbitals.h:9
A class to compute two-center integrals.
Definition two_center_integrator.h:35
Definition unitcell.h:15
Definition hcontainer.h:144
Definition td_moving_gauge.h:17
void get_P_k(const UnitCell *ucell, const ModuleBase::Vector3< double > &kvec_d, TK *P_k, int matrix_size, int hk_ld) const
Definition td_moving_gauge.cpp:235
void get_D_k(int K, const ModuleBase::Vector3< double > &kvec_d, TK *Dk_x, TK *Dk_y, TK *Dk_z, int hk_ld) const
Definition td_moving_gauge.cpp:226
void update_DR(const hamilt::HContainer< T_sR > *sR_template, const UnitCell *ucell, const Parallel_Orbitals *paraV, TwoCenterIntegrator *intor)
Definition td_moving_gauge.cpp:147
std::vector< hamilt::HContainer< double > * > DR_x_
Definition td_moving_gauge.h:54
void init_DR(const hamilt::HContainer< T_sR > *sR_template, const UnitCell *ucell, const Parallel_Orbitals *paraV, TwoCenterIntegrator *intor)
Definition td_moving_gauge.cpp:20
int nat_
Definition td_moving_gauge.h:52
std::vector< hamilt::HContainer< double > * > DR_z_
Definition td_moving_gauge.h:56
~TD_MovingGauge()
Definition td_moving_gauge.cpp:9
std::vector< hamilt::HContainer< double > * > DR_y_
Definition td_moving_gauge.h:55
Definition band_energy.cpp:15