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
21
22template <typename T>
24{
25 // mohan add 2021-02-09
26 friend class md;
27 friend void Input_Conv::Convert();
28 friend class ions;
29
30 public:
31 Force_Stress_LCAO(Record_adj& ra, const int nat_in);
33
34 void getForceStress(UnitCell& ucell,
35 const bool isforce,
36 const bool isstress,
37 const bool istestf,
38 const bool istests,
39 const Grid_Driver& gd,
41 const elecstate::ElecState* pelec,
42 LCAO_domain::Setup_DM<T> &dmat, // mohan add 2025-11-03
43 const psi::Psi<T>* psi,
44 const TwoCenterBundle& two_center_bundle,
45 const LCAO_Orbitals& orb,
48 const pseudopot_cell_vl& locpp,
49 const Structure_Factor& sf,
50 const K_Vectors& kv,
51 ModulePW::PW_Basis* rhopw,
52 surchem& solvent,
53 Setup_DeePKS<T> &deepks,
54 Exx_NAO<T> &exx_nao,
56
57 private:
58 int nat;
62
64
65 void calForcePwPart(UnitCell& ucell,
66 ModuleBase::matrix& fvl_dvl,
67 ModuleBase::matrix& fewalds,
70 const double& etxc,
71 const ModuleBase::matrix& vnew,
72 const bool vnew_exist,
73 const Charge* const chr,
74 ModulePW::PW_Basis* rhopw,
75 const pseudopot_cell_vl& locpp,
76 const Structure_Factor& sf);
77
78 void integral_part(const bool isGammaOnly,
79 const bool isforce,
80 const bool isstress,
81 const UnitCell& ucell,
82 const Grid_Driver& gd,
83 ForceStressArrays& fsr, // mohan add 2024-06-15
84 const elecstate::ElecState* pelec,
85 const elecstate::DensityMatrix<T, double>* dm, // mohan add 2025-11-04
86 const psi::Psi<T>* psi,
87 ModuleBase::matrix& foverlap,
88 ModuleBase::matrix& ftvnl_dphi,
89 ModuleBase::matrix& fvnl_dbeta,
90 ModuleBase::matrix& fvl_dphi,
91 ModuleBase::matrix& soverlap,
92 ModuleBase::matrix& stvnl_dphi,
93 ModuleBase::matrix& svnl_dbeta,
94 ModuleBase::matrix& svl_dphi,
95 ModuleBase::matrix& fvnl_dalpha,
96 ModuleBase::matrix& svnl_dalpha,
97 Setup_DeePKS<T>& deepks,
98 const TwoCenterBundle& two_center_bundle,
99 const LCAO_Orbitals& orb,
100 const Parallel_Orbitals& pv,
101 const K_Vectors& kv);
102
103 void calStressPwPart(UnitCell& ucell,
104 ModuleBase::matrix& sigmadvl,
105 ModuleBase::matrix& sigmahar,
106 ModuleBase::matrix& sigmaewa,
107 ModuleBase::matrix& sigmacc,
108 ModuleBase::matrix& sigmaxc,
109 const double& etxc,
110 const Charge* const chr,
111 ModulePW::PW_Basis* rhopw,
112 const pseudopot_cell_vl& locpp,
113 const Structure_Factor& sf);
114
116};
117
118template <typename T>
120
121// only for DFT+U, mohan add 2025-11-04
122template <typename T>
125 std::vector<std::vector<double>>*& dmk_d,
126 std::vector<std::vector<std::complex<double>>>*& dmk_c,
127 bool gamma_only_local
128);
129
130#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:24
Record_adj * RA
Definition FORCE_STRESS.h:59
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:814
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:58
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, Setup_DeePKS< T > &deepks, Exx_NAO< T > &exx_nao, ModuleSymmetry::Symmetry *symm)
Definition FORCE_STRESS.cpp:62
~Force_Stress_LCAO()
Definition FORCE_STRESS.cpp:58
void forceSymmetry(const UnitCell &ucell, ModuleBase::matrix &fcs, ModuleSymmetry::Symmetry *symm)
Definition FORCE_STRESS.cpp:854
Stress_Func< double > sc_pw
Definition FORCE_STRESS.h:61
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:707
friend class ions
Definition FORCE_STRESS.h:28
static double force_invalid_threshold_ev
Definition FORCE_STRESS.h:115
Force_LCAO< T > flk
Definition FORCE_STRESS.h:60
friend class md
Definition FORCE_STRESS.h:26
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 record_adj.h:12
Definition setup_deepks.h:23
Definition stress_func.h:57
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:163
Definition exx_lip.h:23