Skip to content

Commit 33a983b

Browse files
committed
fix a bug sdft did not read in emin_sto/emax_sto
1 parent 4a3a5a9 commit 33a983b

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

source/input.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void Input::Default(void)
140140
pw_seed = 1;
141141
nche_sto = 0;
142142
seed_sto = 0;
143-
nstogroup = 1;
143+
bndpar = 1;
144144
kpar = 1;
145145
berry_phase = false;
146146
gdir = 3;
@@ -552,9 +552,9 @@ bool Input::Read(const std::string &fn)
552552
{
553553
read_value(ifs, emin_sto);
554554
}
555-
else if (strcmp("nstogroup", word) == 0)
555+
else if (strcmp("bndpar", word) == 0)
556556
{
557-
read_value(ifs, nstogroup);
557+
read_value(ifs, bndpar);
558558
}
559559
else if (strcmp("kpar", word) == 0) // number of pools
560560
{
@@ -1798,7 +1798,7 @@ void Input::Default_2(void) // jiyy add 2019-08-04
17981798
vdw_radius = "95";
17991799
}
18001800
}
1801-
if(calculation.substr(0,3) != "sto") nstogroup = 1;
1801+
if(calculation.substr(0,3) != "sto") bndpar = 1;
18021802
}
18031803
#ifdef __MPI
18041804
void Input::Bcast()
@@ -1829,7 +1829,7 @@ void Input::Bcast()
18291829
Parallel_Common::bcast_int(pw_seed);
18301830
Parallel_Common::bcast_double(emax_sto);
18311831
Parallel_Common::bcast_double(emin_sto);
1832-
Parallel_Common::bcast_int(nstogroup);
1832+
Parallel_Common::bcast_int(bndpar);
18331833
Parallel_Common::bcast_int(kpar);
18341834
Parallel_Common::bcast_bool(berry_phase);
18351835
Parallel_Common::bcast_int(gdir);

source/input.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class Input
6868
int seed_sto; // random seed for sDFT
6969
double emax_sto; // Emax & Emin to normalize H
7070
double emin_sto;
71-
int nstogroup;
71+
int bndpar; //parallel for stochastic/deterministic bands
7272

7373
//==========================================================
7474
// electrons / spin

source/input_conv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void Input_Conv::Convert(void)
6161
GlobalV::KPAR = temp_nproc;
6262
#else
6363
GlobalV::KPAR = INPUT.kpar;
64-
GlobalV::NSTOGROUP = INPUT.nstogroup;
64+
GlobalV::NSTOGROUP = INPUT.bndpar;
6565
#endif
6666
GlobalV::CALCULATION = INPUT.calculation;
6767

source/src_pw/sto_hchi.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ double Stochastic_hchi::Emax;
1212

1313
Stochastic_hchi::Stochastic_hchi()
1414
{
15+
Stochastic_hchi:: Emin = INPUT.emin_sto;
16+
Stochastic_hchi:: Emax = INPUT.emax_sto;
1517
}
1618

1719
Stochastic_hchi::~Stochastic_hchi()

0 commit comments

Comments
 (0)