Skip to content

Commit

Permalink
[pre-commit.ci lite] apply automatic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci-lite[bot] authored Jan 23, 2025
1 parent 80e3f22 commit de75fda
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions source/module_elecstate/occupy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,12 @@ void Occupy::iweights(
{
assert(is < 2);
double degspin = 2.0;
if (PARAM.inp.nspin == 4)
if (PARAM.inp.nspin == 4) {
degspin = 1.0;
if (is != -1)
}
if (is != -1) {
degspin = 1.0;
}

double ib_mind = nelec / degspin;
int ib_min = std::ceil(ib_mind);
Expand Down Expand Up @@ -224,8 +226,9 @@ void Occupy::gweights(const int nks,
for (int ik = 0; ik < nks; ik++)
{
// mohan add 2011-04-03
if (is != -1 && is != isk[ik])
if (is != -1 && is != isk[ik]) {
continue;
}

for (int ib = 0; ib < PARAM.inp.nbands; ib++)
{
Expand Down Expand Up @@ -399,8 +402,9 @@ double Occupy::sumkg(const ModuleBase::matrix& ekb,
double sum2 = 0.0;
for (int ik = 0; ik < nks; ik++)
{
if (is != -1 && is != isk[ik])
if (is != -1 && is != isk[ik]) {
continue;
}

double sum1 = 0.0;
for (int ib = 0; ib < nband; ib++)
Expand Down

0 comments on commit de75fda

Please sign in to comment.