@@ -28,7 +28,8 @@ void LCAO_Deepks_Interface<TK, TR>::out_deepks_labels(const double& etot,
28
28
const psi::Psi<TK>& psi,
29
29
const elecstate::DensityMatrix<TK, double >* dm,
30
30
hamilt::HamiltLCAO<TK, TR>* p_ham,
31
- const int rank)
31
+ const int rank,
32
+ std::ostream& ofs_running)
32
33
{
33
34
ModuleBase::TITLE (" LCAO_Deepks_Interface" , " out_deepks_labels" );
34
35
ModuleBase::timer::tick (" LCAO_Deepks_Interface" , " out_deepks_labels" );
@@ -535,10 +536,16 @@ void LCAO_Deepks_Interface<TK, TR>::out_deepks_labels(const double& etot,
535
536
if (PARAM.inp .deepks_scf )
536
537
{
537
538
DeePKS_domain::cal_e_delta_band (dm->get_DMK_vector (), *h_delta, nks, nspin, ParaV, e_delta_band);
538
- std::cout << " E_delta_band = " << std::setprecision (8 ) << e_delta_band << " Ry"
539
- << " = " << std::setprecision (8 ) << e_delta_band * ModuleBase::Ry_to_eV << " eV" << std::endl;
540
- std::cout << " E_delta_NN = " << std::setprecision (8 ) << E_delta << " Ry"
541
- << " = " << std::setprecision (8 ) << E_delta * ModuleBase::Ry_to_eV << " eV" << std::endl;
539
+ if (rank == 0 )
540
+ {
541
+ ofs_running << " DeePKS Energy Correction" << std::endl;
542
+ ofs_running << " -----------------------------------------------" << std::endl;
543
+ ofs_running << " E_delta_band = " << std::setprecision (8 ) << e_delta_band << " Ry"
544
+ << " = " << std::setprecision (8 ) << e_delta_band * ModuleBase::Ry_to_eV << " eV" << std::endl;
545
+ ofs_running << " E_delta_NN = " << std::setprecision (8 ) << E_delta << " Ry"
546
+ << " = " << std::setprecision (8 ) << E_delta * ModuleBase::Ry_to_eV << " eV" << std::endl;
547
+ ofs_running << " -----------------------------------------------" << std::endl;
548
+ }
542
549
if (PARAM.inp .deepks_out_unittest )
543
550
{
544
551
LCAO_deepks_io::print_dm (nks, PARAM.globalv .nlocal , ParaV->nrow , dm->get_DMK_vector ());
0 commit comments