@@ -106,21 +106,6 @@ void ESolver_KS<T, Device>::before_all_runners(UnitCell& ucell, const Input_para
106106 // ! 1) initialize "before_all_runniers" in ESolver_FP
107107 ESolver_FP::before_all_runners (ucell, inp);
108108
109- // ! 2) setup the charge mixing parameters
110- p_chgmix->set_mixing (PARAM.inp .mixing_mode ,
111- PARAM.inp .mixing_beta ,
112- PARAM.inp .mixing_ndim ,
113- PARAM.inp .mixing_gg0 ,
114- PARAM.inp .mixing_tau ,
115- PARAM.inp .mixing_beta_mag ,
116- PARAM.inp .mixing_gg0_mag ,
117- PARAM.inp .mixing_gg0_min ,
118- PARAM.inp .mixing_angle ,
119- PARAM.inp .mixing_dmr ,
120- ucell.omega ,
121- ucell.tpiba );
122- p_chgmix->init_mixing ();
123-
124109 // / PAW Section
125110#ifdef USE_PAW
126111 if (PARAM.inp .use_paw )
@@ -201,7 +186,7 @@ void ESolver_KS<T, Device>::before_all_runners(UnitCell& ucell, const Input_para
201186#endif
202187 // / End PAW
203188
204- // ! 4 ) it has been established that
189+ // ! 3 ) it has been established that
205190 // xc_func is same for all elements, therefore
206191 // only the first one if used
207192 if (PARAM.inp .use_paw )
@@ -214,6 +199,21 @@ void ESolver_KS<T, Device>::before_all_runners(UnitCell& ucell, const Input_para
214199 }
215200 ModuleBase::GlobalFunc::DONE (GlobalV::ofs_running, " SETUP UNITCELL" );
216201
202+ // ! 4) setup the charge mixing parameters
203+ p_chgmix->set_mixing (PARAM.inp .mixing_mode ,
204+ PARAM.inp .mixing_beta ,
205+ PARAM.inp .mixing_ndim ,
206+ PARAM.inp .mixing_gg0 ,
207+ PARAM.inp .mixing_tau ,
208+ PARAM.inp .mixing_beta_mag ,
209+ PARAM.inp .mixing_gg0_mag ,
210+ PARAM.inp .mixing_gg0_min ,
211+ PARAM.inp .mixing_angle ,
212+ PARAM.inp .mixing_dmr ,
213+ ucell.omega ,
214+ ucell.tpiba );
215+ p_chgmix->init_mixing ();
216+
217217 // ! 5) ESolver depends on the Symmetry module
218218 // symmetry analysis should be performed every time the cell is changed
219219 if (ModuleSymmetry::Symmetry::symm_flag == 1 )
0 commit comments