@@ -45,7 +45,10 @@ void RDMFT<TK, TR>::update_ion(UnitCell& ucell_in, ModulePW::PW_Basis& rho_basis
4545
4646
4747template <typename TK, typename TR>
48- void RDMFT<TK, TR>::update_elec(const ModuleBase::matrix& occ_number_in, const psi::Psi<TK>& wfc_in, const Charge* charge_in)
48+ void RDMFT<TK, TR>::update_elec(UnitCell& ucell_in,
49+ const ModuleBase::matrix& occ_number_in,
50+ const psi::Psi<TK>& wfc_in,
51+ const Charge* charge_in)
4952{
5053 // update occ_number, wg, wk_fun_occNum
5154 occ_number = (occ_number_in);
@@ -67,7 +70,7 @@ void RDMFT<TK, TR>::update_elec(const ModuleBase::matrix& occ_number_in, const p
6770}
6871
6972 // update charge
70- this ->update_charge ();
73+ this ->update_charge (ucell_in );
7174
7275 // "default" = "pbe"
7376 // if( !only_exx_type || this->cal_E_type != 1 )
@@ -87,7 +90,7 @@ void RDMFT<TK, TR>::update_elec(const ModuleBase::matrix& occ_number_in, const p
8790
8891// this code is copying from function ElecStateLCAO<TK>::psiToRho(), in elecstate_lcao.cpp
8992template <typename TK, typename TR>
90- void RDMFT<TK, TR>::update_charge()
93+ void RDMFT<TK, TR>::update_charge(UnitCell& ucell_in )
9194{
9295 if ( PARAM.inp .gamma_only )
9396 {
@@ -156,7 +159,7 @@ void RDMFT<TK, TR>::update_charge()
156159 Symmetry_rho srho;
157160 for (int is = 0 ; is < nspin; is++)
158161 {
159- srho.begin (is, *(this ->charge ), rho_basis, GlobalC::ucell .symm );
162+ srho.begin (is, *(this ->charge ), rho_basis, ucell_in .symm );
160163 }
161164
162165}
0 commit comments