@@ -55,25 +55,25 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(BaseCell& basecell, const Input
5555 ModuleBase::TITLE (" ESolver_KS_LCAO" , " before_all_runners" );
5656 ModuleBase::timer::start (" ESolver_KS_LCAO" , " before_all_runners" );
5757
58- // 0) init EXX - moved from constructor to ensure exx_info_.info_global is already set
59- this ->exx_nao .init (ucell, this ->exx_info_ );
60-
61- // 1) before_all_runners in ESolver_KS
58+ // 1) before_all_runners in ESolver_KS (includes init_exx_info)
6259 ESolver_KS::before_all_runners (ucell, inp);
6360
64- // 2) autoset nbands in ElecState before init_basis (for Psi 2d division)
61+ // 2) init EXX - must be after ESolver_KS::before_all_runners to ensure exx_info_ is initialized
62+ this ->exx_nao .init (ucell, this ->exx_info_ );
63+
64+ // 3) autoset nbands in ElecState before init_basis (for Psi 2d division)
6565 if (this ->pelec == nullptr )
6666 {
6767 // TK stands for double and std::complex<double>?
6868 this ->pelec = new elecstate::ElecStateLCAO<TK >(&(this ->chr ), &(this ->kv ),
6969 this ->kv .get_nks (), this ->pw_big );
7070 }
7171
72- // 3 ) read LCAO orbitals/projectors and construct the interpolation tables.
72+ // 4 ) read LCAO orbitals/projectors and construct the interpolation tables.
7373 LCAO_domain::init_basis_lcao (this ->pv , inp.onsite_radius , inp.lcao_ecut ,
7474 inp.lcao_dk , inp.lcao_dr , inp.lcao_rmax , ucell, two_center_bundle_, orb_);
7575
76- // 4 ) setup EXX calculations
76+ // 5 ) setup EXX calculations
7777 if (inp.calculation == " gen_opt_abfs" )
7878 {
7979#ifdef __EXX
0 commit comments