Skip to content

Commit 10e51bb

Browse files
committed
small updates
1 parent dcaaa5a commit 10e51bb

File tree

3 files changed

+23
-13
lines changed

3 files changed

+23
-13
lines changed

source/module_esolver/esolver_ks_lcao.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(UnitCell& ucell, const Input_pa
160160
#ifdef __EXX
161161
// 5) initialize exx
162162
// PLEASE simplify the Exx_Global interface
163-
if (PARAM.inp.calculation == "scf" || PARAM.inp.calculation == "relax" || PARAM.inp.calculation == "cell-relax"
163+
if (PARAM.inp.calculation == "scf"
164+
|| PARAM.inp.calculation == "relax"
165+
|| PARAM.inp.calculation == "cell-relax"
164166
|| PARAM.inp.calculation == "md")
165167
{
166168
if (GlobalC::exx_info.info_global.cal_exx)

source/module_esolver/lcao_others.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,16 @@
2121
#include "module_base/formatter.h"
2222
#include "module_elecstate/elecstate_lcao.h"
2323
#include "module_elecstate/module_dm/cal_dm_psi.h"
24-
#include "module_hamilt_general/module_ewald/H_Ewald_pw.h"
25-
#include "module_hamilt_general/module_vdw/vdw.h"
24+
2625
#include "module_hamilt_lcao/hamilt_lcaodft/LCAO_domain.h"
2726
#include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.h"
2827
#include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.h"
2928
#include "module_hamilt_lcao/module_deltaspin/spin_constrain.h"
29+
3030
#include "module_io/read_wfc_nao.h"
3131
#include "module_io/write_elecstat_pot.h"
3232
#include "module_io/write_wfc_nao.h"
33+
3334
#ifdef __EXX
3435
#include "module_io/restart_exx_csr.h"
3536
#endif
@@ -263,6 +264,7 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
263264
this->psi,
264265
this->pelec);
265266
}
267+
266268
//=========================================================
267269
// cal_ux should be called before init_scf because
268270
// the direction of ux is used in noncoline_rho
@@ -271,14 +273,15 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
271273

272274
// pelec should be initialized before these calculations
273275
this->pelec->init_scf(istep, ucell, this->Pgrid, this->sf.strucFac, this->locpp.numeric, ucell.symm);
276+
274277
// self consistent calculations for electronic ground state
275278
if (cal_type == "get_pchg")
276279
{
277280
std::cout << FmtCore::format("\n * * * * * *\n << Start %s.\n", "getting partial charge");
278-
IState_Charge ISC(this->psi, &(this->pv));
281+
IState_Charge chr_i(this->psi, &(this->pv));
279282
if (PARAM.globalv.gamma_only_local)
280283
{
281-
ISC.begin(this->GG,
284+
chr_i.begin(this->GG,
282285
this->chr.rho,
283286
this->pelec->wg,
284287
this->pelec->eferm.get_all_ef(),
@@ -306,7 +309,7 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
306309
}
307310
else
308311
{
309-
ISC.begin(this->GK,
312+
chr_i.begin(this->GK,
310313
this->chr.rho,
311314
this->chr.rhog,
312315
this->pelec->wg,
@@ -342,10 +345,10 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
342345
else if (cal_type == "get_wf")
343346
{
344347
std::cout << FmtCore::format("\n * * * * * *\n << Start %s.\n", "getting wave function");
345-
IState_Envelope IEP(this->pelec);
348+
IState_Envelope wavefunc(this->pelec);
346349
if (PARAM.globalv.gamma_only_local)
347350
{
348-
IEP.begin(ucell,
351+
wavefunc.begin(ucell,
349352
this->psi,
350353
this->pw_rhod,
351354
this->pw_wfc,
@@ -367,7 +370,7 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
367370
}
368371
else
369372
{
370-
IEP.begin(ucell,
373+
wavefunc.begin(ucell,
371374
this->psi,
372375
this->pw_rhod,
373376
this->pw_wfc,
@@ -391,7 +394,7 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
391394
}
392395
else
393396
{
394-
ModuleBase::WARNING_QUIT("ESolver_KS_LCAO<TK, TR>::others", "CALCULATION type not supported");
397+
ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::others", "CALCULATION type not supported");
395398
}
396399

397400
ModuleBase::timer::tick("ESolver_KS_LCAO", "others");

source/module_esolver/pw_others.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,18 @@ void ESolver_KS_PW<T, Device>::others(UnitCell& ucell, const int istep)
5858

5959
const std::string cal_type = PARAM.inp.calculation;
6060

61-
if (cal_type == "test_memory") {
61+
if (cal_type == "test_memory")
62+
{
6263
Cal_Test::test_memory(ucell.nat,
6364
ucell.ntype,
6465
ucell.GGT,
6566
this->pw_rho,
6667
this->pw_wfc,
6768
this->p_chgmix->get_mixing_mode(),
6869
this->p_chgmix->get_mixing_ndim());
69-
} else if (cal_type == "gen_bessel") {
70+
}
71+
else if (cal_type == "gen_bessel")
72+
{
7073
Numerical_Descriptor nc;
7174
nc.output_descriptor(ucell,
7275
this->psi[0],
@@ -75,7 +78,9 @@ void ESolver_KS_PW<T, Device>::others(UnitCell& ucell, const int istep)
7578
PARAM.inp.bessel_descriptor_tolerence,
7679
this->kv.get_nks());
7780
ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "GENERATE DESCRIPTOR FOR DEEPKS");
78-
} else {
81+
}
82+
else
83+
{
7984
ModuleBase::WARNING_QUIT("ESolver_KS_PW::others",
8085
"CALCULATION type not supported");
8186
}

0 commit comments

Comments
 (0)