@@ -139,11 +139,11 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(UnitCell& ucell, const Input_pa
139139 int ncol = 0 ;
140140 if (PARAM.globalv .gamma_only_local )
141141 {
142- nsk = PARAM. inp .nspin ;
142+ nsk = inp.nspin ;
143143 ncol = this ->pv .ncol_bands ;
144- if (PARAM. inp .ks_solver == " genelpa" || PARAM. inp .ks_solver == " elpa" || PARAM. inp .ks_solver == " lapack"
145- || PARAM. inp .ks_solver == " pexsi" || PARAM. inp .ks_solver == " cusolver"
146- || PARAM. inp .ks_solver == " cusolvermp" )
144+ if (inp.ks_solver == " genelpa" || inp.ks_solver == " elpa" || inp.ks_solver == " lapack"
145+ || inp.ks_solver == " pexsi" || inp.ks_solver == " cusolver"
146+ || inp.ks_solver == " cusolvermp" )
147147 {
148148 ncol = this ->pv .ncol ;
149149 }
@@ -154,22 +154,22 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(UnitCell& ucell, const Input_pa
154154#ifdef __MPI
155155 ncol = this ->pv .ncol_bands ;
156156#else
157- ncol = PARAM. inp .nbands ;
157+ ncol = inp.nbands ;
158158#endif
159159 }
160160 this ->psi = new psi::Psi<TK>(nsk, ncol, this ->pv .nrow , this ->kv .ngk , true );
161161 }
162162
163163 // 5) read psi from file
164- if (PARAM. inp .init_wfc == " file" && PARAM. inp .esolver_type != " tddft" )
164+ if (inp.init_wfc == " file" && inp.esolver_type != " tddft" )
165165 {
166166 if (!ModuleIO::read_wfc_nao (PARAM.globalv .global_readin_dir ,
167167 this ->pv ,
168168 *(this ->psi ),
169169 this ->pelec ,
170170 this ->pelec ->klist ->ik2iktot ,
171171 this ->pelec ->klist ->get_nkstot (),
172- PARAM. inp .nspin ))
172+ inp.nspin ))
173173 {
174174 ModuleBase::WARNING_QUIT (" ESolver_KS_LCAO" , " read electronic wave functions failed" );
175175 }
@@ -178,16 +178,16 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(UnitCell& ucell, const Input_pa
178178 // 6) initialize the density matrix
179179 // DensityMatrix is allocated here, DMK is also initialized here
180180 // DMR is not initialized here, it will be constructed in each before_scf
181- dynamic_cast <elecstate::ElecStateLCAO<TK>*>(this ->pelec )->init_DM (&this ->kv , &(this ->pv ), PARAM. inp .nspin );
181+ dynamic_cast <elecstate::ElecStateLCAO<TK>*>(this ->pelec )->init_DM (&this ->kv , &(this ->pv ), inp.nspin );
182182
183183 // 7) initialize exact exchange calculations
184184#ifdef __EXX
185- if (PARAM. inp .calculation == " scf" || PARAM. inp .calculation == " relax" || PARAM. inp .calculation == " cell-relax"
186- || PARAM. inp .calculation == " md" )
185+ if (inp.calculation == " scf" || inp.calculation == " relax" || inp.calculation == " cell-relax"
186+ || inp.calculation == " md" )
187187 {
188188 if (GlobalC::exx_info.info_global .cal_exx )
189189 {
190- if (PARAM. inp .init_wfc != " file" )
190+ if (inp.init_wfc != " file" )
191191 { // if init_wfc==file, directly enter the EXX loop
192192 XC_Functional::set_xc_first_loop (ucell);
193193 }
@@ -208,7 +208,7 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(UnitCell& ucell, const Input_pa
208208#endif
209209
210210 // 8) initialize DFT+U
211- if (PARAM. inp .dft_plus_u )
211+ if (inp.dft_plus_u )
212212 {
213213 auto * dftu = ModuleDFTU::DFTU::get_instance ();
214214 dftu->init (ucell, &this ->pv , this ->kv .get_nks (), &orb_);
@@ -219,7 +219,7 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(UnitCell& ucell, const Input_pa
219219 ModuleBase::GlobalFunc::DONE (GlobalV::ofs_running, " LOCAL POTENTIAL" );
220220
221221 // 10) inititlize the charge density
222- this ->chr .allocate (PARAM. inp .nspin );
222+ this ->chr .allocate (inp.nspin );
223223 this ->pelec ->omega = ucell.omega ;
224224
225225 // 11) initialize the potential
@@ -238,13 +238,13 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(UnitCell& ucell, const Input_pa
238238 // 12) initialize deepks
239239#ifdef __MLALGO
240240 LCAO_domain::DeePKS_init (ucell, pv, this ->kv .get_nks (), orb_, this ->ld , GlobalV::ofs_running);
241- if (PARAM. inp .deepks_scf )
241+ if (inp.deepks_scf )
242242 {
243243 // load the DeePKS model from deep neural network
244- DeePKS_domain::load_model (PARAM. inp .deepks_model , ld.model_deepks );
244+ DeePKS_domain::load_model (inp.deepks_model , ld.model_deepks );
245245 // read pdm from file for NSCF or SCF-restart, do it only once in whole calculation
246- DeePKS_domain::read_pdm ((PARAM. inp .init_chg == " file" ),
247- PARAM. inp .deepks_equiv ,
246+ DeePKS_domain::read_pdm ((inp.init_chg == " file" ),
247+ inp.deepks_equiv ,
248248 ld.init_pdm ,
249249 ucell.nat ,
250250 orb_.Alpha [0 ].getTotal_nchi () * ucell.nat ,
@@ -257,11 +257,11 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(UnitCell& ucell, const Input_pa
257257
258258 // 13) set occupations
259259 // tddft does not need to set occupations in the first scf
260- if (PARAM. inp .ocp && inp.esolver_type != " tddft" )
260+ if (inp.ocp && inp.esolver_type != " tddft" )
261261 {
262- elecstate::fixed_weights (PARAM. inp .ocp_kb ,
263- PARAM. inp .nbands ,
264- PARAM. inp .nelec ,
262+ elecstate::fixed_weights (inp.ocp_kb ,
263+ inp.nbands ,
264+ inp.nelec ,
265265 this ->pelec ->klist ,
266266 this ->pelec ->wg ,
267267 this ->pelec ->skip_weights );
@@ -289,7 +289,7 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(UnitCell& ucell, const Input_pa
289289 }
290290
291291 // 15) initialize rdmft, added by jghan
292- if (PARAM. inp .rdmft == true )
292+ if (inp.rdmft == true )
293293 {
294294 rdmft_solver.init (this ->GG ,
295295 this ->GK ,
@@ -300,8 +300,8 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(UnitCell& ucell, const Input_pa
300300 *(this ->pelec ),
301301 this ->orb_ ,
302302 two_center_bundle_,
303- PARAM. inp .dft_functional ,
304- PARAM. inp .rdmft_power_alpha );
303+ inp.dft_functional ,
304+ inp.rdmft_power_alpha );
305305 }
306306
307307 ModuleBase::timer::tick (" ESolver_KS_LCAO" , " before_all_runners" );
0 commit comments