Skip to content

Commit 04a7f00

Browse files
committed
clang-format change.
1 parent 188c3f1 commit 04a7f00

File tree

4 files changed

+36
-21
lines changed

4 files changed

+36
-21
lines changed

source/module_esolver/lcao_before_scf.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,13 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(UnitCell& ucell, const int istep)
227227

228228
if (PARAM.inp.deepks_out_unittest)
229229
{
230-
DeePKS_domain::check_phialpha(PARAM.inp.cal_force, ucell, orb_, this->gd, pv, this->ld.phialpha, GlobalV::MY_RANK);
230+
DeePKS_domain::check_phialpha(PARAM.inp.cal_force,
231+
ucell,
232+
orb_,
233+
this->gd,
234+
pv,
235+
this->ld.phialpha,
236+
GlobalV::MY_RANK);
231237
}
232238
}
233239
#endif

source/module_esolver/lcao_others.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,13 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
233233

234234
if (PARAM.inp.deepks_out_unittest)
235235
{
236-
DeePKS_domain::check_phialpha(PARAM.inp.cal_force, ucell, orb_, this->gd, pv, this->ld.phialpha, GlobalV::MY_RANK);
236+
DeePKS_domain::check_phialpha(PARAM.inp.cal_force,
237+
ucell,
238+
orb_,
239+
this->gd,
240+
pv,
241+
this->ld.phialpha,
242+
GlobalV::MY_RANK);
237243
}
238244
}
239245
#endif

source/module_hamilt_lcao/module_deepks/deepks_basic.cpp

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
#ifdef __DEEPKS
66
#include "deepks_basic.h"
7+
8+
#include "module_base/timer.h"
79
#include "module_parameter/parameter.h"
810

911
// d(Descriptor) / d(projected density matrix)
@@ -126,14 +128,14 @@ inline void generate_py_files(const int lmaxd, const int nmaxd, const std::strin
126128
}
127129

128130
void DeePKS_domain::cal_edelta_gedm_equiv(const int nat,
129-
const int lmaxd,
130-
const int nmaxd,
131-
const int inlmax,
132-
const int des_per_atom,
133-
const int* inl_l,
134-
const std::vector<torch::Tensor>& descriptor,
135-
double** gedm,
136-
double& E_delta)
131+
const int lmaxd,
132+
const int nmaxd,
133+
const int inlmax,
134+
const int des_per_atom,
135+
const int* inl_l,
136+
const std::vector<torch::Tensor>& descriptor,
137+
double** gedm,
138+
double& E_delta)
137139
{
138140
ModuleBase::TITLE("DeePKS_domain", "cal_edelta_gedm_equiv");
139141
ModuleBase::timer::tick("DeePKS_domain", "cal_edelta_gedm_equiv");
@@ -170,16 +172,16 @@ void DeePKS_domain::cal_edelta_gedm_equiv(const int nat,
170172
// obtain from the machine learning model dE_delta/dDescriptor
171173
// E_delta is also calculated here
172174
void DeePKS_domain::cal_edelta_gedm(const int nat,
173-
const int lmaxd,
174-
const int nmaxd,
175-
const int inlmax,
176-
const int des_per_atom,
177-
const int* inl_l,
178-
const std::vector<torch::Tensor>& descriptor,
179-
const std::vector<torch::Tensor>& pdm,
180-
torch::jit::script::Module& model_deepks,
181-
double** gedm,
182-
double& E_delta)
175+
const int lmaxd,
176+
const int nmaxd,
177+
const int inlmax,
178+
const int des_per_atom,
179+
const int* inl_l,
180+
const std::vector<torch::Tensor>& descriptor,
181+
const std::vector<torch::Tensor>& pdm,
182+
torch::jit::script::Module& model_deepks,
183+
double** gedm,
184+
double& E_delta)
183185
{
184186
if (PARAM.inp.deepks_equiv)
185187
{

source/module_hamilt_lcao/module_deepks/deepks_phialpha.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ void DeePKS_domain::allocate_phialpha(const bool& cal_deri,
7272
atom_begin_row[i] = -1;
7373
atom_begin_col[i] = pv->atom_begin_col[i];
7474
}
75-
hamilt::AtomPair<double> pair(iat, ibt, R_index.x, R_index.y, R_index.z, atom_begin_row, atom_begin_col, ucell.nat);
75+
hamilt::AtomPair<double>
76+
pair(iat, ibt, R_index.x, R_index.y, R_index.z, atom_begin_row, atom_begin_col, ucell.nat);
7677
// Notice: in AtomPair, the usage is set_size(ncol, nrow)
7778
pair.set_size(nw_alpha, atom1->nw * PARAM.globalv.npol);
7879
phialpha[0]->insert_pair(pair);

0 commit comments

Comments
 (0)