Skip to content

Commit 9fc9671

Browse files
committed
Fix : occupied band should be number of electrons instead of half
1 parent 7791c4f commit 9fc9671

File tree

2 files changed

+1
-0
lines changed

2 files changed

+1
-0
lines changed

source/src_pw/charge.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,7 @@ void Charge::cal_nelec(void)
12201220
// calculate number of bands (setup.f90)
12211221
//=======================================
12221222
double occupied_bands = static_cast<double>(nelec/ModuleBase::DEGSPIN);
1223+
if(GlobalV::LSPINORB==1) occupied_bands = static_cast<double>(nelec);
12231224

12241225
if( (occupied_bands - std::floor(occupied_bands)) > 0.0 )
12251226
{
-12 KB
Binary file not shown.

0 commit comments

Comments
 (0)