diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index a2024dec66..c407df99d1 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -2977,7 +2977,7 @@ These variables are relevant when using hybrid functionals with *[basis_type](#b - **Type**: Real - **Availability**: *[calculation](#calculation)==gen_opt_abfs* - **Description**: The threshold when solving for the zeros of spherical Bessel functions. A reasonable choice is 1e-12. -- **Default**: 0 +- **Default**: 1E-12 ### exx_real_number diff --git a/source/source_hamilt/module_xc/exx_info.h b/source/source_hamilt/module_xc/exx_info.h index 0b427b438d..91c4652707 100644 --- a/source/source_hamilt/module_xc/exx_info.h +++ b/source/source_hamilt/module_xc/exx_info.h @@ -81,7 +81,7 @@ struct Exx_Info { int abfs_Lmax = 0; // tmp double ecut_exx = 60; - double tolerence = 1E-2; + double tolerence = 1E-12; double kmesh_times = 4; }; Exx_Info_Opt_ABFs info_opt_abfs; diff --git a/source/source_io/module_parameter/input_parameter.h b/source/source_io/module_parameter/input_parameter.h index db2b5d5a72..b540bfb895 100644 --- a/source/source_io/module_parameter/input_parameter.h +++ b/source/source_io/module_parameter/input_parameter.h @@ -546,7 +546,7 @@ struct Input_para ///< calculating Columb potential is to that of atomic orbitals int exx_opt_orb_lmax = 0; ///< the maximum l of the spherical Bessel functions for opt ABFs double exx_opt_orb_ecut = 0.0; ///< the cut-off of plane wave expansion for opt ABFs - double exx_opt_orb_tolerence = 0.0; ///< the threshold when solving for the zeros of spherical Bessel + double exx_opt_orb_tolerence = 1E-12; ///< the threshold when solving for the zeros of spherical Bessel ///< functions for opt ABFs bool exx_symmetry_realspace = true; ///< whether to reduce the real-space sector in when using symmetry=1 in EXX calculation diff --git a/source/source_io/test/read_input_ptest.cpp b/source/source_io/test/read_input_ptest.cpp index 14b0ef5a93..ebb276265d 100644 --- a/source/source_io/test/read_input_ptest.cpp +++ b/source/source_io/test/read_input_ptest.cpp @@ -296,7 +296,7 @@ TEST_F(InputParaTest, ParaRead) EXPECT_DOUBLE_EQ(param.inp.rpa_ccp_rmesh_times, 10.0); EXPECT_EQ(param.inp.exx_opt_orb_lmax, 0); EXPECT_DOUBLE_EQ(param.inp.exx_opt_orb_ecut, 0.0); - EXPECT_DOUBLE_EQ(param.inp.exx_opt_orb_tolerence, 0.0); + EXPECT_DOUBLE_EQ(param.inp.exx_opt_orb_tolerence, 1E-12); EXPECT_FALSE(param.inp.noncolin); EXPECT_FALSE(param.inp.lspinorb); EXPECT_DOUBLE_EQ(param.inp.soc_lambda, 1.0); diff --git a/source/source_io/test/support/INPUT b/source/source_io/test/support/INPUT index 33526863a8..90357fb14f 100644 --- a/source/source_io/test/support/INPUT +++ b/source/source_io/test/support/INPUT @@ -291,7 +291,7 @@ exx_v_grad_r_threshold 0 # exx_ccp_rmesh_times default # exx_opt_orb_lmax 0 # exx_opt_orb_ecut 0 # -exx_opt_orb_tolerence 0 # +exx_opt_orb_tolerence 1E-12 # #Parameters (16.tddft) td_vext 0 #add extern potential or not diff --git a/source/source_lcao/module_ri/exx_opt_orb-print.cpp b/source/source_lcao/module_ri/exx_opt_orb-print.cpp index a851d2c579..d3d5444ff4 100644 --- a/source/source_lcao/module_ri/exx_opt_orb-print.cpp +++ b/source/source_lcao/module_ri/exx_opt_orb-print.cpp @@ -1,6 +1,7 @@ #include "exx_opt_orb.h" #include "../../source_pw/module_pwdft/global.h" #include "exx_abfs-jle.h" +#include void Exx_Opt_Orb::print_matrix( const Exx_Info::Exx_Info_Opt_ABFs &info, @@ -204,6 +205,7 @@ void Exx_Opt_Orb::print_matrix( std::ofstream ofs(file_name+"_"+std::to_string(TA)+"_"+std::to_string(IA)+"_"+std::to_string(TB)+"_"+std::to_string(IB)); print_header(ofs); + ofs<