Skip to content

Commit 6876618

Browse files
committed
update documents about KPT.info
1 parent 19c9f72 commit 6876618

File tree

4 files changed

+19
-30
lines changed

4 files changed

+19
-30
lines changed

docs/quick_start/output.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ For a complete list of input parameters, please consult this [instruction](../ad
1414

1515
`running_scf.log` contains information on nearly all function calls made during the execution of ABACUS.
1616

17-
## *KPT*
17+
## *KPT.info*
1818

1919
This file contains the information of all generated k-points, as well as the list of k-points actually used for calculations after considering symmetry.
2020

@@ -39,4 +39,4 @@ ABACUS generates a `.cif` format structure file based on the input file `STRU`,
3939

4040
## *warning.log*
4141

42-
The file contains all the warning messages generated during the ABACUS run.
42+
The file contains all the warning messages generated during the ABACUS run.

source/module_cell/klist.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ void K_Vectors::set(const UnitCell& ucell,
134134
{
135135
// output kpoints file
136136
std::stringstream skpt;
137-
skpt << PARAM.globalv.global_readin_dir << "kpoints";
137+
skpt << PARAM.globalv.global_out_dir << "KPT.info"; //mohan modified 20250325
138138
std::ofstream ofkpt(skpt.str().c_str()); // clear kpoints
139139
ofkpt << skpt2 << skpt1;
140140
ofkpt.close();

source/module_elecstate/module_charge/charge_init.cpp

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ void Charge::init_rho(elecstate::efermi& eferm_iout,
4040
bool read_kin_error = false;
4141
if (PARAM.inp.init_chg == "file" || PARAM.inp.init_chg == "auto")
4242
{
43-
GlobalV::ofs_running << " try to read charge from file" << std::endl;
43+
GlobalV::ofs_running << " Read electron density from file" << std::endl;
4444

4545
// try to read charge from binary file first, which is the same as QE
4646
// liuyu 2023-12-05
4747
std::stringstream binary;
4848
binary << PARAM.globalv.global_readin_dir << PARAM.inp.suffix + "-CHARGE-DENSITY.restart";
4949
if (ModuleIO::read_rhog(binary.str(), rhopw, rhog))
5050
{
51-
GlobalV::ofs_running << " Read in the charge density: " << binary.str() << std::endl;
51+
GlobalV::ofs_running << " Read electron density from file: " << binary.str() << std::endl;
5252
for (int is = 0; is < PARAM.inp.nspin; ++is)
5353
{
5454
rhopw->recip2real(rhog[is], rho[is]);
@@ -67,24 +67,24 @@ void Charge::init_rho(elecstate::efermi& eferm_iout,
6767
this->rho[is],
6868
ucell.nat))
6969
{
70-
GlobalV::ofs_running << " Read in the charge density: " << ssc.str() << std::endl;
70+
GlobalV::ofs_running << " Read electron density from file: " << ssc.str() << std::endl;
7171
}
7272
else if (is > 0) // nspin=2 or 4
7373
{
7474
if (is == 1) // failed at the second spin
7575
{
76-
std::cout << "Incomplete charge density file!" << std::endl;
76+
std::cout << "Incomplete electron density file!" << std::endl;
7777
read_error = true;
7878
break;
7979
}
8080
else if (is == 2) // read 2 files when nspin=4
8181
{
82-
GlobalV::ofs_running << " Didn't read in the charge density but would rearrange it later. "
82+
GlobalV::ofs_running << " Didn't read in the electron density but would rearrange it later. "
8383
<< std::endl;
8484
}
8585
else if (is == 3) // read 2 files when nspin=4
8686
{
87-
GlobalV::ofs_running << " rearrange charge density " << std::endl;
87+
GlobalV::ofs_running << " rearrange electron density " << std::endl;
8888
for (int ir = 0; ir < this->rhopw->nrxx; ir++)
8989
{
9090
this->rho[3][ir] = this->rho[0][ir] - this->rho[1][ir];
@@ -229,7 +229,7 @@ void Charge::init_rho(elecstate::efermi& eferm_iout,
229229
this->rho[is],
230230
ucell.nat))
231231
{
232-
GlobalV::ofs_running << " Read in the charge density: " << ssc.str() << std::endl;
232+
GlobalV::ofs_running << " Read in the electron density: " << ssc.str() << std::endl;
233233
}
234234
}
235235
}
@@ -262,17 +262,6 @@ void Charge::set_rho_core(const UnitCell& ucell,
262262
ModuleBase::TITLE("Charge","set_rho_core");
263263
ModuleBase::timer::tick("Charge","set_rho_core");
264264

265-
// double eps = 1.e-10;
266-
//----------------------------------------------------------
267-
// LOCAL VARIABLES :
268-
// counter on mesh points
269-
// counter on atomic types
270-
// counter on g vectors
271-
//----------------------------------------------------------
272-
// int ir = 0;
273-
// int it = 0;
274-
// int ig = 0;
275-
276265
bool bl = false;
277266
for (int it = 0; it<ucell.ntype; it++)
278267
{
@@ -379,6 +368,7 @@ void Charge::set_rho_core_paw()
379368
#endif
380369
}
381370

371+
382372
void Charge::non_linear_core_correction
383373
(
384374
const bool &numeric,
@@ -458,4 +448,4 @@ void Charge::non_linear_core_correction
458448
ModuleBase::TRY_OMP_PARALLEL(kernel);
459449

460450
return;
461-
}
451+
}

tests/integrate/107_PW_CHG_mismatch/INPUT

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
11
INPUT_PARAMETERS
22
#Parameters (1.General)
33
suffix autotest
4-
calculation scf
4+
calculation scf
55

6-
nspin 2
6+
nspin 2
77
nbands 6
88
symmetry 1
9-
pseudo_dir ../../PP_ORB
9+
pseudo_dir ../../PP_ORB
1010

11-
init_chg file
12-
read_file_dir ./
11+
init_chg file
12+
read_file_dir ./
1313

1414
#Parameters (2.Iteration)
1515
ecutwfc 40
1616
scf_thr 1e-9
1717
scf_nmax 100
1818

19-
2019
#Parameters (3.Basis)
2120
basis_type pw
2221

2322
#Parameters (4.Smearing)
24-
smearing_method gauss
25-
smearing_sigma 0.002
23+
smearing_method gauss
24+
smearing_sigma 0.002
2625

2726
#Parameters (5.Mixing)
2827
mixing_type broyden

0 commit comments

Comments
 (0)