diff --git a/.gitignore b/.gitignore index 78283c1cc0..c66aa93b8a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ log.txt result.out test.sum *.dat +!tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_*.dat .DS_Store .cache .vscode diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index 66c7476019..cb547c76ac 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -2370,7 +2370,7 @@ - **Type**: String - **Availability**: *[`basis_type`](#basis_type)==lcao* - **Description**: The directory to save files for LibRPA. -- **Default**: "./OUT.librpa/" +- **Default**: "OUT.librpa" ### out_pchg diff --git a/docs/parameters.yaml b/docs/parameters.yaml index 2508e6e9d7..448a6343de 100644 --- a/docs/parameters.yaml +++ b/docs/parameters.yaml @@ -3617,7 +3617,7 @@ parameters: type: String description: | The directory to save files for LibRPA. - default_value: "\"./OUT.librpa/\"" + default_value: "\"OUT.librpa\"" unit: "" availability: basis_type==lcao - name: out_pchg diff --git a/source/source_cell/atom_spec.h b/source/source_cell/atom_spec.h index e4d8481ff8..bce4ad564a 100644 --- a/source/source_cell/atom_spec.h +++ b/source/source_cell/atom_spec.h @@ -49,7 +49,7 @@ class Atom int stapos_wf = 0; ///< start position of wave functions std::string label; ///< atomic symbol - std::vector> tau; ///< Cartesian coordinates of each atom in this type + std::vector> tau; ///< Cartesian coordinates of each atom in this type, in unit of lat0 std::vector> dis; ///< direct displacements of each atom in this type in current step (liuyu modify 2023-03-22) std::vector> taud; ///< Direct coordinates of each atom in this type std::vector> boundary_shift; ///< record for periodic boundary adjustment diff --git a/source/source_cell/klist.h b/source/source_cell/klist.h index 4b7c906f3f..f1115e6de7 100644 --- a/source/source_cell/klist.h +++ b/source/source_cell/klist.h @@ -14,9 +14,9 @@ class K_Vectors { public: - std::vector> kvec_c; ///< Cartesian coordinates of k points + std::vector> kvec_c; ///< Cartesian coordinates of k points, in unit of 2*pi/lat0 std::vector> kvec_d; ///< Direct coordinates of k points - std::vector> kvec_c_full; ///< Cartesian coordinates of full k mesh match with nkstot_full + std::vector> kvec_c_full; ///< Cartesian coordinates of full k mesh match with nkstot_full, in unit of 2*pi/lat0 std::vector wk; ///< wk, weight of k points @@ -328,4 +328,4 @@ class K_Vectors friend void KVectorUtils::kvec_mpi_k(K_Vectors& kvec); #endif }; -#endif // KVECT_H \ No newline at end of file +#endif // KVECT_H diff --git a/source/source_cell/unitcell_data.h b/source/source_cell/unitcell_data.h index b2f5fa8f20..5e18577323 100644 --- a/source/source_cell/unitcell_data.h +++ b/source/source_cell/unitcell_data.h @@ -24,7 +24,7 @@ struct Lattice double omega = 0.0; ///< the volume of the unit cell std::vector lat_axis_free{0, 0, 0}; ///< whether each lattice axis (a,b,c) is allowed to relax (0=fixed, 1=free) - ModuleBase::Matrix3 latvec = ModuleBase::Matrix3(); ///< Unitcell lattice vectors + ModuleBase::Matrix3 latvec = ModuleBase::Matrix3(); ///< Unitcell lattice vectors, in unit of lat0 ModuleBase::Vector3 a1, a2, a3; ///< Same as latvec, just at another form ModuleBase::Vector3 latcenter; ///< (a1+a2+a3)/2 the center of vector ModuleBase::Matrix3 latvec_supercell = ModuleBase::Matrix3(); ///< Supercell lattice vectors diff --git a/source/source_esolver/esolver_lr_lcao_bse.cpp b/source/source_esolver/esolver_lr_lcao_bse.cpp index 409d9139fe..2271a2eb7c 100644 --- a/source/source_esolver/esolver_lr_lcao_bse.cpp +++ b/source/source_esolver/esolver_lr_lcao_bse.cpp @@ -8,6 +8,7 @@ #include "source_lcao/module_lr/lr_spectrum.h" #include "source_lcao/module_lr/utils/exciton_plotter.h" #include "source_lcao/module_lr/utils/lr_io.h" +#include "source_lcao/module_lr/utils/lr_util.hpp" namespace ModuleESolver { @@ -28,11 +29,8 @@ void ESolver_BSE::before_all_runners(BaseCell& basecell, const Input_para ModuleESolver::ESolver_FP::before_all_runners(basecell, inp); this->pelec = new elecstate::ElecStateLCAO(); - this->kRlist = LR_IO::RI_kRlist(*this->ucell_, - &this->kv, - this->rpa_dir, - inp.bse_use_fine_kgrid, - this->out_dir); + this->kRlist = LR_IO::RI_kRlist(*this->ucell_, &this->kv, this->nspin, + this->rpa_dir, this->out_dir, inp.bse_use_fine_kgrid); ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "Set K-POINTS and R-list for RI"); ModuleIO::print_parameters(ucell, this->kv, inp); @@ -609,6 +607,11 @@ void ESolver_BSE::lri_init() Vs_in = LR_IO::read_coulomb_mat_k(this->rpa_dir, Cs_in, this->kRlist); } Ws_in = LR_IO::read_Ws(Vs_in, this->kRlist.Rlist); + // if (GlobalV::MY_RANK == 0) + // { + // LR_IO::write_lri_R_max_norm(Vs_in, *this->ucell_, this->out_dir + "V_R_max_norm.dat"); + // LR_IO::write_lri_R_max_norm(Ws_in, *this->ucell_, this->out_dir + "W_R_max_norm.dat"); + // } // } #ifdef __MPI MPI_Barrier(MPI_COMM_WORLD); diff --git a/source/source_esolver/esolver_lr_lcao_tddft.cpp b/source/source_esolver/esolver_lr_lcao_tddft.cpp index 52bd6ad0e8..4d537d78bb 100644 --- a/source/source_esolver/esolver_lr_lcao_tddft.cpp +++ b/source/source_esolver/esolver_lr_lcao_tddft.cpp @@ -587,6 +587,7 @@ void ModuleESolver::ESolver_LR::runner(BaseCell& basecell, const int iste this->paraC_, this->paraMat_, spin_types[is], + this->in_dir, this->out_dir, this->inp_->ri_hartree_benchmark, (this->inp_->ri_hartree_benchmark == "aims" ? this->inp_->aims_nbasis : std::vector({}))); diff --git a/source/source_io/module_parameter/input_parameter.h b/source/source_io/module_parameter/input_parameter.h index 196b11fad9..1544576d9f 100644 --- a/source/source_io/module_parameter/input_parameter.h +++ b/source/source_io/module_parameter/input_parameter.h @@ -465,7 +465,7 @@ struct Input_para bool restart_save = false; ///< restart //Peize Lin add 2020-04-04 bool rpa = false; ///< rpa calculation bool rpa_out_vel = false; ///< whether to output velocity matrix for librpa - std::string rpa_outdir = "./OUT.librpa/";///< output directory for librpa + std::string rpa_outdir = "OUT.librpa"; ///< output directory for librpa std::vector out_pchg = {}; ///< specify the bands to be calculated for partial charge std::vector out_wfc_norm = {}; ///< specify the bands to be calculated for norm of wfc std::vector out_wfc_re_im = {}; ///< specify the bands to be calculated for real and imaginary parts of wfc diff --git a/source/source_io/module_parameter/read_inp_out.cpp b/source/source_io/module_parameter/read_inp_out.cpp index 7f7113bdb4..1ef603e36f 100644 --- a/source/source_io/module_parameter/read_inp_out.cpp +++ b/source/source_io/module_parameter/read_inp_out.cpp @@ -1481,7 +1481,7 @@ If EXX(exact exchange) is calculated (i.e. dft_fuctional==hse/hf/pbe0/scan0 or r item.category = "Output information"; item.type = "String"; item.description = "The directory to save files for LibRPA."; - item.default_value = "\"./OUT.librpa/\""; + item.default_value = "\"OUT.librpa\""; item.unit = ""; item.set_availability("basis_type==lcao"); read_sync_string(input.rpa_outdir); diff --git a/source/source_io/test/read_input_ptest.cpp b/source/source_io/test/read_input_ptest.cpp index a8678774d8..ab689021a3 100644 --- a/source/source_io/test/read_input_ptest.cpp +++ b/source/source_io/test/read_input_ptest.cpp @@ -362,7 +362,7 @@ TEST_F(InputParaTest, ParaRead) EXPECT_FALSE(param.inp.dft_plus_dmft); EXPECT_FALSE(param.inp.rpa); EXPECT_FALSE(param.inp.rpa_out_vel); - EXPECT_EQ(param.inp.rpa_outdir, "./OUT.librpa/"); + EXPECT_EQ(param.inp.rpa_outdir, "OUT.librpa/"); EXPECT_EQ(param.inp.imp_sol, 0); EXPECT_DOUBLE_EQ(param.inp.eb_k, 80.0); EXPECT_DOUBLE_EQ(param.inp.tau, 1.0798 * 1e-5); diff --git a/source/source_lcao/module_bse/hamilt_bse.cpp b/source/source_lcao/module_bse/hamilt_bse.cpp index 5faf199c87..886d64d201 100644 --- a/source/source_lcao/module_bse/hamilt_bse.cpp +++ b/source/source_lcao/module_bse/hamilt_bse.cpp @@ -142,13 +142,13 @@ HamiltBSE::HamiltBSE(const int& nspin, template void HamiltBSE::cal_V_for_A(){ - ModuleBase::TITLE("HamiltBSE", "cal_V_for_A"); - ModuleBase::timer::start("HamiltBSE", "cal_V_for_A"); - std::cout<<"in cal_V_for_A"<VA_local.empty()) { std::cout<< "V for A has been calculated, skip." <pA.get_local_size(), sizeof(T)); this->VA_local.resize(this->pA.get_local_size(), 0.0); if (this->ri_hartree_benchmark == "aims" || this->ri_hartree_benchmark == "abacus") { @@ -171,13 +171,13 @@ void HamiltBSE::cal_V_for_A(){ template void HamiltBSE::cal_V_for_B(){ - ModuleBase::TITLE("HamiltBSE", "cal_V_for_B"); - ModuleBase::timer::start("HamiltBSE", "cal_V_for_B"); - std::cout<<"in cal_V_for_B"<VB_local.empty()) { std::cout<< "V for B has been calculated, skip." <pA.get_local_size(), sizeof(T)); this->VB_local.resize(this->pA.get_local_size(), 0.0); if (this->ri_hartree_benchmark == "aims" || this->ri_hartree_benchmark == "abacus") { @@ -200,13 +200,13 @@ void HamiltBSE::cal_V_for_B(){ template void HamiltBSE::cal_W_for_A(){ - ModuleBase::TITLE("HamiltBSE", "cal_W_for_A"); - ModuleBase::timer::start("HamiltBSE", "cal_W_for_A"); - std::cout<<"in cal_W_for_A"<WA_local.empty()) { std::cout<< "W for A has been calculated, skip." <pA.get_local_size(), sizeof(T)); this->WA_local.resize(this->pA.get_local_size(), 0.0); this->mo_lri.cal_W_for_A(this->WA_local, this->pA); @@ -219,13 +219,13 @@ void HamiltBSE::cal_W_for_A(){ template void HamiltBSE::cal_W_for_B(){ - ModuleBase::TITLE("HamiltBSE", "cal_W_for_B"); - ModuleBase::timer::start("HamiltBSE", "cal_W_for_B"); - std::cout<<"in cal_W_for_B"<WB_local.empty()) { std::cout<< "W for B has been calculated, skip." <pA.get_local_size(), sizeof(T)); this->WB_local.resize(this->pA.get_local_size(), 0.0); this->mo_lri.cal_W_for_B(this->WB_local, this->pA); @@ -336,7 +336,7 @@ void HamiltBSE::init_bse_matrix(const bool is_full, const int & st_index){ } if (this->out_bse_ab) { - this->write_AB_matrix("A_matrix_"+std::to_string(this->my_rank)+".dat", 6, this->BSE_A_local.data(), this->ndim, this->ndim); + this->write_AB_matrix(this->out_dir+"A_matrix_"+std::to_string(this->my_rank)+".dat", 6, this->BSE_A_local.data(), this->ndim, this->ndim); } if (is_full) @@ -351,7 +351,7 @@ void HamiltBSE::init_bse_matrix(const bool is_full, const int & st_index){ } if (this->out_bse_ab) { - this->write_AB_matrix("B_matrix_"+std::to_string(this->my_rank)+".dat", 6, this->BSE_B_local.data(), this->ndim, this->ndim); + this->write_AB_matrix(this->out_dir+"B_matrix_"+std::to_string(this->my_rank)+".dat", 6, this->BSE_B_local.data(), this->ndim, this->ndim); } } diff --git a/source/source_lcao/module_lr/CMakeLists.txt b/source/source_lcao/module_lr/CMakeLists.txt index cef738b296..cfcd3bb7c8 100644 --- a/source/source_lcao/module_lr/CMakeLists.txt +++ b/source/source_lcao/module_lr/CMakeLists.txt @@ -8,6 +8,7 @@ if(ENABLE_LCAO) utils/lr_util.cpp utils/lr_util_hcontainer.cpp utils/lr_io.cpp + utils/lr_io_krlist.cpp utils/exciton_plotter.cpp ao_to_mo_transformer/ao_to_mo_parallel.cpp ao_to_mo_transformer/ao_to_mo_serial.cpp diff --git a/source/source_lcao/module_lr/hamilt_casida.h b/source/source_lcao/module_lr/hamilt_casida.h index ba356eef4c..4bf2ea98d0 100644 --- a/source/source_lcao/module_lr/hamilt_casida.h +++ b/source/source_lcao/module_lr/hamilt_casida.h @@ -38,6 +38,7 @@ namespace LR const Parallel_2D& pc_in, const Parallel_Orbitals& pmat_in, const std::string& spin_type, + const std::string& in_dir, const std::string& out_dir, const std::string& ri_hartree_benchmark = "none", const std::vector& aims_nbasis = {}) @@ -56,11 +57,10 @@ namespace LR #ifdef __EXX using TAC = std::pair>; using TLRI = std::map>>; - const std::string& dir = PARAM.globalv.global_readin_dir; TLRI Cs_read; TLRI Vs_read; #ifdef __DEBUG - // TLRI Vs_compare = LRI_CV_Tools::read_Vs_abf(dir + "Vs"); + // TLRI Vs_compare = LRI_CV_Tools::read_Vs_abf(in_dir + "Vs"); // LRI_CV_Tools::write_Vs_abf(Vs_read, "Vs_read_from_coulomb"); // LRI_CV_Tools::write_Cs_ao(Cs_read, "Cs_ao_read"); // ensure Cs_ao is read correctly // assert(RI_Benchmark::compare_Vs(Vs_read, Vs_compare)); @@ -75,27 +75,23 @@ namespace LR { LR_IO::RI_kRlist kRlist (ucell_in, const_cast(&kv_in), - dir, - use_fine_kgrid, - out_dir); + nspin, in_dir, out_dir, use_fine_kgrid); // though C and V are real, here still use to multiply with psi - Cs_read = LRI_CV_Tools::read_Cs_ao_all(dir); - Vs_read = LR_IO::read_coulomb_mat_general_k(dir, Cs_read, kRlist); + Cs_read = LRI_CV_Tools::read_Cs_ao_all(in_dir); + Vs_read = LR_IO::read_coulomb_mat_general_k(in_dir, Cs_read, kRlist); } else if (ri_hartree_benchmark == "abacus") { - Cs_read = LRI_CV_Tools::read_Cs_ao(dir + "Cs"); - Vs_read = LRI_CV_Tools::read_Vs_abf(dir + "Vs"); + Cs_read = LRI_CV_Tools::read_Cs_ao(in_dir + "Cs"); + Vs_read = LRI_CV_Tools::read_Vs_abf(in_dir + "Vs"); } else if (ri_hartree_benchmark == "abacus-librpa") { LR_IO::RI_kRlist kRlist (ucell_in, const_cast(&kv_in), - dir, - use_fine_kgrid, - out_dir); - Cs_read = LRI_CV_Tools::read_Cs_ao_all(dir); - Vs_read = LR_IO::read_coulomb_mat_k(dir, Cs_read, kRlist); + nspin, in_dir, out_dir, use_fine_kgrid); + Cs_read = LRI_CV_Tools::read_Cs_ao_all(in_dir); + Vs_read = LR_IO::read_coulomb_mat_k(in_dir, Cs_read, kRlist); } if (!std::set({ "rpa", "hf"}).count(xc_kernel)) { throw std::runtime_error("ri_hartree_benchmark is only supported for xc_kernel = rpa, hf"); diff --git a/source/source_lcao/module_lr/utils/lr_io.cpp b/source/source_lcao/module_lr/utils/lr_io.cpp index 2c61478e7d..e8e14a0599 100644 --- a/source/source_lcao/module_lr/utils/lr_io.cpp +++ b/source/source_lcao/module_lr/utils/lr_io.cpp @@ -17,15 +17,10 @@ #include #endif namespace LR_IO { - const std::string FILE_COARSE = "stru_out"; - const std::string FILE_FINE_UNIFORM = "band_kpath_info"; - const std::string FILE_FINE_NONUNIFORM = "KPT_bse"; - const std::string FILE_BAND_OUT = "band_out"; - const std::string FILE_BAND_KPATH = "band_kpath_info"; void parse_band_out_file(const std::string& in_dir, int& nbands_file, int& nk_file, int& nspin_file, int& nocc_file) { - std::string file = in_dir + FILE_BAND_OUT; + std::string file = in_dir + "band_out"; std::ifstream ifs(file); if (!ifs) throw std::runtime_error(file + " not found"); std::string tmp, line; @@ -52,7 +47,7 @@ void parse_band_out_file(const std::string& in_dir, int& nbands_file, int& nk_fi if (PARAM.inp.bse_use_fine_kgrid) { - file = in_dir + FILE_BAND_KPATH; + file = in_dir + "band_kpath_info"; std::ifstream ifs(file); if (!ifs) throw std::runtime_error(file + " not found"); std::string tmp; @@ -65,151 +60,6 @@ void parse_band_out_file(const std::string& in_dir, int& nbands_file, int& nk_fi } } -#ifdef __EXX - -RI_kRlist::RI_kRlist(const UnitCell& ucell, K_Vectors* const pkv, - const std::string& in_dir, const int use_fine_kgrid, const std::string& out_dir) - : klist(pkv) -{ - read_kpts_coarse(in_dir + FILE_COARSE, ucell, this->klist, out_dir); - this->klist_coarse = *this->klist; - this->period = RI_Util::get_Born_vonKarmen_period(*klist); - this->Rlist = RI_Util::get_Born_von_Karmen_cells(period); - // std::cout << "Rlist:" << std::endl; - // int count = 0; - // for (const auto& iR: Rlist) - // { - // count++; - // std::cout << "iR=" << count <<": "<< iR[0] << " " << iR[1] << " " << iR[2] << std::endl; - // } - if (use_fine_kgrid==1) - { - read_kpts_fine(in_dir + FILE_FINE_UNIFORM, ucell, this->klist, false, out_dir); - } - else if (use_fine_kgrid==2) - { - read_kpts_fine(in_dir + FILE_FINE_NONUNIFORM, ucell, this->klist, true, out_dir); - } - else if (use_fine_kgrid!=0) - ModuleBase::WARNING_QUIT("LR_IO", "use_fine_kgrid must be 0, 1 or 2"); -}; - -void RI_kRlist::read_kpts_coarse(const std::string& file, const UnitCell& ucell, - K_Vectors* const klist, const std::string& out_dir) -{ - std::ifstream ifs; - ifs.open(file); - if (!ifs) throw std::runtime_error(file + " not found"); - std::string tmp; - for (int i = 0; i < 7; ++i) { std::getline(ifs, tmp); } // get the 7th line(number of atoms) - int nat = std::stoi(tmp); - for (int i = 0; i != nat; ++i) { std::getline(ifs, tmp); } - int nks_original = klist->get_nks(); - // std::cout << "Origianl klist (Cartesian|Direct)" << std::endl; - // for (int ik = 0;ik < nks_original;++ik) - // { - // std::cout << "ik=" << std::setw(5) << ik << std::setw(11) << klist->kvec_c[ik].x << std::setw(11) - // << klist->kvec_c[ik].y << std::setw(11) << klist->kvec_c[ik].z << " | " << std::setw(11) - // << klist->kvec_d[ik].x << std::setw(11) << klist->kvec_d[ik].y << std::setw(11) << klist->kvec_d[ik].z << std::endl; - // } - - ifs >> klist->nmp[0] >> klist->nmp[1] >> klist->nmp[2]; - int nk = klist->nmp[0] * klist->nmp[1] * klist->nmp[2]; - int nks = (PARAM.inp.nspin == 2) ? 2 * nk : nk; - assert(nks == nks_original); - - for (int ik = 0; ik < nk; ++ik) - { - ifs >> klist->kvec_c[ik].x >> klist->kvec_c[ik].y >> klist->kvec_c[ik].z; - klist->kvec_c[ik] /= ModuleBase::TWO_PI * ModuleBase::BOHR_TO_A; // in unit of 2pi/angstrom - klist->kvec_d[ik] = klist->kvec_c[ik] * ucell.latvec.Transpose(); - set_zero_if_close(klist->kvec_d[ik]); - klist->wk[ik] = 1.0 / double(nk); - } - if (PARAM.inp.nspin == 2) - { - for (int ik = 0; ik < nk; ++ik) - { - klist->kvec_c[ik + nk] = klist->kvec_c[ik]; - klist->kvec_d[ik + nk] = klist->kvec_d[ik]; - klist->wk[ik + nk] = klist->wk[ik]; - } - } - - std::ofstream ofs_kpts_coarse(out_dir + "kpts_coarse.dat"); - ofs_kpts_coarse << "kpts_coarse:" << nk << std::setw(16) << "( Cartesian" << std::setw(36) - << "| Direct )" << std::setw(15) << "| wk (normalized as sum = nk)" << std::endl; - for (int ik = 0; ik < nks; ++ik) - { - ofs_kpts_coarse << std::setw(5) << ik << std::setw(12) << klist->kvec_c[ik].x << std::setw(12) - << klist->kvec_c[ik].y << std::setw(12) << klist->kvec_c[ik].z << " | " << std::setw(12) - << klist->kvec_d[ik].x << std::setw(12) << klist->kvec_d[ik].y << std::setw(12) << klist->kvec_d[ik].z - << " | " << klist->wk[ik]*nk << std::endl; - } - ofs_kpts_coarse.close(); -} - -void RI_kRlist::read_kpts_fine(const std::string& file, const UnitCell& ucell, - K_Vectors* const klist, const bool is_weighted, - const std::string& out_dir) -{ - // band_kpath_info format: first line: nband nbasis nspin nk, then kx ky kz per line (direct coords) - // KPT_bse format: first line = nk, then kx ky kz wk per line (direct coords, BSE weight sum=nk) - std::ifstream ifs; - ifs.open(file); - if (!ifs) throw std::runtime_error(file + " not found"); - int nk; - if (is_weighted) {ifs >> nk; ifs.ignore(2048, '\n');} - else {ifs >> nk >> nk >> nk >> nk;} - - int nks = (PARAM.inp.nspin == 2) ? 2 * nk : nk; - klist->set_nks(nks); - klist->set_nkstot(nks); - klist->set_nkstot_full(nk); - - auto klist_reset = [&klist](int kpoint_number){ - klist->kvec_c.resize(0); klist->kvec_c.resize(kpoint_number); - klist->kvec_d.resize(0); klist->kvec_d.resize(kpoint_number); - klist->wk.resize(0); klist->wk.resize(kpoint_number); - klist->isk.resize(0); - klist->ngk.resize(0); - }; - klist_reset(nks); - - for (int ik = 0; ik < nk; ++ik) - { - ifs >> klist->kvec_d[ik].x >> klist->kvec_d[ik].y >> klist->kvec_d[ik].z; - if (is_weighted) { - ifs >> klist->wk[ik]; - klist->wk[ik] /= double(nk); - } - else {klist->wk[ik] = 1.0 / double(nk);} - klist->kvec_c[ik] = klist->kvec_d[ik] * ucell.G; - set_zero_if_close(klist->kvec_c[ik]); - } - std::cout << "Read " << nk << " k-points and weights from " << file << std::endl; - if (PARAM.inp.nspin == 2) - { - for (int ik = 0; ik < nk; ++ik) - { - klist->kvec_c[ik + nk] = klist->kvec_c[ik]; - klist->kvec_d[ik + nk] = klist->kvec_d[ik]; - klist->wk[ik + nk] = klist->wk[ik]; - } - } - std::ofstream ofs_kpts_fine(out_dir + "kpts_fine.dat"); - ofs_kpts_fine << "kpts_fine:" << nk << std::setw(18) << "( Cartesian" << std::setw(36) - << "| Direct )" << std::setw(15) << "| wk (normalized as sum = nk)" << std::endl; - for (int ik = 0; ik < nk; ++ik) - { - ofs_kpts_fine << std::setw(5) << ik << std::setw(12) << klist->kvec_c[ik].x << std::setw(12) - << klist->kvec_c[ik].y << std::setw(12) << klist->kvec_c[ik].z << " | " << std::setw(12) - << klist->kvec_d[ik].x << std::setw(12) << klist->kvec_d[ik].y << std::setw(12) << klist->kvec_d[ik].z - << " | " << klist->wk[ik]*nk << std::endl; - } - ofs_kpts_fine.close(); -} - std::vector read_energy_qp(const int nocc, const int nvirt, const std::string& in_dir, @@ -473,7 +323,7 @@ void read_librpa_eigenvectors(psi::Psi& wfc_ks, wfc_ks.get_pointer(), 1, 1, const_cast(pmat.desc_wfc)/*nbasisĂ—nbands*/, pv_glb.blacs_ctxt); #else - BlasConnector::copy(nbands*nlocal, wfc_ks_global.get_pointer(), 1, wfc_ks.get_pointer(), 1); + BlasConnector::copy(nbands*nbasis, wfc_ks_global.get_pointer(), 1, wfc_ks.get_pointer(), 1); #endif } ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "read librpa eigenvectors."); @@ -573,12 +423,33 @@ void read_librpa_eigenvectors_from_band_files(psi::Psi& wfc_ks, wfc_ks.get_pointer(), 1, 1, const_cast(pmat.desc_wfc)/*nbasisĂ—nbands*/, pv_glb.blacs_ctxt); #else - BlasConnector::copy(nbands*nlocal, wfc_ks_global.get_pointer(), 1, wfc_ks.get_pointer(), 1); + BlasConnector::copy(nbands*nbasis, wfc_ks_global.get_pointer(), 1, wfc_ks.get_pointer(), 1); #endif } ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "read librpa eigenvectors."); } +template void read_librpa_eigenvectors( + psi::Psi& wfc_ks, psi::Psi& wfc_ks_global, + const std::string& in_dir, const int ncore, const int nbands_file, + const int nspin_tmp, const int nspin_file, const int my_rank, Parallel_Orbitals& pmat); +template void read_librpa_eigenvectors>( + psi::Psi>& wfc_ks, psi::Psi>& wfc_ks_global, + const std::string& in_dir, const int ncore, const int nbands_file, + const int nspin_tmp, const int nspin_file, const int my_rank, Parallel_Orbitals& pmat); + +template void read_librpa_eigenvectors_from_band_files( + psi::Psi& wfc_ks, psi::Psi& wfc_ks_global, + const std::string& in_dir, const int ncore, const int nbands_file, + const int nspin_tmp, const int nspin_file, const int my_rank, Parallel_Orbitals& pmat); +template void read_librpa_eigenvectors_from_band_files>( + psi::Psi>& wfc_ks, psi::Psi>& wfc_ks_global, + const std::string& in_dir, const int ncore, const int nbands_file, + const int nspin_tmp, const int nspin_file, const int my_rank, Parallel_Orbitals& pmat); + +// ================= LRI related functions ========================= + +#ifdef __EXX template // only for blocking by atom pairs TLRI read_coulomb_mat_k(const std::string& in_dir, const TLRI& Cs, LR_IO::RI_kRlist& kRlist) { @@ -913,44 +784,51 @@ TLRI read_Ws(const TLRI& Vs, const std::vector& Rlist) ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "read WR files."); return Ws; } - -template void read_librpa_eigenvectors( - psi::Psi& wfc_ks, psi::Psi& wfc_ks_global, - const std::string& in_dir, const int ncore, const int nbands_file, - const int nspin_tmp, const int nspin_file, const int my_rank, Parallel_Orbitals& pmat); - -template void read_librpa_eigenvectors>( - psi::Psi>& wfc_ks, psi::Psi>& wfc_ks_global, - const std::string& in_dir, const int ncore, const int nbands_file, - const int nspin_tmp, const int nspin_file, const int my_rank, Parallel_Orbitals& pmat); - -template void read_librpa_eigenvectors_from_band_files( - psi::Psi& wfc_ks, psi::Psi& wfc_ks_global, - const std::string& in_dir, const int ncore, const int nbands_file, - const int nspin_tmp, const int nspin_file, const int my_rank, Parallel_Orbitals& pmat); - -template void read_librpa_eigenvectors_from_band_files>( - psi::Psi>& wfc_ks, psi::Psi>& wfc_ks_global, - const std::string& in_dir, const int ncore, const int nbands_file, - const int nspin_tmp, const int nspin_file, const int my_rank, Parallel_Orbitals& pmat); +template +void write_lri_R_max_norm(const TLRI& tensors, + const UnitCell& ucell, + const std::string& filename) +{ + std::ofstream ofs(filename); + if (!ofs) { throw std::runtime_error("Cannot open " + filename); } + ofs << "# iat jat Rx Ry Rz Rnorm_bohr tensor_max_abs\n"; + ofs << std::setprecision(16); + for (const auto& iat_blocks : tensors) + { + for (const auto& pair_tensor : iat_blocks.second) + { + const int jat = pair_tensor.first.first; + const auto& R = pair_tensor.first.second; + const ModuleBase::Vector3 R_cart = + (static_cast(R[0]) * ucell.a1 + + static_cast(R[1]) * ucell.a2 + + static_cast(R[2]) * ucell.a3) * ucell.lat0; + ofs << iat_blocks.first << ' ' << jat << ' ' + << R[0] << ' ' << R[1] << ' ' << R[2] << ' ' << R_cart.norm() << ' ' + << pair_tensor.second.norm(std::numeric_limits::max()) << '\n'; + } + } +} template TLRI read_coulomb_mat_k -(const std::string& in_dir, const TLRI& Cs, LR_IO::RI_kRlist& kRlist); - + (const std::string& in_dir, const TLRI& Cs, LR_IO::RI_kRlist& kRlist); template TLRI> read_coulomb_mat_k, std::complex> -(const std::string& in_dir, const TLRI>& Cs, LR_IO::RI_kRlist& kRlist); + (const std::string& in_dir, const TLRI>& Cs, LR_IO::RI_kRlist& kRlist); template TLRI read_coulomb_mat_general_k -(const std::string& in_dir, const TLRI& Cs, LR_IO::RI_kRlist& kRlist); - + (const std::string& in_dir, const TLRI& Cs, LR_IO::RI_kRlist& kRlist); template TLRI> read_coulomb_mat_general_k, std::complex> -(const std::string& in_dir, const TLRI>& Cs, LR_IO::RI_kRlist& kRlist); + (const std::string& in_dir, const TLRI>& Cs, LR_IO::RI_kRlist& kRlist); template TLRI read_Ws -(const TLRI& Vs, const std::vector& Rlist); - + (const TLRI& Vs, const std::vector& Rlist); template TLRI> read_Ws, std::complex> -(const TLRI>& Vs, const std::vector& Rlist); + (const TLRI>& Vs, const std::vector& Rlist); + +template void write_lri_R_max_norm + (const TLRI& tensors, const UnitCell& ucell, const std::string& filename); +template void write_lri_R_max_norm> + (const TLRI>& tensors, const UnitCell& ucell, const std::string& filename); #endif // __EXX diff --git a/source/source_lcao/module_lr/utils/lr_io.h b/source/source_lcao/module_lr/utils/lr_io.h index a4f8001b56..28c6efe999 100644 --- a/source/source_lcao/module_lr/utils/lr_io.h +++ b/source/source_lcao/module_lr/utils/lr_io.h @@ -3,9 +3,9 @@ #include "source_basis/module_ao/parallel_orbitals.h" #include "source_cell/klist.h" #include "source_cell/unitcell.h" +#include "source_lcao/module_lr/utils/lr_io_krlist.h" #include "source_psi/psi.h" #ifdef __EXX -#include "source_lcao/module_ri/ri_util.h" // for get_Born_von_Karmen_cells #include #endif #include @@ -46,32 +46,6 @@ inline void set_zero_if_close(ModuleBase::Vector3& vec, const double tol void parse_band_out_file(const std::string& path, int& nbands_file, int& nk_file, int& nspin_file, int& nocc_file); -#ifdef __EXX -using TA = int; -using TC = std::array; -using TAC = std::pair; -template -using TLRI = std::map>>; - -class RI_kRlist -{ - public: - K_Vectors* klist = nullptr; // store fine kgrid if bse_use_fine_kgrid - K_Vectors klist_coarse; - TC period; - std::vector Rlist; - RI_kRlist() = default; - RI_kRlist(const UnitCell& ucell, K_Vectors* pkv, - const std::string& path, const int bse_use_fine_kgrid, - const std::string& out_dir); - ~RI_kRlist() = default; - void read_kpts_coarse(const std::string& file, const UnitCell& ucell, - K_Vectors* const klist, const std::string& out_dir); - void read_kpts_fine(const std::string& file, const UnitCell& ucell, - K_Vectors* const klist, const bool is_weighted, - const std::string& out_dir); -}; - /// @brief vector as {ik, iband, } /// @param ncore: as output, number of core orbitals parsed from file std::vector read_energy_qp(const int nocc, @@ -113,6 +87,12 @@ void read_librpa_eigenvectors_from_band_files(psi::Psi& wfc_ks, const int nspin_file, const int my_rank, Parallel_Orbitals& pmat); +#ifdef __EXX +using TA = int; +using TC = std::array; +using TAC = std::pair; +template +using TLRI = std::map>>; /// only for blocking by atom pairs (abacus type) template @@ -125,6 +105,12 @@ TLRI read_coulomb_mat_general_k(const std::string& path, const TLRI& Cs /// @brief read Wxc(R) = Wc(R) + Vx(R) from file template std::map>> read_Ws(const TLRI& Vs, const std::vector& Rlist); + +/// @brief Write the max-entry norm of every atom-pair real-space tensor. +/// R is converted from lattice coordinates to Cartesian Bohr coordinates. +template +void write_lri_R_max_norm(const TLRI& tensors, const UnitCell& ucell, const std::string& filename); + #endif } // namespace LR_IO diff --git a/source/source_lcao/module_lr/utils/lr_io_krlist.cpp b/source/source_lcao/module_lr/utils/lr_io_krlist.cpp new file mode 100644 index 0000000000..2fb8ca5920 --- /dev/null +++ b/source/source_lcao/module_lr/utils/lr_io_krlist.cpp @@ -0,0 +1,147 @@ +#include "lr_io_krlist.h" +#include "lr_io.h" +#include "source_lcao/module_ri/ri_util.h" +#include "source_base/constants.h" +#include +#include +#include +#include +#include + +namespace LR_IO +{ + +namespace +{ +const std::string FILE_COARSE = "stru_out"; +const std::string FILE_FINE_UNIFORM = "band_kpath_info"; +const std::string FILE_FINE_NONUNIFORM = "KPT_bse"; +} + +RI_kRlist::RI_kRlist(const UnitCell& ucell, K_Vectors* const pkv, const int nspin_in, + const std::string& in_dir, const std::string& out_dir, const int use_fine_kgrid) + : klist(pkv), nspin(nspin_in) +{ + read_kpts_coarse(in_dir + FILE_COARSE, ucell, this->klist, out_dir); + this->klist_coarse = *this->klist; + this->period = RI_Util::get_Born_vonKarmen_period(*klist); + this->Rlist = RI_Util::get_Born_von_Karmen_cells(period); + if (use_fine_kgrid == 1) + { + read_kpts_fine(in_dir + FILE_FINE_UNIFORM, ucell, this->klist, false, out_dir); + } + else if (use_fine_kgrid == 2) + { + read_kpts_fine(in_dir + FILE_FINE_NONUNIFORM, ucell, this->klist, true, out_dir); + } + else if (use_fine_kgrid != 0) + { + ModuleBase::WARNING_QUIT("LR_IO", "use_fine_kgrid must be 0, 1 or 2"); + } +} + +void RI_kRlist::read_kpts_coarse(const std::string& file, const UnitCell& ucell, + K_Vectors* const klist, const std::string& out_dir) +{ + std::ifstream ifs(file); + if (!ifs) throw std::runtime_error(file + " not found"); + std::string tmp; + for (int i = 0; i < 7; ++i) { std::getline(ifs, tmp); } + const int nat = std::stoi(tmp); + for (int i = 0; i != nat; ++i) { std::getline(ifs, tmp); } + const int nks_original = klist->get_nks(); + + ifs >> klist->nmp[0] >> klist->nmp[1] >> klist->nmp[2]; + const int nk = klist->nmp[0] * klist->nmp[1] * klist->nmp[2]; + const int nks = (this->nspin == 2) ? 2 * nk : nk; + assert(nks == nks_original); + + for (int ik = 0; ik < nk; ++ik) + { + ifs >> klist->kvec_c[ik].x >> klist->kvec_c[ik].y >> klist->kvec_c[ik].z; + klist->kvec_c[ik] *= (ucell.lat0 / ModuleBase::TWO_PI); // in unit of 2*pi/lat0 + klist->kvec_d[ik] = klist->kvec_c[ik] * ucell.latvec.Transpose(); + set_zero_if_close(klist->kvec_d[ik]); + klist->wk[ik] = 1.0 / double(nk); + } + if (this->nspin == 2) + { + for (int ik = 0; ik < nk; ++ik) + { + klist->kvec_c[ik + nk] = klist->kvec_c[ik]; + klist->kvec_d[ik + nk] = klist->kvec_d[ik]; + klist->wk[ik + nk] = klist->wk[ik]; + } + } + + std::ofstream ofs_kpts_coarse(out_dir + "kpts_coarse.dat"); + ofs_kpts_coarse << "kpts_coarse:" << nk << std::setw(16) << "( Cartesian" + << std::setw(36) << "| Direct )" << std::setw(15) + << "| wk (normalized as sum = nk)" << std::endl; + for (int ik = 0; ik < nks; ++ik) + { + ofs_kpts_coarse << std::setw(5) << ik << std::setw(12) << klist->kvec_c[ik].x + << std::setw(12) << klist->kvec_c[ik].y << std::setw(12) << klist->kvec_c[ik].z + << " | " << std::setw(12) << klist->kvec_d[ik].x << std::setw(12) + << klist->kvec_d[ik].y << std::setw(12) << klist->kvec_d[ik].z << " | " + << klist->wk[ik] * nk << std::endl; + } +} + +void RI_kRlist::read_kpts_fine(const std::string& file, const UnitCell& ucell, + K_Vectors* const klist, const bool is_weighted, + const std::string& out_dir) +{ + std::ifstream ifs(file); + if (!ifs) throw std::runtime_error(file + " not found"); + int nk; + if (is_weighted) { ifs >> nk; ifs.ignore(2048, '\n'); } + else { ifs >> nk >> nk >> nk >> nk; } + + const int nks = (this->nspin == 2) ? 2 * nk : nk; + klist->set_nks(nks); + klist->set_nkstot(nks); + klist->set_nkstot_full(nk); + klist->kvec_c.resize(nks); + klist->kvec_d.resize(nks); + klist->wk.resize(nks); + klist->isk.resize(0); + klist->ngk.resize(0); + + for (int ik = 0; ik < nk; ++ik) + { + ifs >> klist->kvec_d[ik].x >> klist->kvec_d[ik].y >> klist->kvec_d[ik].z; + if (is_weighted) + { + ifs >> klist->wk[ik]; + klist->wk[ik] /= double(nk); + } + else { klist->wk[ik] = 1.0 / double(nk); } + klist->kvec_c[ik] = klist->kvec_d[ik] * ucell.G; + set_zero_if_close(klist->kvec_c[ik]); + } + std::cout << "Read " << nk << " k-points and weights from " << file << std::endl; + if (this->nspin == 2) + { + for (int ik = 0; ik < nk; ++ik) + { + klist->kvec_c[ik + nk] = klist->kvec_c[ik]; + klist->kvec_d[ik + nk] = klist->kvec_d[ik]; + klist->wk[ik + nk] = klist->wk[ik]; + } + } + std::ofstream ofs_kpts_fine(out_dir + "kpts_fine.dat"); + ofs_kpts_fine << "kpts_fine:" << nk << std::setw(18) << "( Cartesian" + << std::setw(36) << "| Direct )" << std::setw(15) + << "| wk (normalized as sum = nk)" << std::endl; + for (int ik = 0; ik < nk; ++ik) + { + ofs_kpts_fine << std::setw(5) << ik << std::setw(12) << klist->kvec_c[ik].x + << std::setw(12) << klist->kvec_c[ik].y << std::setw(12) << klist->kvec_c[ik].z + << " | " << std::setw(12) << klist->kvec_d[ik].x << std::setw(12) + << klist->kvec_d[ik].y << std::setw(12) << klist->kvec_d[ik].z << " | " + << klist->wk[ik] * nk << std::endl; + } +} + +} // namespace LR_IO diff --git a/source/source_lcao/module_lr/utils/lr_io_krlist.h b/source/source_lcao/module_lr/utils/lr_io_krlist.h new file mode 100644 index 0000000000..a6aef40edc --- /dev/null +++ b/source/source_lcao/module_lr/utils/lr_io_krlist.h @@ -0,0 +1,31 @@ +#pragma once + +#include "source_cell/klist.h" +#include "source_cell/unitcell.h" +#include +#include +#include + +namespace LR_IO +{ + +class RI_kRlist +{ + public: + K_Vectors* klist = nullptr; + K_Vectors klist_coarse; + std::array period; + std::vector> Rlist; + int nspin; + RI_kRlist() = default; + RI_kRlist(const UnitCell& ucell, K_Vectors* pkv, const int npspin_in, + const std::string& in_dir, const std::string& out_dir, const int use_fine_kgrid); + ~RI_kRlist() = default; + void read_kpts_coarse(const std::string& file, const UnitCell& ucell, + K_Vectors* const klist, const std::string& out_dir); + void read_kpts_fine(const std::string& file, const UnitCell& ucell, + K_Vectors* const klist, const bool is_weighted, + const std::string& out_dir); +}; + +} // namespace LR_IO diff --git a/source/source_lcao/module_lr/utils/lr_util.hpp b/source/source_lcao/module_lr/utils/lr_util.hpp index 3910893280..ca084c5098 100644 --- a/source/source_lcao/module_lr/utils/lr_util.hpp +++ b/source/source_lcao/module_lr/utils/lr_util.hpp @@ -7,7 +7,11 @@ #include "source_base/module_external/scalapack_connector.h" #include #include +#include +#include #include +#include +#include namespace LR_Util { /// =================PHYSICS==================== diff --git a/source/source_lcao/module_ri/rpa_lri.hpp b/source/source_lcao/module_ri/rpa_lri.hpp index 7a5f7fb5fe..a79cfb88d2 100644 --- a/source/source_lcao/module_ri/rpa_lri.hpp +++ b/source/source_lcao/module_ri/rpa_lri.hpp @@ -1213,10 +1213,9 @@ void RPA_LRI::out_struc(const UnitCell& ucell) return; } ModuleBase::TITLE("DFT_RPA_interface", "out_struc"); - double TWOPI_Bohr2A = ModuleBase::TWO_PI * ModuleBase::BOHR_TO_A; const int nks_tot = PARAM.inp.nspin == 2 ? (int)p_kv->get_nks() / 2 : p_kv->get_nks(); - ModuleBase::Matrix3 lat = ucell.latvec / ModuleBase::BOHR_TO_A; - ModuleBase::Matrix3 G_RPA = ucell.G * TWOPI_Bohr2A; + const ModuleBase::Matrix3 lat = ucell.latvec * ucell.lat0; // in unit of Bohr + const ModuleBase::Matrix3 G_RPA = ucell.G * (ModuleBase::TWO_PI / ucell.lat0); // in unit of 1/Bohr std::stringstream ss; ss << "stru_out"; std::ofstream ofs; @@ -1231,22 +1230,13 @@ void RPA_LRI::out_struc(const UnitCell& ucell) ofs << G_RPA.e31 << std::setw(15) << G_RPA.e32 << std::setw(15) << G_RPA.e33 << std::endl; ofs << ucell.nat << std::endl; - std::string& Coordinate = ucell.Coordinate; - bool direct = (Coordinate == "Direct"); - // Only consider Direct or Cartesian for (int it = 0; it < ucell.ntype; it++) { - Atom* atom = &ucell.atoms[it]; for (int ia = 0; ia < ucell.atoms[it].na; ia++) { - const double& x = direct ? ucell.atoms[it].tau[ia].x * ucell.lat0 - : ucell.atoms[it].tau[ia].x; - const double& y = direct ? ucell.atoms[it].tau[ia].y * ucell.lat0 - : ucell.atoms[it].tau[ia].y; - const double& z = direct ? ucell.atoms[it].tau[ia].z * ucell.lat0 - : ucell.atoms[it].tau[ia].z; - ofs << std::setw(15) << x << std::setw(15) << y << std::setw(15) << z - << std::setw(15) << it + 1 << std::endl; + const ModuleBase::Vector3 position = ucell.atoms[it].tau[ia] * ucell.lat0; // in unit of Bohr + ofs << std::setw(15) << position.x << std::setw(15) << position.y + << std::setw(15) << position.z << std::setw(15) << it + 1 << std::endl; } } @@ -1254,9 +1244,10 @@ void RPA_LRI::out_struc(const UnitCell& ucell) for (int ik = 0; ik != nks_tot; ik++) { - ofs << std::setw(15) << p_kv->kvec_c[ik].x * TWOPI_Bohr2A << std::setw(15) - << p_kv->kvec_c[ik].y * TWOPI_Bohr2A << std::setw(15) - << p_kv->kvec_c[ik].z * TWOPI_Bohr2A << std::endl; + const ModuleBase::Vector3 kpoint = + p_kv->kvec_c[ik] * (ModuleBase::TWO_PI / ucell.lat0); // in unit of 1/Bohr + ofs << std::setw(15) << kpoint.x << std::setw(15) << kpoint.y + << std::setw(15) << kpoint.z << std::endl; } // added for BZ to IBZ (actually LibRPA interface only support BZ by 2025/03/30) if (PARAM.inp.symmetry == "-1") diff --git a/tests/08_EXX/58_KP_LR_BSE/INPUT b/tests/08_EXX/58_KP_LR_BSE/INPUT new file mode 100644 index 0000000000..872b8550fa --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/INPUT @@ -0,0 +1,21 @@ +INPUT_PARAMETERS +suffix autotest +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB +calculation nscf +ntype 1 +nbands 2 +basis_type lcao +rpa_outdir librpa.d + +esolver_type lr +xc_kernel bse +lr_solver elpa +lr_nstates -1 +nocc 1 +nvirt 1 +out_wfc_lr 0 + +bse_spin_types singlet triplet +bse_tda tda +bse_use_fine_kgrid 0 diff --git a/tests/08_EXX/58_KP_LR_BSE/KPT b/tests/08_EXX/58_KP_LR_BSE/KPT new file mode 100644 index 0000000000..f5f7f4ec34 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/KPT @@ -0,0 +1,4 @@ +K_POINTS +0 +Gamma +2 2 2 0 0 0 diff --git a/tests/08_EXX/58_KP_LR_BSE/README b/tests/08_EXX/58_KP_LR_BSE/README new file mode 100644 index 0000000000..d8fa0e0250 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/README @@ -0,0 +1 @@ +test for Bethe-Salpeter Equation for two-atom H `2x2x2` solid case. diff --git a/tests/08_EXX/58_KP_LR_BSE/STRU b/tests/08_EXX/58_KP_LR_BSE/STRU new file mode 100644 index 0000000000..6293228374 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +H 1.008 H_ONCV_PBE-1.0.upf + +NUMERICAL_ORBITAL +H_gga_6au_60Ry_1s.orb + +LATTICE_CONSTANT +1.8897261254578281 + +LATTICE_VECTORS +0.000000 1.500000 1.500000 +1.500000 0.000000 1.500000 +1.500000 1.500000 0.000000 + +ATOMIC_POSITIONS +Direct + +H +0.0 +2 +0.000000 0.000000 0.000000 0 0 0 +0.500000 0.500000 0.500000 0 0 0 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Cs_data_0.txt b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Cs_data_0.txt new file mode 100644 index 0000000000..853d3fae03 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Cs_data_0.txt @@ -0,0 +1,97 @@ +2 0 +1 1 -1 -1 -1 1 +1 1 + 0.023781007374050 +1 1 -1 -1 0 1 +1 1 + 0.035550024962663 +1 1 -1 0 -1 1 +1 1 + 0.035550024962663 +1 1 -1 0 0 1 +1 1 + 0.035550024962663 +1 1 0 -1 -1 1 +1 1 + 0.035550024962663 +1 1 0 -1 0 1 +1 1 + 0.035550024962663 +1 1 0 0 -1 1 +1 1 + 0.035550024962663 +1 1 0 0 0 1 +1 1 + 0.118270737702608 +1 2 -1 -1 -1 1 +1 1 + 0.032522620527264 +1 2 -1 -1 0 1 +1 1 + 0.043863805880635 +1 2 -1 0 -1 1 +1 1 + 0.043863805880635 +1 2 -1 0 0 1 +1 1 + 0.043863805880635 +1 2 0 -1 -1 1 +1 1 + 0.043863805880635 +1 2 0 -1 0 1 +1 1 + 0.043863805880635 +1 2 0 0 -1 1 +1 1 + 0.043863805880635 +1 2 0 0 0 1 +1 1 + 0.032522620527264 +2 1 -1 -1 -1 1 +1 1 + 0.032522620527264 +2 1 -1 -1 0 1 +1 1 + 0.043863805880635 +2 1 -1 0 -1 1 +1 1 + 0.043863805880635 +2 1 -1 0 0 1 +1 1 + 0.043863805880635 +2 1 0 -1 -1 1 +1 1 + 0.043863805880635 +2 1 0 -1 0 1 +1 1 + 0.043863805880635 +2 1 0 0 -1 1 +1 1 + 0.043863805880635 +2 1 0 0 0 1 +1 1 + 0.032522620527264 +2 2 -1 -1 -1 1 +1 1 + 0.023781007374050 +2 2 -1 -1 0 1 +1 1 + 0.035550024962663 +2 2 -1 0 -1 1 +1 1 + 0.035550024962663 +2 2 -1 0 0 1 +1 1 + 0.035550024962663 +2 2 0 -1 -1 1 +1 1 + 0.035550024962663 +2 2 0 -1 0 1 +1 1 + 0.035550024962663 +2 2 0 0 -1 1 +1 1 + 0.035550024962663 +2 2 0 0 0 1 +1 1 + 0.118270737702608 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Cs_shrinked_data_0.txt b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Cs_shrinked_data_0.txt new file mode 100644 index 0000000000..853d3fae03 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Cs_shrinked_data_0.txt @@ -0,0 +1,97 @@ +2 0 +1 1 -1 -1 -1 1 +1 1 + 0.023781007374050 +1 1 -1 -1 0 1 +1 1 + 0.035550024962663 +1 1 -1 0 -1 1 +1 1 + 0.035550024962663 +1 1 -1 0 0 1 +1 1 + 0.035550024962663 +1 1 0 -1 -1 1 +1 1 + 0.035550024962663 +1 1 0 -1 0 1 +1 1 + 0.035550024962663 +1 1 0 0 -1 1 +1 1 + 0.035550024962663 +1 1 0 0 0 1 +1 1 + 0.118270737702608 +1 2 -1 -1 -1 1 +1 1 + 0.032522620527264 +1 2 -1 -1 0 1 +1 1 + 0.043863805880635 +1 2 -1 0 -1 1 +1 1 + 0.043863805880635 +1 2 -1 0 0 1 +1 1 + 0.043863805880635 +1 2 0 -1 -1 1 +1 1 + 0.043863805880635 +1 2 0 -1 0 1 +1 1 + 0.043863805880635 +1 2 0 0 -1 1 +1 1 + 0.043863805880635 +1 2 0 0 0 1 +1 1 + 0.032522620527264 +2 1 -1 -1 -1 1 +1 1 + 0.032522620527264 +2 1 -1 -1 0 1 +1 1 + 0.043863805880635 +2 1 -1 0 -1 1 +1 1 + 0.043863805880635 +2 1 -1 0 0 1 +1 1 + 0.043863805880635 +2 1 0 -1 -1 1 +1 1 + 0.043863805880635 +2 1 0 -1 0 1 +1 1 + 0.043863805880635 +2 1 0 0 -1 1 +1 1 + 0.043863805880635 +2 1 0 0 0 1 +1 1 + 0.032522620527264 +2 2 -1 -1 -1 1 +1 1 + 0.023781007374050 +2 2 -1 -1 0 1 +1 1 + 0.035550024962663 +2 2 -1 0 -1 1 +1 1 + 0.035550024962663 +2 2 -1 0 0 1 +1 1 + 0.035550024962663 +2 2 0 -1 -1 1 +1 1 + 0.035550024962663 +2 2 0 -1 0 1 +1 1 + 0.035550024962663 +2 2 0 0 -1 1 +1 1 + 0.035550024962663 +2 2 0 0 0 1 +1 1 + 0.118270737702608 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_0.dat b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_0.dat new file mode 100644 index 0000000000..7a7e46c946 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_0.dat @@ -0,0 +1,5 @@ +1 + -0.211392064220322 0.000000000000000 + 1.482867714512440 0.000000000000000 + -0.340798391533932 0.000000000000000 + -1.458574550678354 0.000000000000000 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_1.dat b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_1.dat new file mode 100644 index 0000000000..0acba4a99f --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_1.dat @@ -0,0 +1,5 @@ +2 + 0.000000118098400 -0.000000000000000 + -1.126492035754905 -0.000000000000000 + -1.126492035754905 0.000000004555592 + -0.000000118098401 0.000000000000000 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_2.dat b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_2.dat new file mode 100644 index 0000000000..f45fd1e81e --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_2.dat @@ -0,0 +1,5 @@ +3 + 0.000000111397612 -0.000000000000000 + -1.126492035754906 -0.000000000000000 + -1.126492035754906 0.000000004829620 + -0.000000111397612 0.000000000000000 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_3.dat b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_3.dat new file mode 100644 index 0000000000..2e10ecb14b --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_3.dat @@ -0,0 +1,5 @@ +4 + -0.597107383339528 0.000000000000000 + 1.247111407154273 0.000000000000000 + 0.966725009655534 -0.000000000000000 + 0.988568077979153 -0.000000000000000 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_4.dat b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_4.dat new file mode 100644 index 0000000000..17cebe1d82 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_4.dat @@ -0,0 +1,5 @@ +5 + 0.000000116681840 -0.000000000000000 + -1.126492035754906 -0.000000000000000 + -1.126492035754906 0.000000004610899 + -0.000000116681840 0.000000000000000 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_5.dat b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_5.dat new file mode 100644 index 0000000000..96d841e935 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_5.dat @@ -0,0 +1,5 @@ +6 + -0.597107383339531 0.000000000000000 + 1.247111407154272 0.000000000000000 + 0.966725009655531 -0.000000000000000 + 0.988568077979156 -0.000000000000000 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_6.dat b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_6.dat new file mode 100644 index 0000000000..020fa957ea --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_6.dat @@ -0,0 +1,5 @@ +7 + -0.597107383339531 -0.000000000000000 + 1.247111407154271 -0.000000000000000 + 0.966725009655531 -0.000000000000000 + 0.988568077979156 -0.000000000000000 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_7.dat b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_7.dat new file mode 100644 index 0000000000..9908f42e67 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/KS_eigenvector_7.dat @@ -0,0 +1,5 @@ +8 + 0.000000111972237 0.000000000000000 + -1.126492035754906 0.000000000000000 + -1.126492035754906 -0.000000004804835 + -0.000000111972237 -0.000000000000000 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_0_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_0_ifreq_0.mtx new file mode 100644 index 0000000000..79ec958aec --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_0_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 0 ( -1 -1 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -3.014848986177045e+00 -1.074669998415673e-08 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_1_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_1_ifreq_0.mtx new file mode 100644 index 0000000000..a95c344c89 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_1_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 1 ( -1 -1 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.187286527245101e+00 -5.651939009937014e-20 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_2_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_2_ifreq_0.mtx new file mode 100644 index 0000000000..fdb3e25aa5 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_2_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 2 ( -1 0 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.187286527223570e+00 -8.086248834619319e-20 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_3_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_3_ifreq_0.mtx new file mode 100644 index 0000000000..c6b71b1a40 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_3_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 3 ( -1 0 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.187286527254518e+00 -4.865021828787878e-09 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_4_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_4_ifreq_0.mtx new file mode 100644 index 0000000000..56f3fcb16a --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_4_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 4 ( 0 -1 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.187286527254976e+00 -4.518763609285307e-20 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_5_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_5_ifreq_0.mtx new file mode 100644 index 0000000000..9bd60e5a1e --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_5_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 5 ( 0 -1 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.187286527285739e+00 -4.865021828752626e-09 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_6_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_6_ifreq_0.mtx new file mode 100644 index 0000000000..e4bbf2b3ce --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_6_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 6 ( 0 0 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.187286527264232e+00 -4.865021828776910e-09 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_7_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_7_ifreq_0.mtx new file mode 100644 index 0000000000..19661392f3 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_0_iR_7_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 7 ( 0 0 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -1.049576608934262e+01 0.000000000000000e+00 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_0_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_0_ifreq_0.mtx new file mode 100644 index 0000000000..cfdd69165d --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_0_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 0 ( -1 -1 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -5.830726932830133e+00 -2.739662517037108e-09 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_1_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_1_ifreq_0.mtx new file mode 100644 index 0000000000..f4b8ba0be5 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_1_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 1 ( -1 -1 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.292874103881408e+00 6.551226644133552e-10 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_2_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_2_ifreq_0.mtx new file mode 100644 index 0000000000..f606ce46cf --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_2_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 2 ( -1 0 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.292874100293510e+00 6.551224619628706e-10 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_3_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_3_ifreq_0.mtx new file mode 100644 index 0000000000..e2e1b72ef5 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_3_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 3 ( -1 0 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.292874103491435e+00 8.723752408093539e-10 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_4_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_4_ifreq_0.mtx new file mode 100644 index 0000000000..fbad2ba222 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_4_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 4 ( 0 -1 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.292874104843184e+00 6.551227211605768e-10 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_5_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_5_ifreq_0.mtx new file mode 100644 index 0000000000..0d048084c8 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_5_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 5 ( 0 -1 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.292874108041280e+00 8.723755060411628e-10 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_6_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_6_ifreq_0.mtx new file mode 100644 index 0000000000..1c1a57afa3 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_6_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 6 ( 0 0 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.292874104453428e+00 8.723752988239604e-10 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_7_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_7_ifreq_0.mtx new file mode 100644 index 0000000000..c0ab671472 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_0_Nu_1_iR_7_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 7 ( 0 0 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -5.830726338969640e+00 -1.842829372327281e-09 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_0_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_0_ifreq_0.mtx new file mode 100644 index 0000000000..b46a6cdfd8 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_0_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 0 ( -1 -1 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -5.830726932830133e+00 -3.914040765737529e-10 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_1_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_1_ifreq_0.mtx new file mode 100644 index 0000000000..db43c6884c --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_1_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 1 ( -1 -1 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.292874103881408e+00 -6.551226729271012e-10 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_2_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_2_ifreq_0.mtx new file mode 100644 index 0000000000..342232c2a2 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_2_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 2 ( -1 0 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.292874100293510e+00 -6.551224785794459e-10 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_3_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_3_ifreq_0.mtx new file mode 100644 index 0000000000..ec12475794 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_3_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 3 ( -1 0 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.292874103491435e+00 1.713149659671552e-10 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_4_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_4_ifreq_0.mtx new file mode 100644 index 0000000000..ea384c4059 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_4_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 4 ( 0 -1 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.292874104843184e+00 -6.551227275027854e-10 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_5_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_5_ifreq_0.mtx new file mode 100644 index 0000000000..4700253086 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_5_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 5 ( 0 -1 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.292874108041280e+00 1.713147110104759e-10 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_6_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_6_ifreq_0.mtx new file mode 100644 index 0000000000..0301ce3cb3 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_6_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 6 ( 0 0 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.292874104453428e+00 1.713149101250643e-10 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_7_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_7_ifreq_0.mtx new file mode 100644 index 0000000000..e82a90f41a --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_0_iR_7_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 7 ( 0 0 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -5.830726338969640e+00 1.842829372327281e-09 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_0_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_0_ifreq_0.mtx new file mode 100644 index 0000000000..e3f350782c --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_0_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 0 ( -1 -1 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -4.747572945112817e+00 -4.891407845740396e-09 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_1_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_1_ifreq_0.mtx new file mode 100644 index 0000000000..a7218c3fe5 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_1_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 1 ( -1 -1 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.191521849919796e+00 -5.503853000774708e-21 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_2_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_2_ifreq_0.mtx new file mode 100644 index 0000000000..2e890ac8e4 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_2_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 2 ( -1 0 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.191521849917845e+00 -7.629293584729713e-21 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_3_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_3_ifreq_0.mtx new file mode 100644 index 0000000000..7930c6c4a8 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_3_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 3 ( -1 0 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.191521849920789e+00 -2.874998591938876e-09 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_4_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_4_ifreq_0.mtx new file mode 100644 index 0000000000..d68d28d704 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_4_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 4 ( 0 -1 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.191521849920862e+00 -4.082136322949192e-21 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_5_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_5_ifreq_0.mtx new file mode 100644 index 0000000000..f322b005e2 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_5_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 5 ( 0 -1 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.191521849923677e+00 -2.874998591935613e-09 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_6_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_6_ifreq_0.mtx new file mode 100644 index 0000000000..9f68703029 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_6_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 6 ( 0 0 -1 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -6.191521849921659e+00 -2.874998591937894e-09 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_7_ifreq_0.mtx b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_7_ifreq_0.mtx new file mode 100644 index 0000000000..3714ab8a77 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/Wc_Mu_1_Nu_1_iR_7_ifreq_0.mtx @@ -0,0 +1,6 @@ +%%MatrixMarket matrix coordinate complex general +% +% Wc at iR 7 ( 0 0 0 ) and ifreq 0 ( 0.011837 a.u. ) +% +1 1 1 +1 1 -8.737630194410357e+00 0.000000000000000e+00 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/band_out b/tests/08_EXX/58_KP_LR_BSE/librpa.d/band_out new file mode 100644 index 0000000000..ed147e6ea2 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/band_out @@ -0,0 +1,29 @@ +8 +1 +2 +2 +0.045383120663478 + 1 1 + 1 2.000000000000000 -0.418443297070489 -11.386426260130715 + 2 0.000000000000000 0.818493816886756 22.272359374857000 + 2 1 + 1 2.000000000000000 -0.004110027863140 -0.111839595754949 + 2 0.000000000000000 0.107186825280853 2.916703148700099 + 3 1 + 1 2.000000000000000 -0.004110027842112 -0.111839595182743 + 2 0.000000000000000 0.107186825262246 2.916703148193786 + 4 1 + 1 2.000000000000000 0.035804686235321 0.974295495805057 + 2 0.000000000000000 0.478116272274642 13.010211218909113 + 5 1 + 1 2.000000000000000 -0.004110027856568 -0.111839595576099 + 2 0.000000000000000 0.107186825275038 2.916703148541857 + 6 1 + 1 2.000000000000000 0.035804686235320 0.974295495805040 + 2 0.000000000000000 0.478116272274644 13.010211218909172 + 7 1 + 1 2.000000000000000 0.035804686235323 0.974295495805118 + 2 0.000000000000000 0.478116272274642 13.010211218909093 + 8 1 + 1 2.000000000000000 -0.004110027835850 -0.111839595012346 + 2 0.000000000000000 0.107186825256707 2.916703148043063 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/coulomb_cut_0.txt b/tests/08_EXX/58_KP_LR_BSE/librpa.d/coulomb_cut_0.txt new file mode 100644 index 0000000000..100769c1dd --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/coulomb_cut_0.txt @@ -0,0 +1,73 @@ +8 +2 1 1 1 1 +1 0.125000000000000 + 52.820337875530321 0.000000000000000 +2 1 1 2 2 +1 0.125000000000000 + 48.717889095588660 0.000000000000000 +2 1 1 1 1 +2 0.125000000000000 + 9.920300195734141 -0.000000000000003 +2 1 1 2 2 +2 0.125000000000000 + -0.000000000000003 -0.000000000000003 +2 1 1 1 1 +3 0.125000000000000 + 9.920300195734137 -0.000000000000003 +2 1 1 2 2 +3 0.125000000000000 + -0.000000000000003 -0.000000000000003 +2 1 1 1 1 +4 0.125000000000000 + 3.505023788349318 -0.000000000000001 +2 1 1 2 2 +4 0.125000000000000 + -2.658133861164212 -0.000000000000000 +2 1 1 1 1 +5 0.125000000000000 + 9.920300195734136 -0.000000000000003 +2 1 1 2 2 +5 0.125000000000000 + 0.000000000000001 -0.000000000000003 +2 1 1 1 1 +6 0.125000000000000 + 3.505023788349314 -0.000000000000001 +2 1 1 2 2 +6 0.125000000000000 + -2.658133861164214 -0.000000000000000 +2 1 1 1 1 +7 0.125000000000000 + 3.505023788349318 -0.000000000000001 +2 1 1 2 2 +7 0.125000000000000 + -2.658133861164212 -0.000000000000000 +2 1 1 1 1 +8 0.125000000000000 + 9.920300195734136 0.000000000000001 +2 1 1 2 2 +8 0.125000000000000 + 0.000000000000003 0.000000000000000 +2 2 2 2 2 +1 0.125000000000000 + 52.820337875530321 0.000000000000000 +2 2 2 2 2 +2 0.125000000000000 + 9.920300195734141 -0.000000000000003 +2 2 2 2 2 +3 0.125000000000000 + 9.920300195734137 -0.000000000000003 +2 2 2 2 2 +4 0.125000000000000 + 3.505023788349318 -0.000000000000001 +2 2 2 2 2 +5 0.125000000000000 + 9.920300195734136 -0.000000000000003 +2 2 2 2 2 +6 0.125000000000000 + 3.505023788349314 -0.000000000000001 +2 2 2 2 2 +7 0.125000000000000 + 3.505023788349318 -0.000000000000001 +2 2 2 2 2 +8 0.125000000000000 + 9.920300195734136 0.000000000000001 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/coulomb_mat_0.txt b/tests/08_EXX/58_KP_LR_BSE/librpa.d/coulomb_mat_0.txt new file mode 100644 index 0000000000..fd85522200 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/coulomb_mat_0.txt @@ -0,0 +1,73 @@ +8 +2 1 1 1 1 +1 0.125000000000000 + 57.169773387941540 0.000000000000000 +2 1 1 2 2 +1 0.125000000000000 + 54.628564753801250 0.000000000000000 +2 1 1 1 1 +2 0.125000000000000 + 7.134447849353242 -0.000000000000003 +2 1 1 2 2 +2 0.125000000000000 + 0.000000000000002 -0.000000000000003 +2 1 1 1 1 +3 0.125000000000000 + 7.134447849353242 -0.000000000000003 +2 1 1 2 2 +3 0.125000000000000 + 0.000000000000000 -0.000000000000003 +2 1 1 1 1 +4 0.125000000000000 + 5.586132300716569 -0.000000000000000 +2 1 1 2 2 +4 0.125000000000000 + -1.870761920300694 -0.000000000000000 +2 1 1 1 1 +5 0.125000000000000 + 7.134447849353241 -0.000000000000003 +2 1 1 2 2 +5 0.125000000000000 + 0.000000000000000 -0.000000000000003 +2 1 1 1 1 +6 0.125000000000000 + 5.586132300716570 -0.000000000000000 +2 1 1 2 2 +6 0.125000000000000 + -1.870761920300691 -0.000000000000000 +2 1 1 1 1 +7 0.125000000000000 + 5.586132300716570 -0.000000000000000 +2 1 1 2 2 +7 0.125000000000000 + -1.870761920300691 -0.000000000000000 +2 1 1 1 1 +8 0.125000000000000 + 7.134447849353241 0.000000000000000 +2 1 1 2 2 +8 0.125000000000000 + 0.000000000000000 0.000000000000000 +2 2 2 2 2 +1 0.125000000000000 + 57.169773387941540 0.000000000000000 +2 2 2 2 2 +2 0.125000000000000 + 7.134447849353242 -0.000000000000003 +2 2 2 2 2 +3 0.125000000000000 + 7.134447849353242 -0.000000000000003 +2 2 2 2 2 +4 0.125000000000000 + 5.586132300716569 -0.000000000000000 +2 2 2 2 2 +5 0.125000000000000 + 7.134447849353241 -0.000000000000003 +2 2 2 2 2 +6 0.125000000000000 + 5.586132300716570 -0.000000000000000 +2 2 2 2 2 +7 0.125000000000000 + 5.586132300716570 -0.000000000000000 +2 2 2 2 2 +8 0.125000000000000 + 7.134447849353241 0.000000000000000 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/coulomb_unshrinked_cut_0.txt b/tests/08_EXX/58_KP_LR_BSE/librpa.d/coulomb_unshrinked_cut_0.txt new file mode 100644 index 0000000000..100769c1dd --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/coulomb_unshrinked_cut_0.txt @@ -0,0 +1,73 @@ +8 +2 1 1 1 1 +1 0.125000000000000 + 52.820337875530321 0.000000000000000 +2 1 1 2 2 +1 0.125000000000000 + 48.717889095588660 0.000000000000000 +2 1 1 1 1 +2 0.125000000000000 + 9.920300195734141 -0.000000000000003 +2 1 1 2 2 +2 0.125000000000000 + -0.000000000000003 -0.000000000000003 +2 1 1 1 1 +3 0.125000000000000 + 9.920300195734137 -0.000000000000003 +2 1 1 2 2 +3 0.125000000000000 + -0.000000000000003 -0.000000000000003 +2 1 1 1 1 +4 0.125000000000000 + 3.505023788349318 -0.000000000000001 +2 1 1 2 2 +4 0.125000000000000 + -2.658133861164212 -0.000000000000000 +2 1 1 1 1 +5 0.125000000000000 + 9.920300195734136 -0.000000000000003 +2 1 1 2 2 +5 0.125000000000000 + 0.000000000000001 -0.000000000000003 +2 1 1 1 1 +6 0.125000000000000 + 3.505023788349314 -0.000000000000001 +2 1 1 2 2 +6 0.125000000000000 + -2.658133861164214 -0.000000000000000 +2 1 1 1 1 +7 0.125000000000000 + 3.505023788349318 -0.000000000000001 +2 1 1 2 2 +7 0.125000000000000 + -2.658133861164212 -0.000000000000000 +2 1 1 1 1 +8 0.125000000000000 + 9.920300195734136 0.000000000000001 +2 1 1 2 2 +8 0.125000000000000 + 0.000000000000003 0.000000000000000 +2 2 2 2 2 +1 0.125000000000000 + 52.820337875530321 0.000000000000000 +2 2 2 2 2 +2 0.125000000000000 + 9.920300195734141 -0.000000000000003 +2 2 2 2 2 +3 0.125000000000000 + 9.920300195734137 -0.000000000000003 +2 2 2 2 2 +4 0.125000000000000 + 3.505023788349318 -0.000000000000001 +2 2 2 2 2 +5 0.125000000000000 + 9.920300195734136 -0.000000000000003 +2 2 2 2 2 +6 0.125000000000000 + 3.505023788349314 -0.000000000000001 +2 2 2 2 2 +7 0.125000000000000 + 3.505023788349318 -0.000000000000001 +2 2 2 2 2 +8 0.125000000000000 + 9.920300195734136 0.000000000000001 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/energy_qp b/tests/08_EXX/58_KP_LR_BSE/librpa.d/energy_qp new file mode 100644 index 0000000000..9d30431692 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/energy_qp @@ -0,0 +1,50 @@ + state occ_num e_gs(Ha) e_qp(Ha) +--------------------------------------------------------------------------------------------------- + K_point 1 : 0.0000 0.0000 0.0000 +--------------------------------------------------------------------------------------------------- + 1 2.0000 -4.1844329707E-01 -1.0662563499E+00 + 2 0.0000 8.1849381689E-01 1.3666967495E+00 +--------------------------------------------------------------------------------------------------- + + K_point 2 : 0.5000 0.0000 0.0000 +--------------------------------------------------------------------------------------------------- + 1 2.0000 -4.1100278631E-03 -8.5128319523E-01 + 2 0.0000 1.0718682528E-01 1.0006355693E+00 +--------------------------------------------------------------------------------------------------- + + K_point 3 : 0.0000 0.5000 0.0000 +--------------------------------------------------------------------------------------------------- + 1 2.0000 -4.1100278421E-03 -8.5128319525E-01 + 2 0.0000 1.0718682526E-01 1.0006355693E+00 +--------------------------------------------------------------------------------------------------- + + K_point 4 : 0.5000 0.5000 0.0000 +--------------------------------------------------------------------------------------------------- + 1 2.0000 3.5804686235E-02 -8.0097454793E-01 + 2 0.0000 4.7811627227E-01 1.1852726998E+00 +--------------------------------------------------------------------------------------------------- + + K_point 5 : 0.0000 0.0000 0.5000 +--------------------------------------------------------------------------------------------------- + 1 2.0000 -4.1100278566E-03 -8.5128319523E-01 + 2 0.0000 1.0718682528E-01 1.0006355693E+00 +--------------------------------------------------------------------------------------------------- + + K_point 6 : 0.5000 0.0000 0.5000 +--------------------------------------------------------------------------------------------------- + 1 2.0000 3.5804686235E-02 -8.0097454793E-01 + 2 0.0000 4.7811627227E-01 1.1852726998E+00 +--------------------------------------------------------------------------------------------------- + + K_point 7 : 0.0000 0.5000 0.5000 +--------------------------------------------------------------------------------------------------- + 1 2.0000 3.5804686235E-02 -8.0097454793E-01 + 2 0.0000 4.7811627227E-01 1.1852726998E+00 +--------------------------------------------------------------------------------------------------- + + K_point 8 : 0.5000 0.5000 0.5000 +--------------------------------------------------------------------------------------------------- + 1 2.0000 -4.1100278358E-03 -8.5128319545E-01 + 2 0.0000 1.0718682526E-01 1.0006355694E+00 +--------------------------------------------------------------------------------------------------- + diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/shrink_sinvS_0.txt b/tests/08_EXX/58_KP_LR_BSE/librpa.d/shrink_sinvS_0.txt new file mode 100644 index 0000000000..662073ae03 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/shrink_sinvS_0.txt @@ -0,0 +1,97 @@ +8 +2 2 1 1 1 1 +1 0.125 +1.000000000000000e+00 0.000000000000000e+00 +2 2 1 1 2 2 +1 1.250000000000000e-01 +-1.665334536937735e-16 0.000000000000000e+00 +2 2 1 1 1 1 +2 1.250000000000000e-01 +9.999999999999996e-01 5.909582418947802e-18 +2 2 1 1 2 2 +2 1.250000000000000e-01 +4.134965928855631e-18 -1.344291978613625e-17 +2 2 1 1 1 1 +3 1.250000000000000e-01 +1.000000000000000e+00 -2.715861269900361e-18 +2 2 1 1 2 2 +3 1.250000000000000e-01 +6.606382252198065e-19 -1.344291978613625e-17 +2 2 1 1 1 1 +4 1.250000000000000e-01 +9.999999999999998e-01 4.213818783867034e-33 +2 2 1 1 2 2 +4 1.250000000000000e-01 +-9.714451465470120e-17 -6.162975822039155e-33 +2 2 1 1 1 1 +5 1.250000000000000e-01 +1.000000000000000e+00 -1.761745267608357e-18 +2 2 1 1 2 2 +5 1.250000000000000e-01 +-6.525230398068041e-19 -1.344291978613626e-17 +2 2 1 1 1 1 +6 1.250000000000000e-01 +9.999999999999998e-01 8.077875676200778e-33 +2 2 1 1 2 2 +6 1.250000000000000e-01 +-5.551115123125783e-17 -6.162975822039155e-33 +2 2 1 1 1 1 +7 1.250000000000000e-01 +9.999999999999998e-01 8.242547292832847e-34 +2 2 1 1 2 2 +7 1.250000000000000e-01 +-5.551115123125783e-17 -7.703719777548943e-33 +2 2 1 1 1 1 +8 1.250000000000000e-01 +1.000000000000000e+00 -3.142270614711928e-18 +2 2 1 1 2 2 +8 1.250000000000000e-01 +-6.487041644381414e-19 1.344291978613627e-17 +2 2 2 2 1 1 +1 1.250000000000000e-01 +-1.665334536937735e-16 0.000000000000000e+00 +2 2 2 2 2 2 +1 1.250000000000000e-01 +1.000000000000000e+00 0.000000000000000e+00 +2 2 2 2 1 1 +2 1.250000000000000e-01 +-4.134965928855632e-18 1.344291978613627e-17 +2 2 2 2 2 2 +2 1.250000000000000e-01 +1.000000000000000e+00 -1.206540537756551e-34 +2 2 2 2 1 1 +3 1.250000000000000e-01 +-6.606382252198066e-19 1.344291978613625e-17 +2 2 2 2 2 2 +3 1.250000000000000e-01 +1.000000000000000e+00 4.892979536448430e-36 +2 2 2 2 1 1 +4 1.250000000000000e-01 +-9.714451465470120e-17 9.244463733058732e-33 +2 2 2 2 2 2 +4 1.250000000000000e-01 +9.999999999999998e-01 3.150585202979188e-34 +2 2 2 2 1 1 +5 1.250000000000000e-01 +6.525230398068040e-19 1.344291978613626e-17 +2 2 2 2 2 2 +5 1.250000000000000e-01 +1.000000000000000e+00 -4.008776297438376e-35 +2 2 2 2 1 1 +6 1.250000000000000e-01 +-5.551115123125783e-17 9.244463733058732e-33 +2 2 2 2 2 2 +6 1.250000000000000e-01 +9.999999999999998e-01 1.075011530735806e-34 +2 2 2 2 1 1 +7 1.250000000000000e-01 +-5.551115123125783e-17 6.162975822039155e-33 +2 2 2 2 2 2 +7 1.250000000000000e-01 +9.999999999999998e-01 -1.592692664384872e-34 +2 2 2 2 1 1 +8 1.250000000000000e-01 +6.487041644381415e-19 -1.344291978613626e-17 +2 2 2 2 2 2 +8 1.250000000000000e-01 +1.000000000000000e+00 1.324152753523311e-34 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/stru_out b/tests/08_EXX/58_KP_LR_BSE/librpa.d/stru_out new file mode 100644 index 0000000000..80553284ed --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/stru_out @@ -0,0 +1,26 @@ +0.000000000 2.834589188 2.834589188 +2.834589188 0.000000000 2.834589188 +2.834589188 2.834589188 0.000000000 +-1.108306158 1.108306158 1.108306158 +1.108306158 -1.108306158 1.108306158 +1.108306158 1.108306158 -1.108306158 +2 + 0.000000000 0.000000000 0.000000000 1 + 2.834589188 2.834589188 2.834589188 1 +2 2 2 + 0.000000000 0.000000000 0.000000000 + -0.554153079 0.554153079 0.554153079 + 0.554153079 -0.554153079 0.554153079 + 0.000000000 0.000000000 1.108306158 + 0.554153079 0.554153079 -0.554153079 + 0.000000000 1.108306158 0.000000000 + 1.108306158 0.000000000 0.000000000 + 0.554153079 0.554153079 0.554153079 +1 +2 +3 +4 +5 +6 +7 +8 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/velocity_matrix b/tests/08_EXX/58_KP_LR_BSE/librpa.d/velocity_matrix new file mode 100644 index 0000000000..bc7b84c2b7 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/velocity_matrix @@ -0,0 +1,124 @@ +8 +1 +2 +2 + 1 1 1 + 0.0000000000000000 0.0000000000000001 + 0.0000000000000000 0.0000000000000001 + 0.0000000000000000 0.0000000000000001 + 0.0000000000000000 0.0000000000000020 + 2 1 1 + 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000007 + 3 1 1 + 0.0000000000000000 0.0000000000000002 + 0.0000000000000000 -0.0000000000000002 + 0.0000000000000000 -0.0000000000000002 + 0.0000000000000000 -0.0000000000000037 + 1 2 1 + -0.0000000000000044 -0.0000000000000005 + 0.0000000240294071 5.9419137943106062 + 0.0000000240294071 -5.9419137943106062 + 0.0000000000000044 -0.0000000000000005 + 2 2 1 + 0.0000000000000044 0.0000000000000002 + -0.0000000240294071 -5.9419137943106062 + -0.0000000240294071 5.9419137943106062 + -0.0000000000000044 0.0000000000000002 + 3 2 1 + 0.0000000000000044 0.0000000000000003 + -0.0000000240294071 -5.9419137943106071 + -0.0000000240294071 5.9419137943106071 + -0.0000000000000044 0.0000000000000003 + 1 3 1 + 0.0000000000000044 0.0000000000000001 + -0.0000000254748238 -5.9419137943106053 + -0.0000000254748238 5.9419137943106053 + -0.0000000000000044 0.0000000000000001 + 2 3 1 + -0.0000000000000044 0.0000000000000001 + 0.0000000254748238 5.9419137943106035 + 0.0000000254748238 -5.9419137943106035 + 0.0000000000000044 0.0000000000000001 + 3 3 1 + 0.0000000000000044 0.0000000000000002 + -0.0000000254748238 -5.9419137943106071 + -0.0000000254748238 5.9419137943106071 + -0.0000000000000044 0.0000000000000002 + 1 4 1 + 0.0000000000000000 -0.0000000000000003 + 0.0000000000000000 0.0000000000000002 + -0.0000000000000000 0.0000000000000002 + -0.0000000000000000 0.0000000000000009 + 2 4 1 + -0.0000000000000000 -0.0000000000000001 + 0.0000000000000000 0.0000000000000001 + -0.0000000000000000 0.0000000000000001 + -0.0000000000000000 0.0000000000000006 + 3 4 1 + 0.0000000000000017 -0.0000000000000006 + -0.0000000000000003 0.0000000000000001 + -0.0000000000000003 0.0000000000000001 + -0.0000000000000004 0.0000000000000001 + 1 5 1 + 0.0000000000000044 0.0000000000000001 + -0.0000000243211331 -5.9419137943106053 + -0.0000000243211331 5.9419137943106053 + -0.0000000000000044 0.0000000000000001 + 2 5 1 + 0.0000000000000044 0.0000000000000002 + -0.0000000243211331 -5.9419137943106062 + -0.0000000243211331 5.9419137943106062 + -0.0000000000000044 0.0000000000000002 + 3 5 1 + -0.0000000000000044 0.0000000000000002 + 0.0000000243211331 5.9419137943106053 + 0.0000000243211331 -5.9419137943106053 + 0.0000000000000044 0.0000000000000002 + 1 6 1 + -0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 -0.0000000000000000 + 0.0000000000000000 -0.0000000000000001 + 2 6 1 + 0.0000000000000017 -0.0000000000000000 + -0.0000000000000003 0.0000000000000000 + -0.0000000000000003 0.0000000000000000 + -0.0000000000000004 -0.0000000000000000 + 3 6 1 + -0.0000000000000000 -0.0000000000000002 + 0.0000000000000000 0.0000000000000001 + -0.0000000000000000 0.0000000000000001 + 0.0000000000000000 0.0000000000000002 + 1 7 1 + 0.0000000000000017 -0.0000000000000006 + -0.0000000000000003 0.0000000000000003 + -0.0000000000000003 0.0000000000000003 + -0.0000000000000004 0.0000000000000013 + 2 7 1 + 0.0000000000000000 -0.0000000000000005 + 0.0000000000000000 0.0000000000000001 + -0.0000000000000000 0.0000000000000001 + 0.0000000000000000 0.0000000000000004 + 3 7 1 + 0.0000000000000000 -0.0000000000000001 + -0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 -0.0000000000000000 + 1 8 1 + 0.0000000000000044 0.0000000000000004 + -0.0000000253440908 5.9419137943106053 + -0.0000000253440908 -5.9419137943106053 + -0.0000000000000044 0.0000000000000004 + 2 8 1 + 0.0000000000000044 -0.0000000000000000 + -0.0000000253440908 5.9419137943106053 + -0.0000000253440908 -5.9419137943106053 + -0.0000000000000044 -0.0000000000000000 + 3 8 1 + 0.0000000000000044 0.0000000000000001 + -0.0000000253440908 5.9419137943106044 + -0.0000000253440908 -5.9419137943106044 + -0.0000000000000044 0.0000000000000001 diff --git a/tests/08_EXX/58_KP_LR_BSE/librpa.d/vxc_out b/tests/08_EXX/58_KP_LR_BSE/librpa.d/vxc_out new file mode 100644 index 0000000000..52b062f725 --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/librpa.d/vxc_out @@ -0,0 +1,19 @@ +8 +1 +2 +-3.8548027411734442e-01 -1.0489456389195610e+01 +-5.6765182777139112e-01 -1.5446598675611121e+01 +-4.2708741496407537e-01 -1.1621644775203780e+01 +-4.8838922058918821e-01 -1.3289752483583754e+01 +-4.2708741493621816e-01 -1.1621644774445747e+01 +-4.8838922061620271e-01 -1.3289752484318857e+01 +-4.5564185481711517e-01 -1.2398650945603029e+01 +-5.3221259777841656e-01 -1.4482247754337214e+01 +-4.2708741495536984e-01 -1.1621644774966891e+01 +-4.8838922059762618e-01 -1.3289752483813363e+01 +-4.5564185481711483e-01 -1.2398650945603020e+01 +-5.3221259777842111e-01 -1.4482247754337337e+01 +-4.5564185481711250e-01 -1.2398650945602956e+01 +-5.3221259777841767e-01 -1.4482247754337244e+01 +-4.2708741492792729e-01 -1.1621644774220140e+01 +-4.8838922062424411e-01 -1.3289752484537674e+01 diff --git a/tests/08_EXX/58_KP_LR_BSE/result.ref b/tests/08_EXX/58_KP_LR_BSE/result.ref new file mode 100644 index 0000000000..f37d60ffff --- /dev/null +++ b/tests/08_EXX/58_KP_LR_BSE/result.ref @@ -0,0 +1,17 @@ +excitationenergyref1 3.688990 +excitationenergyref2 3.688990 +excitationenergyref3 3.688990 +excitationenergyref4 3.788700 +excitationenergyref5 3.965390 +excitationenergyref6 3.965390 +excitationenergyref7 4.113520 +excitationenergyref8 5.225530 +excitationenergyref9 3.688990 +excitationenergyref10 3.688990 +excitationenergyref11 3.688990 +excitationenergyref12 3.788700 +excitationenergyref13 3.955360 +excitationenergyref14 3.965390 +excitationenergyref15 3.965390 +excitationenergyref16 4.863880 +totaltimeref 0.89 diff --git a/tests/08_EXX/CASES_CPU.txt b/tests/08_EXX/CASES_CPU.txt index d89df12064..786750984d 100644 --- a/tests/08_EXX/CASES_CPU.txt +++ b/tests/08_EXX/CASES_CPU.txt @@ -20,4 +20,4 @@ 55_KP_LR 56_GO_RPA_OUTPUT 57_KP_RPA_SHRINK - +58_KP_LR_BSE diff --git a/tools/02_postprocessing/plot-tools/plot_exciton_silce.py b/tools/02_postprocessing/plot-tools/plot_exciton_silce.py index a3445bd0fe..ddadfcdcff 100644 --- a/tools/02_postprocessing/plot-tools/plot_exciton_silce.py +++ b/tools/02_postprocessing/plot-tools/plot_exciton_silce.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 """Plot an ABACUS exciton-density slice. -The current text format is deliberately compact and self-describing:: - +The data text format is deliberately compact and self-describing: + For example: # ABACUS_EXCITON_SLICE 1 # state 0 energy_Ry 0.2265 density_kind conditional_elec # fixed_particle hole position_bohr 2.5 2.5 2.5 @@ -22,10 +22,8 @@ # data -Files written before format version 1 are still accepted. - Usage: - python plot_cond_silce.py FILE.dat [-o FILE.png] + python plot_exciton_slice.py FILE.dat [-o FILE.png] """ import argparse