ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
sto_hamilt_pw.h
Go to the documentation of this file.
1#ifndef STO_HAMILT_PW_H
2#define STO_HAMILT_PW_H
3
5
6template <typename T, typename Device = base_device::DEVICE_CPU>
7class StoHamiltPW : public hamilt::HamiltPW<T, Device>
8{
9 public:
10 using Real = typename GetTypeReal<T>::type;
22 ModulePW::PW_Basis_K* wfc_basis,
23 K_Vectors* p_kv,
25 const UnitCell* ucell,
26 const int& npol,
27 Real* emin_in,
28 Real* emax_in);
34
42 void hPsi(const T* psi_in, T* hpsi, const int& nbands = 1);
43
51 void hPsi_norm(const T* psi_in, T* hpsi, const int& nbands = 1);
52
53 Real* emin = nullptr;
54 Real* emax = nullptr;
55
56 private:
57 int npwk_max = 0;
58 int npol = 0;
59 std::vector<int>& ngk;
60};
61
62#endif
Class for k-points management.
Definition klist.h:20
Special pw_basis class. It includes different k-points.
Definition pw_basis_k.h:56
Real * emin
Emin of the Hamiltonian.
Definition sto_hamilt_pw.h:53
int npol
number of polarizations
Definition sto_hamilt_pw.h:58
StoHamiltPW(elecstate::Potential *pot_in, ModulePW::PW_Basis_K *wfc_basis, K_Vectors *p_kv, pseudopot_cell_vnl *nlpp, const UnitCell *ucell, const int &npol, Real *emin_in, Real *emax_in)
Construct a new StoHamiltPW object.
Definition sto_hamilt_pw.cpp:6
Real * emax
Emax of the Hamiltonian.
Definition sto_hamilt_pw.h:54
std::vector< int > & ngk
number of G vectors
Definition sto_hamilt_pw.h:59
typename GetTypeReal< T >::type Real
Definition sto_hamilt_pw.h:10
~StoHamiltPW()
Destroy the StoHamiltPW object.
Definition sto_hamilt_pw.h:33
void hPsi(const T *psi_in, T *hpsi, const int &nbands=1)
Calculate \hat{H}|psi>.
Definition sto_hamilt_pw.cpp:24
void hPsi_norm(const T *psi_in, T *hpsi, const int &nbands=1)
Calculate \hat{H}|psi> and normalize it.
Definition sto_hamilt_pw.cpp:44
int npwk_max
maximum number of plane waves
Definition sto_hamilt_pw.h:57
Provide the basic information about unitcell.
Definition unitcell.h:16
Definition potential_new.h:58
Definition hamilt_pw.h:21
const UnitCell *const ucell
Definition hamilt_pw.h:62
Definition vnl_pw.h:23
#define T
Definition exp.cpp:237
T type
Definition macros.h:8