Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions source/source_esolver/esolver_ks_pw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,7 @@ void ESolver_KS_PW<T, Device>::iter_finish(UnitCell& ucell, const int istep, int
if (PARAM.inp.exx_thr_type == "energy")
{
dexx = exx_helper.cal_exx_energy(this->stp.psi_t);
}
exx_helper.set_psi(this->stp.psi_t);
if (PARAM.inp.exx_thr_type == "energy")
{
exx_helper.set_psi(this->stp.psi_t);
dexx -= exx_helper.cal_exx_energy(this->stp.psi_t);
// std::cout << "dexx = " << dexx << std::endl;
}
Expand All @@ -319,6 +316,10 @@ void ESolver_KS_PW<T, Device>::iter_finish(UnitCell& ucell, const int istep, int
conv_esolver = exx_helper.exx_after_converge(iter, conv_ene);
if (!conv_esolver)
{
if (PARAM.inp.exx_thr_type != "energy")
{
exx_helper.set_psi(this->stp.psi_t);
}
auto duration = std::chrono::high_resolution_clock::now() - start;
std::cout << " Setting Psi for EXX PW Inner Loop took "
<< std::chrono::duration_cast<std::chrono::milliseconds>(duration).count() / 1000.0 << "s"
Expand Down
Loading