Skip to content

Commit d4023b4

Browse files
committed
Fix the wrong HF Coulomb at nspin=2 (deepmodeling#6672)
* fix the wrong HF Coulomb at nspin=2 * update the test result * add the unit for parameter abs_vavelen_range
1 parent ceca2a8 commit d4023b4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/advanced/input_files/input-main.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4291,6 +4291,7 @@ Currently supported: `RPA`, `LDA`, `PBE`, `HSE`, `HF`.
42914291
- **Type**: Real Real
42924292
- **Description**: The range of the wavelength for the absorption spectrum calculation.
42934293
- **Default**: 0.0 0.0
4294+
- **Unit**: nm
42944295

42954296
### out_wfc_lr
42964297

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:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
totexcitationenergyref 3.067058
1+
totexcitationenergyref 3.067051
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
totexcitationenergyref 2.187535
1+
totexcitationenergyref 2.187525

0 commit comments

Comments
 (0)