ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
stress_pw.h
Go to the documentation of this file.
1#ifndef W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_source_pw_HAMILT_PWDFT_STRESS_PW_H
2#define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_source_pw_HAMILT_PWDFT_STRESS_PW_H
3
6#include "stress_func.h"
7
8template <typename FPTYPE, typename Device = base_device::DEVICE_CPU>
9class Stress_PW : public Stress_Func<FPTYPE, Device>
10{
11 public:
12 Stress_PW(const elecstate::ElecState* pelec_in) : pelec(pelec_in){};
13
14 // calculate the stress in PW basis
15 void cal_stress(ModuleBase::matrix& smearing_sigmatot,
17 const pseudopot_cell_vl& locpp,
19 ModulePW::PW_Basis* rho_basis,
21 Structure_Factor* p_sf,
22 K_Vectors* p_kv,
23 ModulePW::PW_Basis_K* wfc_basis,
24 const psi::Psi <std::complex<FPTYPE>, Device>* d_psi_in = nullptr);
25
26 protected:
27 // call the vdw stress
28 void stress_vdw(ModuleBase::matrix& smearing_sigma,
29 UnitCell& ucell); // force and stress calculated in vdw together.
30
31 // the stress from the non-local pseudopotentials in uspp
32 // which is due to the dependence of the Q function on the atomic position
33 void stress_us(ModuleBase::matrix& sigma,
34 ModulePW::PW_Basis* rho_basis,
36 const UnitCell& ucell); // nonlocal part of uspp in PW basis
37
38 // exx stress due to the scaling of the lattice vectors
39 // see 10.1103/PhysRevB.73.125120 for details
41 const ModuleBase::matrix& wg,
42 ModulePW::PW_Basis* rho_basis,
43 ModulePW::PW_Basis_K* wfc_basis,
44 const K_Vectors* p_kv,
45 const psi::Psi <std::complex<FPTYPE>, Device>* d_psi_in,
46 const UnitCell& ucell); // exx stress in PW basis
47
48 const elecstate::ElecState* pelec = nullptr;
49};
50#endif
Definition klist.h:13
Definition matrix.h:19
Special pw_basis class. It includes different k-points.
Definition pw_basis_k.h:57
A class which can convert a function of "r" to the corresponding linear superposition of plane waves ...
Definition pw_basis.h:56
Definition symmetry.h:16
Definition stress_func.h:57
pseudopot_cell_vnl * nlpp
Definition stress_func.h:277
const UnitCell * ucell
Definition stress_func.h:278
Definition stress_pw.h:10
void stress_exx(ModuleBase::matrix &sigma, const ModuleBase::matrix &wg, ModulePW::PW_Basis *rho_basis, ModulePW::PW_Basis_K *wfc_basis, const K_Vectors *p_kv, const psi::Psi< std::complex< FPTYPE >, Device > *d_psi_in, const UnitCell &ucell)
Definition stress_func_exx.cpp:5
void stress_vdw(ModuleBase::matrix &smearing_sigma, UnitCell &ucell)
Definition stress_pw.cpp:180
void cal_stress(ModuleBase::matrix &smearing_sigmatot, UnitCell &ucell, const pseudopot_cell_vl &locpp, const pseudopot_cell_vnl &nlpp, ModulePW::PW_Basis *rho_basis, ModuleSymmetry::Symmetry *p_symm, Structure_Factor *p_sf, K_Vectors *p_kv, ModulePW::PW_Basis_K *wfc_basis, const psi::Psi< std::complex< FPTYPE >, Device > *d_psi_in=nullptr)
Definition stress_pw.cpp:9
Stress_PW(const elecstate::ElecState *pelec_in)
Definition stress_pw.h:12
const elecstate::ElecState * pelec
Definition stress_pw.h:48
void stress_us(ModuleBase::matrix &sigma, ModulePW::PW_Basis *rho_basis, const pseudopot_cell_vnl &nlpp, const UnitCell &ucell)
Definition stress_func_us.cpp:13
Definition structure_factor.h:11
Definition unitcell.h:16
Definition elecstate.h:15
Definition VL_in_pw.h:11
Definition VNL_in_pw.h:21
Definition psi.h:37