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 STRESS_PW_H
2#define STRESS_PW_H
3
7#include "stress_func.h"
8
9namespace vdw
10{
11struct VdwResult;
12}
13
15struct General_Exx_Info;
16
17template <typename FPTYPE, typename Device = base_device::DEVICE_CPU>
18class Stress_PW : public Stress_Func<FPTYPE, Device>
19{
20 public:
21 Stress_PW(const elecstate::ElecState *pelec_in) : pelec(pelec_in) {};
22
23 // calculate the stress in PW basis
24 void cal_stress(
25 const int nspin,
26 const bool domag,
27 const bool domag_z,
28 const int gga_grad,
29 const bool gamma_only_pw,
30 ModuleBase::matrix &smearing_sigmatot,
32 const vdw::VdwResult *vdw_result,
34 const pseudopot_cell_vl &locpp,
36 ModulePW::PW_Basis *rho_basis,
38 Structure_Factor *p_sf,
39 K_Vectors *p_kv,
40 ModulePW::PW_Basis_K *wfc_basis,
41 const General_Exx_Info &exx_info,
42 const psi::Psi<std::complex<FPTYPE>, Device> *d_psi_in = nullptr);
43
44 protected:
45 // the stress from the non-local pseudopotentials in uspp
46 // which is due to the dependence of the Q function on the atomic position
47 void stress_us(
48 ModuleBase::matrix &sigma,
49 ModulePW::PW_Basis *rho_basis,
51 const UnitCell &ucell); // nonlocal part of uspp in PW basis
52
53 // exx stress due to the scaling of the lattice vectors
54 // see 10.1103/PhysRevB.73.125120 for details
55 void stress_exx(
56 ModuleBase::matrix &sigma,
57 const ModuleBase::matrix &wg,
58 ModulePW::PW_Basis *rho_basis,
59 ModulePW::PW_Basis_K *wfc_basis,
60 const K_Vectors *p_kv,
61 const psi::Psi<std::complex<FPTYPE>, Device> *d_psi_in,
62 const UnitCell &ucell,
63 const General_Exx_Info &exx_info); // exx stress in PW basis
64
65 const elecstate::ElecState *pelec = nullptr;
66};
67#endif
Class for k-points management.
Definition klist.h:20
Definition matrix.h:15
Special pw_basis class. It includes different k-points.
Definition pw_basis_k.h:56
A class which can convert a function of "r" to the corresponding linear superposition of plane waves ...
Definition pw_basis.h:60
Symmetry analysis class.
Definition symmetry.h:24
Definition dftu_base.h:21
Stress_Func()
Definition stress_func.h:60
pseudopot_cell_vnl * nlpp
Definition stress_func.h:336
const UnitCell * ucell
Definition stress_func.h:337
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, const General_Exx_Info &exx_info)
Definition stress_exx.cpp:9
void cal_stress(const int nspin, const bool domag, const bool domag_z, const int gga_grad, const bool gamma_only_pw, ModuleBase::matrix &smearing_sigmatot, UnitCell &ucell, const vdw::VdwResult *vdw_result, Plus_U_Base &dftu, 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 General_Exx_Info &exx_info, const psi::Psi< std::complex< FPTYPE >, Device > *d_psi_in=nullptr)
Definition stress_pw.cpp:12
Stress_PW(const elecstate::ElecState *pelec_in)
Definition stress_pw.h:21
const elecstate::ElecState * pelec
Definition stress_pw.h:65
void stress_us(ModuleBase::matrix &sigma, ModulePW::PW_Basis *rho_basis, const pseudopot_cell_vnl &nlpp, const UnitCell &ucell)
Definition stress_us.cpp:17
Definition stru_fac.h:10
Provide the basic information about unitcell.
Definition unitcell.h:16
Definition elecstate.h:20
Definition vl_pw.h:13
Definition vnl_pw.h:23
Definition psi.h:37
Definition esolver_fp.h:18
Definition general_exx_info.h:11
Definition vdw.h:30
Plus_U_Base dftu
Definition test_dftu_nao_op.cpp:11