@@ -221,8 +221,6 @@ void ESolver_KS_PW<T, Device>::before_all_runners(UnitCell& ucell, const Input_p
221221 }
222222
223223
224- // EXX Todo: Fix the control flow
225- #ifdef __EXX
226224 // 10) initialize exx pw
227225 if (PARAM.inp .calculation == " scf"
228226 || PARAM.inp .calculation == " relax"
@@ -241,7 +239,6 @@ void ESolver_KS_PW<T, Device>::before_all_runners(UnitCell& ucell, const Input_p
241239 exx_helper.set_psi (this ->kspw_psi [0 ]);
242240 }
243241 }
244- #endif
245242
246243}
247244
@@ -276,7 +273,6 @@ void ESolver_KS_PW<T, Device>::before_scf(UnitCell& ucell, const int istep)
276273 // allocate HamiltPW
277274 this ->allocate_hamilt (ucell);
278275
279- #ifdef __EXX
280276 if (PARAM.inp .calculation == " scf"
281277 || PARAM.inp .calculation == " relax"
282278 || PARAM.inp .calculation == " cell-relax"
@@ -289,7 +285,6 @@ void ESolver_KS_PW<T, Device>::before_scf(UnitCell& ucell, const int istep)
289285 }
290286
291287 }
292- #endif
293288
294289
295290 // ----------------------------------------------------------
@@ -538,12 +533,10 @@ void ESolver_KS_PW<T, Device>::update_pot(UnitCell& ucell, const int istep, cons
538533template <typename T, typename Device>
539534void ESolver_KS_PW<T, Device>::iter_finish(UnitCell& ucell, const int istep, int & iter, bool & conv_esolver)
540535{
541- #ifdef __EXX
542536 if (GlobalC::exx_info.info_global .cal_exx && !exx_helper.first_iter )
543537 {
544538 this ->pelec ->set_exx (exx_helper.cal_exx_energy (this ->ctx , this ->kspw_psi [0 ], this ->pw_wfc , this ->pw_rho , &ucell, &this ->kv ));
545539 }
546- #endif
547540
548541 // deband is calculated from "output" charge density calculated
549542 // in sum_band
@@ -563,20 +556,19 @@ void ESolver_KS_PW<T, Device>::iter_finish(UnitCell& ucell, const int istep, int
563556 this ->ppcell .cal_effective_D (veff, this ->pw_rhod , ucell);
564557 }
565558
566- #ifdef __EXX
567559 if (GlobalC::exx_info.info_global .cal_exx )
568560 {
569561 if (GlobalC::exx_info.info_global .separate_loop )
570562 {
571563 if (conv_esolver)
572564 {
573- std::cout << " setting psi for exx inner loop" << std::endl;
574565 exx_helper.set_psi (this ->kspw_psi [0 ]);
575566
576567 conv_esolver = exx_helper.exx_after_converge (iter);
577568
578569 if (!conv_esolver)
579570 {
571+ std::cout << " Setting Psi for EXX PW Inner Loop" << std::endl;
580572 exx_helper.first_iter = false ;
581573 XC_Functional::set_xc_type (ucell.atoms [0 ].ncpp .xc_func );
582574 update_pot (ucell, istep, iter, conv_esolver);
@@ -590,7 +582,6 @@ void ESolver_KS_PW<T, Device>::iter_finish(UnitCell& ucell, const int istep, int
590582 }
591583
592584 }
593- #endif // __EXX
594585
595586 // 3) Print out electronic wavefunctions in pw basis
596587 if (PARAM.inp .out_wfc_pw == 1 || PARAM.inp .out_wfc_pw == 2 )
0 commit comments