Skip to content

Commit 168e9b9

Browse files
committed
Correct the name of eion_elec to elocal_pp, since the nonlocal part is not considered.
Delet the output of Ekinetic, since it only works for local pp.
1 parent 6213fdf commit 168e9b9

File tree

6 files changed

+8
-10
lines changed

6 files changed

+8
-10
lines changed

source/module_elecstate/elecstate_energy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ void ElecState::cal_energies(const int type)
311311
this->f_en.edftu = get_dftu_energy();
312312
}
313313

314-
this->f_en.eion_elec = get_local_pp_energy();
314+
this->f_en.e_local_pp = get_local_pp_energy();
315315

316316
#ifdef __DEEPKS
317317
// energy from deepks

source/module_elecstate/elecstate_energy_terms.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ double ElecState::get_dftu_energy()
4141

4242
double ElecState::get_local_pp_energy()
4343
{
44-
double local_pseudopot_energy = 0.; // electron-ion interaction energy
44+
double local_pseudopot_energy = 0.; // electron-ion interaction energy from local pseudopotential
4545
for (int is = 0; is < PARAM.inp.nspin; ++is)
4646
{
4747
local_pseudopot_energy += BlasConnector::dot(this->charge->rhopw->nrxx, this->pot->get_fixed_v(), 1, this->charge->rho[is], 1)

source/module_elecstate/elecstate_print.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,8 @@ void ElecState::print_etot(const Magnetism& magnet,
341341
energies_Ry.push_back(this->f_en.demet);
342342
titles.push_back("E_descf");
343343
energies_Ry.push_back(this->f_en.descf);
344-
titles.push_back("E_IonElec");
345-
energies_Ry.push_back(this->f_en.eion_elec);
346-
titles.push_back("E_Kinetic");
347-
energies_Ry.push_back(this->f_en.etot - this->f_en.eion_elec - this->f_en.hartree_energy - this->f_en.etxc + this->f_en.etxcc - this->f_en.ewald_energy);
344+
titles.push_back("E_LocalPP");
345+
energies_Ry.push_back(this->f_en.e_local_pp);
348346
std::string vdw_method = PARAM.inp.vdw_method;
349347
if (vdw_method == "d2") // Peize Lin add 2014-04, update 2021-03-09
350348
{

source/module_elecstate/fp_energy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ struct fenergy
4545
double escon = 0.0; ///< spin constraint energy
4646

4747
double ekinetic = 0.0; /// kinetic energy, used in OFDFT
48-
double eion_elec = 0.0; /// ion-electron interaction energy, used in OFDFT
48+
double e_local_pp = 0.0; /// ion-electron interaction energy contributed by local pp, used in OFDFT
4949

5050
double calculate_etot();
5151
double calculate_harris();

source/module_esolver/esolver_of.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ double ESolver_OF::cal_energy()
571571
}
572572
Parallel_Reduce::reduce_all(pseudopot_energy);
573573
this->pelec->f_en.ekinetic = kinetic_energy;
574-
this->pelec->f_en.eion_elec = pseudopot_energy;
574+
this->pelec->f_en.e_local_pp = pseudopot_energy;
575575
this->pelec->f_en.etot += kinetic_energy + pseudopot_energy;
576576
return this->pelec->f_en.etot;
577577
}

source/module_esolver/esolver_of_tool.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,8 @@ void ESolver_OF::print_info()
438438
energies_Ry.push_back(this->pelec->f_en.hartree_energy);
439439
titles.push_back("E_xc");
440440
energies_Ry.push_back(this->pelec->f_en.etxc - this->pelec->f_en.etxcc);
441-
titles.push_back("E_IonElec");
442-
energies_Ry.push_back(this->pelec->f_en.eion_elec);
441+
titles.push_back("E_LocalPP");
442+
energies_Ry.push_back(this->pelec->f_en.e_local_pp);
443443
titles.push_back("E_Ewald");
444444
energies_Ry.push_back(this->pelec->f_en.ewald_energy);
445445
if (this->of_kinetic_ == "tf" || this->of_kinetic_ == "tf+" || this->of_kinetic_ == "wt")

0 commit comments

Comments
 (0)