Skip to content

Commit 9d106fe

Browse files
committed
Fix a bug.
1 parent 7992e1e commit 9d106fe

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,14 @@ void Force_LCAO<double>::ftable(const bool isforce,
272272
#ifdef __DEEPKS
273273
if (PARAM.inp.deepks_scf && PARAM.inp.deepks_out_unittest)
274274
{
275-
DeePKS_domain::check_f_delta(ucell.nat, fvnl_dalpha, svnl_dalpha);
275+
std::ofstream ofs_f("F_delta.dat");
276+
std::ofstream ofs_s("stress_delta.dat");
277+
ofs_f << std::setprecision(10);
278+
ofs_s << std::setprecision(10);
279+
fvnl_dalpha.print(ofs_f);
280+
ofs_f.close();
281+
svnl_dalpha.print(ofs_s);
282+
ofs_s.close();
276283
}
277284
#endif
278285

source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,14 @@ void Force_LCAO<std::complex<double>>::ftable(const bool isforce,
312312
#ifdef __DEEPKS
313313
if (PARAM.inp.deepks_scf && PARAM.inp.deepks_out_unittest)
314314
{
315-
DeePKS_domain::check_f_delta(ucell.nat, fvnl_dalpha, svnl_dalpha);
315+
std::ofstream ofs_f("F_delta.dat");
316+
std::ofstream ofs_s("stress_delta.dat");
317+
ofs_f << std::setprecision(10);
318+
ofs_s << std::setprecision(10);
319+
fvnl_dalpha.print(ofs_f);
320+
ofs_f.close();
321+
svnl_dalpha.print(ofs_s);
322+
ofs_s.close();
316323
}
317324
#endif
318325

0 commit comments

Comments
 (0)