From 568621a565f45c297a150ab6a19ec1565fbd041f Mon Sep 17 00:00:00 2001 From: abacus_fixer Date: Wed, 22 Apr 2026 17:22:12 +0800 Subject: [PATCH] update outputs of LCAO and DeePKS --- source/source_io/module_output/print_info.cpp | 14 +++------ .../source_lcao/module_deepks/LCAO_deepks.cpp | 31 ++++++++----------- 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/source/source_io/module_output/print_info.cpp b/source/source_io/module_output/print_info.cpp index b76e7631fa9..398cbb49a8f 100644 --- a/source/source_io/module_output/print_info.cpp +++ b/source/source_io/module_output/print_info.cpp @@ -85,7 +85,7 @@ void print_parameters( const bool orbinfo = (inp.basis_type=="lcao" || inp.basis_type=="lcao_in_pw" || (inp.basis_type=="pw" && inp.init_wfc.substr(0, 3) == "nao")); - if (orbinfo) { std::cout << std::setw(12) << "NBASE"; } + std::cout << std::endl; std::cout << " " << std::setw(8) << inp.nspin; @@ -103,13 +103,8 @@ void print_parameters( << std::setw(14) << PARAM.globalv.nthread_per_proc << std::setw(14) << PARAM.globalv.nthread_per_proc*GlobalV::NPROC; - if (orbinfo) { std::cout << std::setw(12) << PARAM.globalv.nlocal; } - std::cout << std::endl; - - - std::cout << " ----------------------------------------------------------------" << std::endl; if(inp.basis_type == "lcao") { @@ -125,11 +120,13 @@ void print_parameters( } std::cout << " ----------------------------------------------------------------" << std::endl; - - //---------------------------------- // second part //---------------------------------- + if (orbinfo) + { + std::cout << " TOTAL NBASE" << " " << PARAM.globalv.nlocal << std::endl; + } std::cout << " " << std::setw(8) << "ELEMENT"; @@ -140,7 +137,6 @@ void print_parameters( } std::cout << std::setw(12) << "NATOM"; - std::cout << std::setw(12) << "XC"; std::cout << std::endl; diff --git a/source/source_lcao/module_deepks/LCAO_deepks.cpp b/source/source_lcao/module_deepks/LCAO_deepks.cpp index cd64cc9850a..41c7e13fbea 100644 --- a/source/source_lcao/module_deepks/LCAO_deepks.cpp +++ b/source/source_lcao/module_deepks/LCAO_deepks.cpp @@ -1,14 +1,4 @@ -// wenfei 2022-1-5 -// This file contains constructor and destructor of the class LCAO_deepks, #include "source_io/module_parameter/parameter.h" -// as well as subroutines for initializing and releasing relevant data structures - -// Other than the constructor and the destructor, it contains 3 types of subroutines: -// 1. subroutines that are related to calculating descriptors: -// - init : allocates some arrays -// - init_index : records the index (inl) -// 2. subroutines that are related to V_delta: -// - allocate_V_delta : allocates V_delta; if calculating force, it also allocates F_delta #ifdef __MLALGO @@ -57,7 +47,12 @@ void LCAO_Deepks::init(const LCAO_Orbitals& orb, ModuleBase::TITLE("LCAO_Deepks", "init"); ModuleBase::timer::start("LCAO_Deepks", "init"); - ofs << " Initialize the descriptor index for DeePKS (lcao line)" << std::endl; + ofs << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; + ofs << " | |" << std::endl; + ofs << " | #Initialize DeePKS (LCAO)# |" << std::endl; + ofs << " | Setup machine-Learning-Based DeePKS method based on NAO basis set |" << std::endl; + ofs << " | |" << std::endl; + ofs << " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << std::endl; const int lm = orb.get_lmax_d(); const int nm = orb.get_nchimax_d(); @@ -82,8 +77,8 @@ void LCAO_Deepks::init(const LCAO_Orbitals& orb, this->deepks_param.nchi_d_l[l] = orb.Alpha[0].getNchi(l); } - ofs << " lmax of descriptor = " << deepks_param.lmaxd << std::endl; - ofs << " nmax of descriptor = " << deepks_param.nmaxd << std::endl; + ofs << " Lmax of descriptor " << deepks_param.lmaxd << std::endl; + ofs << " Nmax of descriptor " << deepks_param.nmaxd << std::endl; int pdm_size = 0; this->deepks_param.inlmax = tot_inl; @@ -104,7 +99,7 @@ void LCAO_Deepks::init(const LCAO_Orbitals& orb, if (!PARAM.inp.deepks_equiv) { - ofs << " total basis (all atoms) for descriptor = " << std::endl; + // ofs << " total basis (all atoms) for descriptor = " << std::endl; // init pdm for (int inl = 0; inl < this->deepks_param.inlmax; inl++) @@ -122,7 +117,7 @@ void LCAO_Deepks::init(const LCAO_Orbitals& orb, } pdm_size = pdm_size * pdm_size; this->deepks_param.des_per_atom = pdm_size; - ofs << " Equivariant version, size of pdm matrices : " << pdm_size << std::endl; + ofs << " Equivariant version, pdm matrices size " << pdm_size << std::endl; for (int iat = 0; iat < nat; iat++) { this->pdm[iat] = torch::zeros({pdm_size}, torch::kFloat64); @@ -153,7 +148,7 @@ void LCAO_Deepks::init_index(const int ntype, { this->deepks_param.inl_index[it].create(na[it], this->deepks_param.lmaxd + 1, this->deepks_param.nmaxd); - ofs << " Type " << it + 1 << " number_of_atoms " << na[it] << std::endl; + //ofs << " Type " << it + 1 << " number_of_atoms " << na[it] << std::endl; for (int ia = 0; ia < na[it]; ia++) { @@ -170,8 +165,8 @@ void LCAO_Deepks::init_index(const int ntype, } // end ia } // end it assert(Total_nchi == inl); - ofs << " descriptors_per_atom " << this->deepks_param.des_per_atom << std::endl; - ofs << " total_descriptors " << this->deepks_param.n_descriptor << std::endl; + ofs << " Descriptors per atom " << this->deepks_param.des_per_atom << std::endl; + ofs << " Total Descriptors " << this->deepks_param.n_descriptor << std::endl; return; }