@@ -117,8 +117,9 @@ void RDMFT<TK, TR>::init(Gint_Gamma& GG_in, Gint_k& GK_in, Parallel_Orbitals& Pa
117117 // para_Eij.blacs_ctxt = ParaV->blacs_ctxt;
118118 // para_Eij.set_local2global( GlobalV::NBANDS, GlobalV::NBANDS, ofs_running, ofs_warning );
119119 // para_Eij.set_desc( GlobalV::NBANDS, GlobalV::NBANDS, para_Eij.get_row_size(), false );
120-
120+ # ifdef __MPI
121121 para_Eij.set (nbands_total, nbands_total, ParaV->nb , ParaV->blacs_ctxt ); // maybe in default, PARAM.inp.nb2d = 0, can't be used
122+ #endif
122123 // para_Eij.init(nbands_total, nbands_total, PARAM.inp.nb2d, MPI_COMM_WORLD);
123124 // // learn from "module_hamilt_lcao/hamilt_lcaodft/LCAO_init_basis.cpp"
124125
@@ -892,29 +893,33 @@ void RDMFT<TK, TR>::cal_Energy(const int cal_type)
892893 // }
893894 }
894895
895- // print results
896- std::cout << " \n\n from class RDMFT: \n XC_fun: " << XC_func_rdmft << std::endl;
896+ // // print results
897+ // std::cout << "\n\nfrom class RDMFT: \nXC_fun: " << XC_func_rdmft << std::endl;
898+ // #ifdef __EXX
899+ // if( GlobalC::exx_info.info_global.cal_exx ) std::cout << "alpha_power: " << alpha_power << std::endl;
900+ // #endif
901+ // std::cout << std::fixed << std::setprecision(10)
902+ // << "******\nE(TV + Hartree + XC) by RDMFT: " << E_RDMFT[3]
903+ // << "\n\nE_TV_RDMFT: " << E_RDMFT[0]
904+ // << "\nE_hartree_RDMFT: " << E_RDMFT[1]
905+ // << "\nExc_" << XC_func_rdmft << "_RDMFT: " << E_RDMFT[2]
906+ // << "\nE_Ewald: " << E_Ewald
907+ // << "\nE_entropy(-TS): " << E_entropy
908+ // << "\nE_descf: " << E_descf
909+ // << "\n\nEtotal_RDMFT: " << Etotal
910+ // << "\n\nExc_ksdft: " << E_xc_KS
911+ // << "\nE_exx_ksdft: " << E_exx_KS
912+ // <<"\n******\n\n" << std::endl;
913+
914+ // std::cout << "\netxc: " << etxc << "\nvtxc: " << vtxc << "\n";
915+ // std::cout << "\nE_deband_KS: " << E_deband_KS << "\nE_deband_harris_KS: " << E_deband_harris_KS << "\n\n" << std::endl;
916+
917+ if ( PARAM.inp .ab_initio_type == " rdmft" )
918+ {
919+ GlobalV::ofs_running << " \n\n from class RDMFT: \n XC_fun: " << XC_func_rdmft << std::endl;
897920#ifdef __EXX
898- if ( GlobalC::exx_info.info_global .cal_exx ) std::cout << " alpha_power: " << alpha_power << std::endl;
921+ if ( GlobalC::exx_info.info_global .cal_exx ) GlobalV::ofs_running << " alpha_power: " << alpha_power << std::endl;
899922#endif
900- std::cout << std::fixed << std::setprecision (10 )
901- << " ******\n E(TV + Hartree + XC) by RDMFT: " << E_RDMFT[3 ]
902- << " \n\n E_TV_RDMFT: " << E_RDMFT[0 ]
903- << " \n E_hartree_RDMFT: " << E_RDMFT[1 ]
904- << " \n Exc_" << XC_func_rdmft << " _RDMFT: " << E_RDMFT[2 ]
905- << " \n E_Ewald: " << E_Ewald
906- << " \n E_entropy(-TS): " << E_entropy
907- << " \n E_descf: " << E_descf
908- << " \n\n Etotal_RDMFT: " << Etotal
909- << " \n\n Exc_ksdft: " << E_xc_KS
910- << " \n E_exx_ksdft: " << E_exx_KS
911- <<" \n ******\n\n " << std::endl;
912-
913- std::cout << " \n etxc: " << etxc << " \n vtxc: " << vtxc << " \n " ;
914- std::cout << " \n E_deband_KS: " << E_deband_KS << " \n E_deband_harris_KS: " << E_deband_harris_KS << " \n\n " << std::endl;
915-
916- if ( 1 )
917- {
918923 // GlobalV::ofs_running << std::setprecision(12);
919924 // GlobalV::ofs_running << std::setiosflags(std::ios::right);
920925 GlobalV::ofs_running << std::fixed << std::setprecision (10 )
@@ -930,7 +935,6 @@ void RDMFT<TK, TR>::cal_Energy(const int cal_type)
930935 << " \n E_exx_ksdft: " << E_exx_KS
931936 <<" \n ******\n " << std::endl;
932937 }
933-
934938 std::cout << std::defaultfloat;
935939
936940}
0 commit comments