Skip to content

Commit 3111b09

Browse files
Fix: EXX PW ACE open only when separate_loop is on
1 parent fd8224f commit 3111b09

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

source/module_hamilt_pw/hamilt_pwdft/module_exx_helper/exx_helper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void Exx_Helper<T, Device>::set_psi(psi::Psi<T, Device> *psi_)
3434
if (psi_ == nullptr)
3535
return;
3636
op_exx->set_psi(*psi_);
37-
if (PARAM.inp.exxace)
37+
if (PARAM.inp.exxace && GlobalC::exx_info.info_global.separate_loop)
3838
{
3939
op_exx->construct_ace();
4040
}

source/module_hamilt_pw/hamilt_pwdft/operator_pw/op_exx_pw.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void OperatorEXXPW<T, Device>::act(const int nbands,
145145
setmem_complex_op()(tmhpsi, 0, nbasis*nbands/npol);
146146
}
147147

148-
if (PARAM.inp.exxace)
148+
if (PARAM.inp.exxace && GlobalC::exx_info.info_global.separate_loop)
149149
{
150150
act_op_ace(nbands, nbasis, npol, tmpsi_in, tmhpsi, ngk_ik, is_first_node);
151151
}
@@ -722,7 +722,7 @@ void OperatorEXXPW<T, Device>::exx_divergence()
722722
template <typename T, typename Device>
723723
double OperatorEXXPW<T, Device>::cal_exx_energy(psi::Psi<T, Device> *psi_) const
724724
{
725-
if (PARAM.inp.exxace)
725+
if (PARAM.inp.exxace && GlobalC::exx_info.info_global.separate_loop)
726726
{
727727
return cal_exx_energy_ace(psi_);
728728
}

source/module_io/read_input_item_other.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ void ReadInput::item_others()
529529
// EXX PW by rhx0820, 2025-03-10
530530
{
531531
Input_Item item("exxace");
532-
item.annotation = "whether to perform ace calculation in exxpw, default is false";
532+
item.annotation = "whether to perform ace calculation in exxpw";
533533
read_sync_bool(input.exxace);
534534
this->add_item(item);
535535
}

0 commit comments

Comments
 (0)