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
6#include "stress_func.h"
7#include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-07
8
9template <typename FPTYPE, typename Device = base_device::DEVICE_CPU>
10class Stress_PW : public Stress_Func<FPTYPE, Device>
11{
12 public:
13 Stress_PW(const elecstate::ElecState* pelec_in) : pelec(pelec_in){};
14
15 // calculate the stress in PW basis
16 void cal_stress(ModuleBase::matrix& smearing_sigmatot,
18 Plus_U &dftu, // mhan add 2025-11-07
19 const pseudopot_cell_vl& locpp,
21 ModulePW::PW_Basis* rho_basis,
23 Structure_Factor* p_sf,
24 K_Vectors* p_kv,
25 ModulePW::PW_Basis_K* wfc_basis,
26 const psi::Psi <std::complex<FPTYPE>, Device>* d_psi_in = nullptr);
27
28 protected:
29 // call the vdw stress
30 void stress_vdw(ModuleBase::matrix& smearing_sigma,
31 UnitCell& ucell); // force and stress calculated in vdw together.
32
33 // the stress from the non-local pseudopotentials in uspp
34 // which is due to the dependence of the Q function on the atomic position
35 void stress_us(ModuleBase::matrix& sigma,
36 ModulePW::PW_Basis* rho_basis,
38 const UnitCell& ucell); // nonlocal part of uspp in PW basis
39
40 // exx stress due to the scaling of the lattice vectors
41 // see 10.1103/PhysRevB.73.125120 for details
43 const ModuleBase::matrix& wg,
44 ModulePW::PW_Basis* rho_basis,
45 ModulePW::PW_Basis_K* wfc_basis,
46 const K_Vectors* p_kv,
47 const psi::Psi <std::complex<FPTYPE>, Device>* d_psi_in,
48 const UnitCell& ucell); // exx stress in PW basis
49
50 const elecstate::ElecState* pelec = nullptr;
51};
52#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 dftu.h:20
Definition stress_func.h:58
pseudopot_cell_vnl * nlpp
Definition stress_func.h:279
const UnitCell * ucell
Definition stress_func.h:280
Definition stress_pw.h:11
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:7
void stress_vdw(ModuleBase::matrix &smearing_sigma, UnitCell &ucell)
Definition stress_pw.cpp:181
Stress_PW(const elecstate::ElecState *pelec_in)
Definition stress_pw.h:13
void cal_stress(ModuleBase::matrix &smearing_sigmatot, UnitCell &ucell, Plus_U &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 psi::Psi< std::complex< FPTYPE >, Device > *d_psi_in=nullptr)
Definition stress_pw.cpp:9
const elecstate::ElecState * pelec
Definition stress_pw.h:50
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:17
Definition elecstate.h:15
Definition VL_in_pw.h:11
Definition VNL_in_pw.h:21
Definition psi.h:37
Plus_U dftu
Definition test_dftu.cpp:14