@@ -179,7 +179,7 @@ void ESolver_KS_PW<T, Device>::before_all_runners(UnitCell& ucell, const Input_p
179179 this ->pelec ->pot = new elecstate::Potential (this ->pw_rhod ,
180180 this ->pw_rho ,
181181 &ucell,
182- &this ->ppcell .vloc ,
182+ &this ->locpp .vloc ,
183183 &(this ->sf ),
184184 &(this ->solvent ),
185185 &(this ->pelec ->f_en .etxc ),
@@ -206,14 +206,12 @@ void ESolver_KS_PW<T, Device>::before_all_runners(UnitCell& ucell, const Input_p
206206 delete this ->psi ;
207207 }
208208
209- // ! init pseudopotential
210- this ->ppcell .init (ucell,&this ->sf , this ->pw_wfc );
211-
212209 // ! initalize local pseudopotential
213- this ->ppcell .init_vloc (ucell,this ->pw_rhod );
210+ this ->locpp .init_vloc (ucell, this ->pw_rhod );
214211 ModuleBase::GlobalFunc::DONE (GlobalV::ofs_running, " LOCAL POTENTIAL" );
215212
216213 // ! Initalize non-local pseudopotential
214+ this ->ppcell .init (ucell, &this ->sf , this ->pw_wfc );
217215 this ->ppcell .init_vnl (ucell, this ->pw_rhod );
218216 ModuleBase::GlobalFunc::DONE (GlobalV::ofs_running, " NON-LOCAL POTENTIAL" );
219217
@@ -308,7 +306,7 @@ void ESolver_KS_PW<T, Device>::before_scf(UnitCell& ucell, const int istep)
308306 elecstate::cal_ux (ucell);
309307
310308 // ! calculate the total local pseudopotential in real space
311- this ->pelec ->init_scf (istep, ucell,this ->sf .strucFac , this ->ppcell .numeric , ucell.symm , (void *)this ->pw_wfc );
309+ this ->pelec ->init_scf (istep, ucell, this ->sf .strucFac , this ->locpp .numeric , ucell.symm , (void *)this ->pw_wfc );
312310
313311 // ! output the initial charge density
314312 if (PARAM.inp .out_chg [0 ] == 2 )
@@ -780,7 +778,7 @@ void ESolver_KS_PW<T, Device>::cal_force(UnitCell& ucell, ModuleBase::matrix& fo
780778 &ucell.symm ,
781779 &this ->sf ,
782780 this ->solvent ,
783- &this ->ppcell ,
781+ &this ->locpp ,
784782 &this ->ppcell ,
785783 &this ->kv ,
786784 this ->pw_wfc ,
@@ -802,6 +800,7 @@ void ESolver_KS_PW<T, Device>::cal_stress(UnitCell& ucell, ModuleBase::matrix& s
802800 : reinterpret_cast <psi::Psi<std::complex <double >, Device>*>(this ->kspw_psi );
803801 ss.cal_stress (stress,
804802 ucell,
803+ this ->locpp ,
805804 this ->ppcell ,
806805 this ->pw_rhod ,
807806 &ucell.symm ,
0 commit comments