Skip to content

Commit f1b2061

Browse files
authored
Enable the support of singular number of electrions in DeepKS orbital label (#5793)
1 parent c53f445 commit f1b2061

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/module_hamilt_lcao/module_deepks/LCAO_deepks_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void LCAO_Deepks_Interface<TK, TR>::out_deepks_labels(const double& etot,
6969

7070
if (PARAM.inp.deepks_bandgap)
7171
{
72-
const int nocc = PARAM.inp.nelec / 2;
72+
const int nocc = (PARAM.inp.nelec+1) / 2;
7373
std::vector<double> o_tot(nks);
7474
for (int iks = 0; iks < nks; ++iks)
7575
{

0 commit comments

Comments
 (0)