Skip to content

Commit 03b35d7

Browse files
committed
update SDFT DOS
1 parent 0bcfe6d commit 03b35d7

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

source/module_hamilt_pw/hamilt_stodft/sto_dos.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,15 @@ void Sto_DOS<FPTYPE, Device>::caldos(const double sigmain, const double de, cons
240240
#endif
241241
if (GlobalV::MY_RANK == 0)
242242
{
243-
std::string dosfile = PARAM.globalv.global_out_dir + "DOS1_smear.dat";
243+
std::string dosfile = PARAM.globalv.global_out_dir + "doss1_pw.txt";
244244
ofsdos.open(dosfile.c_str());
245245
double maxerror = 0;
246246
double sum = 0;
247-
ofsdos << std::setw(8) << "## E(eV) " << std::setw(20) << "dos(eV^-1)" << std::setw(20) << "sum"
248-
<< std::setw(20) << "Error(eV^-1)" << std::endl;
247+
248+
ofsdos << ndos << " # number of points" << std::endl;
249+
ofsdos << "#" << std::setw(19) << "energy(eV)"
250+
<< std::setw(20) << "dos(eV^-1)" << std::setw(20) << "sum"
251+
<< std::setw(20) << "error(eV^-1)" << std::endl;
249252
for (int ie = 0; ie < ndos; ++ie)
250253
{
251254
double tmperror = 2.0 * std::abs(error[ie]);
@@ -255,7 +258,7 @@ void Sto_DOS<FPTYPE, Device>::caldos(const double sigmain, const double de, cons
255258
}
256259
double dos = 2.0 * (ks_dos[ie] + sto_dos[ie]) / ModuleBase::Ry_to_eV;
257260
sum += dos;
258-
ofsdos << std::setw(8) << emin + ie * de << std::setw(20) << dos << std::setw(20) << sum * de
261+
ofsdos << std::setw(20) << emin + ie * de << std::setw(20) << dos << std::setw(20) << sum * de
259262
<< std::setw(20) << tmperror << std::endl;
260263
}
261264
std::cout << std::endl;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
etotref -150.3032299594572
1+
etotref -150.303229959457
22
etotperatomref -150.3032299595
33
totaldosref 94.3632
44
pointgroupref O_h
55
spacegroupref O_h
66
nksibzref 2
7-
totaltimeref 2.95
7+
totaltimeref 2.92

tests/06_SDFT/20_PW_SDOS_MALL/result.ref

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ totaldosref 96.7733
44
pointgroupref O_h
55
spacegroupref O_h
66
nksibzref 2
7-
totaltimeref 4.44
7+
totaltimeref 4.52

0 commit comments

Comments
 (0)