Skip to content

Commit a84dcbb

Browse files
Mod
1 parent 82d9bfe commit a84dcbb

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

source/source_esolver/esolver_ks_pw.cpp

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -265,20 +265,7 @@ void ESolver_KS_PW<T, Device>::before_scf(UnitCell& ucell, const int istep)
265265
this->allocate_hamilt(ucell);
266266

267267
//----------------------------------------------------------
268-
//! 4) Exx calculations
269-
//----------------------------------------------------------
270-
if (PARAM.inp.calculation == "scf" || PARAM.inp.calculation == "relax" || PARAM.inp.calculation == "cell-relax"
271-
|| PARAM.inp.calculation == "md")
272-
{
273-
if (GlobalC::exx_info.info_global.cal_exx && PARAM.inp.basis_type == "pw")
274-
{
275-
auto hamilt_pw = reinterpret_cast<hamilt::HamiltPW<T, Device>*>(this->p_hamilt);
276-
hamilt_pw->set_exx_helper(exx_helper);
277-
}
278-
}
279-
280-
//----------------------------------------------------------
281-
//! 4.5) DFT-1/2 calculations, sep potential need to generate before effective potential calculation
268+
//! 4) DFT-1/2 calculations, sep potential need to generate before effective potential calculation
282269
//----------------------------------------------------------
283270
if (PARAM.inp.dfthalf_type > 0)
284271
{
@@ -383,6 +370,8 @@ void ESolver_KS_PW<T, Device>::before_scf(UnitCell& ucell, const int istep)
383370
{
384371
if (GlobalC::exx_info.info_global.cal_exx && PARAM.inp.basis_type == "pw")
385372
{
373+
auto hamilt_pw = reinterpret_cast<hamilt::HamiltPW<T, Device>*>(this->p_hamilt);
374+
hamilt_pw->set_exx_helper(exx_helper);
386375
exx_helper.set_psi(kspw_psi);
387376
}
388377
}

source/source_pw/module_pwdft/operator_pw/op_exx_pw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class OperatorEXXPW : public OperatorPW<T, Device>
5353

5454
void construct_ace() const;
5555

56-
bool first_iter = false;
56+
bool first_iter = true;
5757

5858
private:
5959
const int* isk = nullptr;

0 commit comments

Comments
 (0)