@@ -28,7 +28,8 @@ void LCAO_Deepks_Interface<TK, TR>::out_deepks_labels(const double& etot,
2828 const psi::Psi<TK>& psi,
2929 const elecstate::DensityMatrix<TK, double >* dm,
3030 hamilt::HamiltLCAO<TK, TR>* p_ham,
31- const int rank)
31+ const int rank,
32+ std::ostream& ofs_running)
3233{
3334 ModuleBase::TITLE (" LCAO_Deepks_Interface" , " out_deepks_labels" );
3435 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,
535536 if (PARAM.inp .deepks_scf )
536537 {
537538 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+ }
542549 if (PARAM.inp .deepks_out_unittest )
543550 {
544551 LCAO_deepks_io::print_dm (nks, PARAM.globalv .nlocal , ParaV->nrow , dm->get_DMK_vector ());
0 commit comments