1+ #include " module_elecstate/cal_ux.h"
12#include " module_elecstate/module_charge/symmetry_rho.h"
23#include " module_esolver/esolver_ks_lcao.h"
34#include " module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h"
45#include " module_hamilt_lcao/module_dftu/dftu.h"
56#include " module_hamilt_pw/hamilt_pwdft/global.h"
6- #include " module_elecstate/cal_ux.h"
77//
88#include " module_base/timer.h"
99#include " module_cell/module_neighbor/sltk_atom_arrange.h"
@@ -127,7 +127,7 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(UnitCell& ucell, const int istep)
127127 // (2)For each atom, calculate the adjacent atoms in different cells
128128 // and allocate the space for H(R) and S(R).
129129 // If k point is used here, allocate HlocR after atom_arrange.
130- this ->RA .for_2d (GlobalC::GridD, this ->pv , PARAM.globalv .gamma_only_local , orb_.cutoffs ());
130+ this ->RA .for_2d (ucell, GlobalC::GridD, this ->pv , PARAM.globalv .gamma_only_local , orb_.cutoffs ());
131131
132132 // 2. density matrix extrapolation
133133
@@ -174,7 +174,7 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(UnitCell& ucell, const int istep)
174174 }
175175
176176 // prepare grid in Gint
177- LCAO_domain::grid_prepare (this ->GridT , this ->GG , this ->GK , orb_, *this ->pw_rho , *this ->pw_big );
177+ LCAO_domain::grid_prepare (this ->GridT , this ->GG , this ->GK , ucell, orb_, *this ->pw_rho , *this ->pw_big );
178178
179179 // init Hamiltonian
180180 if (this ->p_hamilt != nullptr )
@@ -188,6 +188,7 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(UnitCell& ucell, const int istep)
188188 this ->p_hamilt = new hamilt::HamiltLCAO<TK, TR>(
189189 PARAM.globalv .gamma_only_local ? &(this ->GG ) : nullptr ,
190190 PARAM.globalv .gamma_only_local ? nullptr : &(this ->GK ),
191+ ucell,
191192 GlobalC::GridD,
192193 &this ->pv ,
193194 this ->pelec ->pot ,
@@ -311,11 +312,9 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(UnitCell& ucell, const int istep)
311312 // two cases are considered:
312313 // 1. DMK in DensityMatrix is not empty (istep > 0), then DMR is initialized by DMK
313314 // 2. DMK in DensityMatrix is empty (istep == 0), then DMR is initialized by zeros
314- if (istep > 0 )
315+ if (istep > 0 )
315316 {
316- dynamic_cast <elecstate::ElecStateLCAO<TK>*>(this ->pelec )
317- ->get_DM ()
318- ->cal_DMR ();
317+ dynamic_cast <elecstate::ElecStateLCAO<TK>*>(this ->pelec )->get_DM ()->cal_DMR ();
319318 }
320319
321320 if (PARAM.inp .dm_to_rho )
@@ -370,16 +369,18 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(UnitCell& ucell, const int istep)
370369 this ->p_hamilt ->non_first_scf = istep;
371370
372371 // update in ion-step
373- if ( PARAM.inp .rdmft == true )
372+ if ( PARAM.inp .rdmft == true )
374373 {
375374 // necessary operation of these parameters have be done with p_esolver->Init() in source/driver_run.cpp
376- rdmft_solver.update_ion (ucell, *(this ->pw_rho ), this ->ppcell .vloc , this ->sf .strucFac ); // add by jghan, 2024-03-16/2024-10-08
375+ rdmft_solver.update_ion (ucell,
376+ *(this ->pw_rho ),
377+ this ->ppcell .vloc ,
378+ this ->sf .strucFac ); // add by jghan, 2024-03-16/2024-10-08
377379 }
378380
379381 return ;
380382}
381383
382-
383384template class ESolver_KS_LCAO <double , double >;
384385template class ESolver_KS_LCAO <std::complex <double >, double >;
385386template class ESolver_KS_LCAO <std::complex <double >, std::complex <double >>;
0 commit comments