Skip to content

Commit 0c14808

Browse files
committed
fix the wrong HF Coulomb at nspin=2
1 parent bd0c126 commit 0c14808

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

source/module_cell/klist.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ class K_Vectors
157157

158158
private:
159159
int nks; // number of symmetry-reduced k points in this pool(processor, up+dw)
160-
int nkstot; /// number of symmetry-reduced k points in full k mesh
161-
int nkstot_full; /// number of k points before symmetry reduction in full k mesh
160+
int nkstot; /// number of symmetry-reduced k points in full k mesh (up+dw)
161+
int nkstot_full; /// number of k points before symmetry reduction in full k mesh (none spin)
162162

163163
int nspin;
164164
bool kc_done;

source/module_ri/Exx_LRI.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ void Exx_LRI<Tdata>::init(const MPI_Comm &mpi_comm_in,
7878
case Conv_Coulomb_Pot_K::Ccp_Type::Hf:
7979
{
8080
// 4/3 * pi * Rcut^3 = V_{supercell} = V_{unitcell} * Nk
81-
const int nspin0 = (PARAM.inp.nspin==2) ? 2 : 1;
82-
const double hf_Rcut = std::pow(0.75 * this->p_kv->get_nkstot_full()/nspin0 * omega / (ModuleBase::PI), 1.0/3.0);
81+
const double hf_Rcut = std::pow(0.75 * this->p_kv->get_nkstot_full() * omega / (ModuleBase::PI), 1.0 / 3.0);
8382
return {{"hf_Rcut", hf_Rcut}};
8483
}
8584
case Conv_Coulomb_Pot_K::Ccp_Type::Erfc:

0 commit comments

Comments
 (0)