ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
FORCE_STRESS.h
Go to the documentation of this file.
1#ifndef FORCE_STRESS_LCAO_H
2#define FORCE_STRESS_LCAO_H
3
4#include "FORCE.h"
12#include "source_psi/psi.h"
13#ifdef __EXX
15#endif
16#include "force_stress_arrays.h"
17#include "source_lcao/setup_exx.h" // for exx, mohan add 20251008
18#include "source_lcao/setup_deepks.h" // for deepks, mohan add 20251010
19#include "source_lcao/setup_dm.h" // mohan add 2025-11-03
20#include "source_lcao/module_dftu/dftu.h" // mohan add 2025-11-07
21
22
23template <typename T>
25{
26 // mohan add 2021-02-09
27 friend class md;
28 friend void Input_Conv::Convert();
29 friend class ions;
30
31 public:
32 Force_Stress_LCAO(Record_adj& ra, const int nat_in);
34
35 void getForceStress(UnitCell& ucell,
36 const bool isforce,
37 const bool isstress,
38 const bool istestf,
39 const bool istests,
40 const Grid_Driver& gd,
42 const elecstate::ElecState* pelec,
43 LCAO_domain::Setup_DM<T> &dmat, // mohan add 2025-11-03
44 const psi::Psi<T>* psi,
45 const TwoCenterBundle& two_center_bundle,
46 const LCAO_Orbitals& orb,
49 const pseudopot_cell_vl& locpp,
50 const Structure_Factor& sf,
51 const K_Vectors& kv,
52 ModulePW::PW_Basis* rhopw,
53 surchem& solvent,
54 Plus_U &dftu, // mohan add 2025-11-07
55 Setup_DeePKS<T> &deepks,
56 Exx_NAO<T> &exx_nao,
58
59 private:
60 int nat;
64
66
67 void calForcePwPart(UnitCell& ucell,
68 ModuleBase::matrix& fvl_dvl,
69 ModuleBase::matrix& fewalds,
72 const double& etxc,
73 const ModuleBase::matrix& vnew,
74 const bool vnew_exist,
75 const Charge* const chr,
76 ModulePW::PW_Basis* rhopw,
77 const pseudopot_cell_vl& locpp,
78 const Structure_Factor& sf);
79
80 void integral_part(const bool isGammaOnly,
81 const bool isforce,
82 const bool isstress,
83 const UnitCell& ucell,
84 const Grid_Driver& gd,
85 ForceStressArrays& fsr, // mohan add 2024-06-15
86 const elecstate::ElecState* pelec,
87 const elecstate::DensityMatrix<T, double>* dm, // mohan add 2025-11-04
88 const psi::Psi<T>* psi,
89 ModuleBase::matrix& foverlap,
90 ModuleBase::matrix& ftvnl_dphi,
91 ModuleBase::matrix& fvnl_dbeta,
92 ModuleBase::matrix& fvl_dphi,
93 ModuleBase::matrix& soverlap,
94 ModuleBase::matrix& stvnl_dphi,
95 ModuleBase::matrix& svnl_dbeta,
96 ModuleBase::matrix& svl_dphi,
97 ModuleBase::matrix& fvnl_dalpha,
98 ModuleBase::matrix& svnl_dalpha,
99 Setup_DeePKS<T>& deepks,
100 const TwoCenterBundle& two_center_bundle,
101 const LCAO_Orbitals& orb,
102 const Parallel_Orbitals& pv,
103 const K_Vectors& kv);
104
105 void calStressPwPart(UnitCell& ucell,
106 ModuleBase::matrix& sigmadvl,
107 ModuleBase::matrix& sigmahar,
108 ModuleBase::matrix& sigmaewa,
109 ModuleBase::matrix& sigmacc,
110 ModuleBase::matrix& sigmaxc,
111 const double& etxc,
112 const Charge* const chr,
113 ModulePW::PW_Basis* rhopw,
114 const pseudopot_cell_vl& locpp,
115 const Structure_Factor& sf);
116
118};
119
120template <typename T>
122
123// only for DFT+U, mohan add 2025-11-04
124template <typename T>
127 std::vector<std::vector<double>>*& dmk_d,
128 std::vector<std::vector<std::complex<double>>>*& dmk_c,
129 bool gamma_only_local
130);
131
132#endif
void assign_dmk_ptr(elecstate::DensityMatrix< T, double > *dm, std::vector< std::vector< double > > *&dmk_d, std::vector< std::vector< std::complex< double > > > *&dmk_c, bool gamma_only_local)
Definition charge.h:18
Definition setup_exx.h:19
Definition force_stress_arrays.h:5
Definition FORCE.h:21
Definition FORCE_STRESS.h:25
Record_adj * RA
Definition FORCE_STRESS.h:61
void calStressPwPart(UnitCell &ucell, ModuleBase::matrix &sigmadvl, ModuleBase::matrix &sigmahar, ModuleBase::matrix &sigmaewa, ModuleBase::matrix &sigmacc, ModuleBase::matrix &sigmaxc, const double &etxc, const Charge *const chr, ModulePW::PW_Basis *rhopw, const pseudopot_cell_vl &locpp, const Structure_Factor &sf)
Definition FORCE_STRESS.cpp:815
void integral_part(const bool isGammaOnly, const bool isforce, const bool isstress, const UnitCell &ucell, const Grid_Driver &gd, ForceStressArrays &fsr, const elecstate::ElecState *pelec, const elecstate::DensityMatrix< T, double > *dm, const psi::Psi< T > *psi, ModuleBase::matrix &foverlap, ModuleBase::matrix &ftvnl_dphi, ModuleBase::matrix &fvnl_dbeta, ModuleBase::matrix &fvl_dphi, ModuleBase::matrix &soverlap, ModuleBase::matrix &stvnl_dphi, ModuleBase::matrix &svnl_dbeta, ModuleBase::matrix &svl_dphi, ModuleBase::matrix &fvnl_dalpha, ModuleBase::matrix &svnl_dalpha, Setup_DeePKS< T > &deepks, const TwoCenterBundle &two_center_bundle, const LCAO_Orbitals &orb, const Parallel_Orbitals &pv, const K_Vectors &kv)
int nat
Definition FORCE_STRESS.h:60
~Force_Stress_LCAO()
Definition FORCE_STRESS.cpp:58
void forceSymmetry(const UnitCell &ucell, ModuleBase::matrix &fcs, ModuleSymmetry::Symmetry *symm)
Definition FORCE_STRESS.cpp:855
Stress_Func< double > sc_pw
Definition FORCE_STRESS.h:63
void calForcePwPart(UnitCell &ucell, ModuleBase::matrix &fvl_dvl, ModuleBase::matrix &fewalds, ModuleBase::matrix &fcc, ModuleBase::matrix &fscc, const double &etxc, const ModuleBase::matrix &vnew, const bool vnew_exist, const Charge *const chr, ModulePW::PW_Basis *rhopw, const pseudopot_cell_vl &locpp, const Structure_Factor &sf)
Definition FORCE_STRESS.cpp:708
void getForceStress(UnitCell &ucell, const bool isforce, const bool isstress, const bool istestf, const bool istests, const Grid_Driver &gd, Parallel_Orbitals &pv, const elecstate::ElecState *pelec, LCAO_domain::Setup_DM< T > &dmat, const psi::Psi< T > *psi, const TwoCenterBundle &two_center_bundle, const LCAO_Orbitals &orb, ModuleBase::matrix &fcs, ModuleBase::matrix &scs, const pseudopot_cell_vl &locpp, const Structure_Factor &sf, const K_Vectors &kv, ModulePW::PW_Basis *rhopw, surchem &solvent, Plus_U &dftu, Setup_DeePKS< T > &deepks, Exx_NAO< T > &exx_nao, ModuleSymmetry::Symmetry *symm)
Definition FORCE_STRESS.cpp:62
friend class ions
Definition FORCE_STRESS.h:29
static double force_invalid_threshold_ev
Definition FORCE_STRESS.h:117
Force_LCAO< T > flk
Definition FORCE_STRESS.h:62
friend class md
Definition FORCE_STRESS.h:27
Definition sltk_grid_driver.h:43
Definition klist.h:13
Definition ORB_read.h:19
Definition setup_dm.h:14
Definition matrix.h:19
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 parallel_orbitals.h:9
Definition dftu.h:20
Definition record_adj.h:12
Definition setup_deepks.h:23
Definition stress_func.h:58
Definition structure_factor.h:11
Definition two_center_bundle.h:11
Definition unitcell.h:17
Definition density_matrix.h:36
Definition elecstate.h:15
Definition VL_in_pw.h:11
Definition psi.h:37
Definition surchem.h:15
void Convert()
Pass the data members from the INPUT instance(defined in source_io/input.cpp) to GlobalV and GlobalC.
Definition input_conv.cpp:165
Definition exx_lip.h:23
Plus_U dftu
Definition test_dftu.cpp:14