From cc2d7e73e13943e0dd2263b6d17b68aa425f6995 Mon Sep 17 00:00:00 2001 From: maki49 <1579492865@qq.com> Date: Tue, 23 May 2023 10:56:19 +0800 Subject: [PATCH 01/12] set the default value of symmetry to 1 --- docs/advanced/input_files/input-main.md | 2 +- source/module_io/input.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index 25a38057ef..cd8e48bd90 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -398,7 +398,7 @@ These variables are used to control general system parameters. - if set to 1, symmetry analysis will be performed to determine the type of Bravais lattice and associated symmetry operations. (point groups only) - if set to 0, only time reversal symmetry would be considered in symmetry operations, which implied k point and -k point would be treated as a single k point with twice the weight. - if set to -1, no symmetry will be considered. -- **Default**: 0 +- **Default**: 1 ### kpar diff --git a/source/module_io/input.cpp b/source/module_io/input.cpp index 00c283c58f..c41b01ad61 100644 --- a/source/module_io/input.cpp +++ b/source/module_io/input.cpp @@ -196,7 +196,7 @@ void Input::Default(void) ks_solver = "default"; // xiaohui add 2013-09-01 search_radius = -1.0; // unit: a.u. -1.0 has no meaning. search_pbc = true; - symmetry = 0; + symmetry = 1; init_vel = false; ref_cell_factor = 1.0; symmetry_prec = 1.0e-5; // LiuXh add 2021-08-12, accuracy for symmetry From deb3dfab78f5e01757e73cd684cb70014ae95fc8 Mon Sep 17 00:00:00 2001 From: maki49 <1579492865@qq.com> Date: Tue, 23 May 2023 11:59:39 +0800 Subject: [PATCH 02/12] put symmetry_prec together with symmetry --- docs/advanced/input_files/input-main.md | 14 +++++++------- source/module_io/test/input_test.cpp | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index cd8e48bd90..ac27849b83 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -7,6 +7,7 @@ - [calculation](#calculation) - [esolver\_type](#esolver_type) - [symmetry](#symmetry) + - [symmetry\_prec](#symmetry_prec) - [kpar](#kpar) - [bndpar](#bndpar) - [latname](#latname) @@ -24,7 +25,6 @@ - [nbspline](#nbspline) - [kspacing](#kspacing) - [min\_dist\_coef](#min_dist_coef) - - [symmetry\_prec](#symmetry_prec) - [device](#device) - [Variables related to input files](#variables-related-to-input-files) - [stru\_file](#stru_file) @@ -400,6 +400,12 @@ These variables are used to control general system parameters. - if set to -1, no symmetry will be considered. - **Default**: 1 +### symmetry_prec + +- **Type**: Real +- **Description**: The accuracy for symmetry judgment. The unit is Bohr. +- **Default**: 1.0e-5 + ### kpar - **Type**: Integer @@ -531,12 +537,6 @@ Notice: if gamma_only is set to be true, kspacing is invalid. - **Description**: a factor related to the allowed minimum distance between two atoms. At the beginning, ABACUS will check the structure, and if the distance of two atoms is shorter than min_dist_coef*(standard covalent bond length), we think this structure is unreasonable. If you want to calculate some structures in extreme conditions like high pressure, you should set this parameter as a smaller value or even 0. - **Default**: 0.2 -### symmetry_prec - -- **Type**: Real -- **Description**: The accuracy for symmetry judgment. The unit is Bohr. -- **Default**: 1.0e-5 - ### device - **Type**: String diff --git a/source/module_io/test/input_test.cpp b/source/module_io/test/input_test.cpp index ac061c458e..3c42da79b5 100644 --- a/source/module_io/test/input_test.cpp +++ b/source/module_io/test/input_test.cpp @@ -79,7 +79,7 @@ TEST_F(InputTest, Default) EXPECT_EQ(INPUT.ks_solver,"default"); EXPECT_DOUBLE_EQ(INPUT.search_radius,-1.0); EXPECT_TRUE(INPUT.search_pbc); - EXPECT_EQ(INPUT.symmetry,0); + EXPECT_EQ(INPUT.symmetry,1); EXPECT_FALSE(INPUT.init_vel); EXPECT_DOUBLE_EQ(INPUT.ref_cell_factor,1.0); EXPECT_DOUBLE_EQ(INPUT.symmetry_prec,1.0e-5); @@ -884,7 +884,7 @@ TEST_F(InputTest, Default_2) INPUT.Default_2(); // ^^^^^^^^^^^^^^ EXPECT_EQ(GlobalV::CALCULATION,"md"); - EXPECT_EQ(INPUT.symmetry,0); + EXPECT_EQ(INPUT.symmetry,1); EXPECT_EQ(INPUT.cal_force,1); EXPECT_EQ(INPUT.mdp.md_nstep,50); EXPECT_EQ(INPUT.out_level,"m"); From 33615f60ac988119da304b2277c0cd7eca0be0d3 Mon Sep 17 00:00:00 2001 From: maki49 <1579492865@qq.com> Date: Tue, 23 May 2023 12:46:16 +0800 Subject: [PATCH 03/12] modify exx-paras' description --- docs/advanced/input_files/input-main.md | 32 ++++++++++++++++++------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index ac27849b83..9aab9fb119 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -1729,24 +1729,28 @@ These variables are relevant when using hybrid functionals ### exx_separate_loop - **Type**: Boolean -- **Description**: There are two types of iterative approaches provided by ABACUS to evaluate Fock exchange. If this parameter is set to 0, it will start with a GGA-Loop, and then Hybrid-Loop, in which EXX Hamiltonian $H_{exx}$ is updated with electronic iterations. If this parameter is set to 1, a two-step method is employed, i.e. in the inner iterations, density matrix is updated, while in the outer iterations, $H_{exx}$ is calculated based on density matrix that converges in the inner iteration. +- **Description**: There are two types of iterative approaches provided by ABACUS to evaluate Fock exchange. + - 0: start with a GGA-Loop, and then Hybrid-Loop, in which EXX Hamiltonian $H_{exx}$ is updated with electronic iterations. + - 1: a two-step method is employed, i.e. in the inner iterations, density matrix is updated, while in the outer iterations, $H_{exx}$ is calculated based on density matrix that converges in the inner iteration. - **Default**: 1 ### exx_hybrid_step - **Type**: Integer -- **Description**: This variable indicates the maximal electronic iteration number in the evaluation of Fock exchange. +- **Description**: the maximal electronic iteration number in the evaluation of Fock exchange. - **Default**: 100 ### exx_mixing_beta - **Type**: Real -- **Description**: mixing_beta for outer-loop when exx_separate_loop=1 +- **Availability**: *[exx_seperate_loop](#exx_separate_loop)=1* +- **Description**: mixing_beta for outer-loop - **Default**: 1.0 ### exx_lambda - **Type**: Real +- **Availability**: *[basis_type](#basis_type)=lcao_in_pw* - **Description**: It is used to compensate for divergence points at G=0 in the evaluation of Fock exchange using *lcao_in_pw* method. - **Default**: 0.3 @@ -1825,32 +1829,42 @@ These variables are relevant when using hybrid functionals ### exx_distribute_type - **Type**: String -- **Description**: When running in parallel, the evaluation of Fock exchange is done by distributing atom pairs on different threads, then gather the results. exx_distribute_type governs the mechanism of distribution. Available options are `htime`, `order`, `kmean1` and `kmeans2`. `order` is where atom pairs are simply distributed by their orders. `hmeans` is a distribution where the balance in time is achieved on each processor, hence if the memory is sufficient, this is the recommended method. `kmeans1` and `kmeans2` are two methods where the k-means clustering method is used to reduce memory requirement. They might be necessary for very large systems. (Currently not used) +- **Description**: When running in parallel, the evaluation of Fock exchange is done by distributing atom pairs on different threads, then gather the results. exx_distribute_type governs the mechanism of distribution. Available options are `htime`, `order`, `kmean1` and `kmeans2`. + - `order`: atom pairs are simply distributed by their orders. + - `hmeans` the balance in time is achieved on each processor, hence if the memory is sufficient, this is the recommended method. + - `kmeans1` , `kmeans2`: two methods where the k-means clustering method is used to reduce memory requirement. They might be necessary for very large systems. (Currently not used) - **Default**: `htime` ### exx_opt_orb_lmax - **Type**: Integer -- **Description**: See also the entry [dft_functional](#dft_functional). This parameter is only relevant when dft_functional=`opt_orb`. The radial part of opt-ABFs are generated as linear combinations of spherical Bessel functions. exx_opt_orb_lmax gives the maximum l of the spherical Bessel functions. A reasonable choice is 2. +- **Availability**: *[dft_functional](#dft_functional)=opt_orb* +- **Description**: the maximum l of the spherical Bessel functions, when the radial part of opt-ABFs are generated as linear combinations of spherical Bessel functions. A reasonable choice is 2. - **Default**: 0 ### exx_opt_orb_ecut - **Type**: Real -- **Description**: See also the entry [dft_functional](#dft_functional). This parameter is only relevant when dft_functional=`opt_orb`. A plane wave basis is used to optimize the radial ABFs. This parameter thus gives the cut-off of plane wave expansion, in Ry. A reasonable choice is 60. +- **Availability**: *[dft_functional](#dft_functional)=opt_orb* +- **Description**: the cut-off of plane wave expansion (Ry), when the plane wave basis is used to optimize the radial ABFs. A reasonable choice is 60. - **Default**: 0 ### exx_opt_orb_tolerence - **Type**: Real -- **Description**: See also the entry [dft_functional](#dft_functional). This parameter is only relevant when dft_functional=`opt_orb`. exx_opt_orb_tolerence determines the threshold when solving for the zeros of spherical Bessel functions. A reasonable choice is 1e-12. +- **Availability**: *[dft_functional](#dft_functional)=opt_orb* +- **Description**: the threshold when solving for the zeros of spherical Bessel functions. A reasonable choice is 1e-12. - **Default**: 0 ### exx_real_number - **Type**: Boolean -- **Description**: If set to 1, it will enforce LIBRI to use `double` data type, otherwise, it will enforce LIBRI to use `complex` data type. The default value depends on the [gamma_only](#gamma_only) option. -- **Default**: 1 if gamma_only else 0 +- **Description**: + - 1: enforce LIBRI to use `double` data type, otherwise + - 0: enforce LIBRI to use `complex` data type. +- **Default**: depends on the [gamma_only](#gamma_only) option + - 1: if gamma_only + - 0: else [back to top](#full-list-of-input-keywords) From 162e82bc68fd529c36e4323f4ee008fd5b1baf88 Mon Sep 17 00:00:00 2001 From: maki49 <1579492865@qq.com> Date: Tue, 23 May 2023 12:56:48 +0800 Subject: [PATCH 04/12] symmetry=0 in fixed-cell-relax and envelope-k cases --- docs/advanced/input_files/input-main.md | 12 +++++++----- source/module_io/test/input_test_para.cpp | 2 +- tests/integrate/109_PW_CR_fix_a/INPUT | 1 + tests/integrate/109_PW_CR_fix_ab/INPUT | 1 + tests/integrate/109_PW_CR_fix_ac/INPUT | 1 + tests/integrate/109_PW_CR_fix_b/INPUT | 1 + tests/integrate/109_PW_CR_fix_bc/INPUT | 1 + tests/integrate/109_PW_CR_fix_c/INPUT | 1 + tests/integrate/212_NO_wfc_ienvelope/INPUT | 1 + 9 files changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index 9aab9fb119..c78c725399 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -395,15 +395,17 @@ These variables are used to control general system parameters. - **Type**: Integer - **Description**: takes value 1, 0 or -1. - - if set to 1, symmetry analysis will be performed to determine the type of Bravais lattice and associated symmetry operations. (point groups only) - - if set to 0, only time reversal symmetry would be considered in symmetry operations, which implied k point and -k point would be treated as a single k point with twice the weight. - - if set to -1, no symmetry will be considered. -- **Default**: 1 + - 1: no symmetry will be considered. + - 0: only time reversal symmetry would be considered in symmetry operations, which implied k point and -k point would be treated as a single k point with twice the weight. + - 1: symmetry analysis will be performed to determine the type of Bravais lattice and associated symmetry operations. (point groups, space groups, primitive cells, and irreducible k-points) +- **Default**: + - 0: if *[calculation](#calculation)=md* + - 1: else ### symmetry_prec - **Type**: Real -- **Description**: The accuracy for symmetry judgment. The unit is Bohr. +- **Description**: The accuracy for symmetry judgment (Bohr). - **Default**: 1.0e-5 ### kpar diff --git a/source/module_io/test/input_test_para.cpp b/source/module_io/test/input_test_para.cpp index 321967d1a3..7cf4d079f0 100644 --- a/source/module_io/test/input_test_para.cpp +++ b/source/module_io/test/input_test_para.cpp @@ -86,7 +86,7 @@ TEST_F(InputParaTest,Bcast) EXPECT_EQ(INPUT.ks_solver,"default"); EXPECT_DOUBLE_EQ(INPUT.search_radius,-1.0); EXPECT_TRUE(INPUT.search_pbc); - EXPECT_EQ(INPUT.symmetry,0); + EXPECT_EQ(INPUT.symmetry,1); EXPECT_FALSE(INPUT.init_vel); EXPECT_DOUBLE_EQ(INPUT.symmetry_prec,1.0e-5); EXPECT_EQ(INPUT.cal_force, 0); diff --git a/tests/integrate/109_PW_CR_fix_a/INPUT b/tests/integrate/109_PW_CR_fix_a/INPUT index f333681f81..26a6074964 100644 --- a/tests/integrate/109_PW_CR_fix_a/INPUT +++ b/tests/integrate/109_PW_CR_fix_a/INPUT @@ -5,6 +5,7 @@ pseudo_dir ../../PP_ORB nbands 8 calculation cell-relax +symmetry 0 #Parameters (Accuracy) ecutwfc 20 diff --git a/tests/integrate/109_PW_CR_fix_ab/INPUT b/tests/integrate/109_PW_CR_fix_ab/INPUT index 82f53d808d..69589c30cf 100644 --- a/tests/integrate/109_PW_CR_fix_ab/INPUT +++ b/tests/integrate/109_PW_CR_fix_ab/INPUT @@ -5,6 +5,7 @@ pseudo_dir ../../PP_ORB nbands 8 calculation cell-relax +symmetry 0 #Parameters (Accuracy) ecutwfc 20 diff --git a/tests/integrate/109_PW_CR_fix_ac/INPUT b/tests/integrate/109_PW_CR_fix_ac/INPUT index 5cb8e54fe5..b1952b873e 100644 --- a/tests/integrate/109_PW_CR_fix_ac/INPUT +++ b/tests/integrate/109_PW_CR_fix_ac/INPUT @@ -5,6 +5,7 @@ pseudo_dir ../../PP_ORB nbands 8 calculation cell-relax +symmetry 0 #Parameters (Accuracy) ecutwfc 20 diff --git a/tests/integrate/109_PW_CR_fix_b/INPUT b/tests/integrate/109_PW_CR_fix_b/INPUT index 0b5b7702a0..2300954809 100644 --- a/tests/integrate/109_PW_CR_fix_b/INPUT +++ b/tests/integrate/109_PW_CR_fix_b/INPUT @@ -5,6 +5,7 @@ pseudo_dir ../../PP_ORB nbands 8 calculation cell-relax +symmetry 0 #Parameters (Accuracy) ecutwfc 20 diff --git a/tests/integrate/109_PW_CR_fix_bc/INPUT b/tests/integrate/109_PW_CR_fix_bc/INPUT index 9312f88848..f9b524f305 100644 --- a/tests/integrate/109_PW_CR_fix_bc/INPUT +++ b/tests/integrate/109_PW_CR_fix_bc/INPUT @@ -5,6 +5,7 @@ pseudo_dir ../../PP_ORB nbands 8 calculation cell-relax +symmetry 0 #Parameters (Accuracy) ecutwfc 20 diff --git a/tests/integrate/109_PW_CR_fix_c/INPUT b/tests/integrate/109_PW_CR_fix_c/INPUT index 8de673b256..1a1bdb611d 100644 --- a/tests/integrate/109_PW_CR_fix_c/INPUT +++ b/tests/integrate/109_PW_CR_fix_c/INPUT @@ -5,6 +5,7 @@ pseudo_dir ../../PP_ORB nbands 8 calculation cell-relax +symmetry 0 #Parameters (Accuracy) ecutwfc 20 diff --git a/tests/integrate/212_NO_wfc_ienvelope/INPUT b/tests/integrate/212_NO_wfc_ienvelope/INPUT index 8013fd1c2e..5d2d06fd9c 100644 --- a/tests/integrate/212_NO_wfc_ienvelope/INPUT +++ b/tests/integrate/212_NO_wfc_ienvelope/INPUT @@ -1,6 +1,7 @@ INPUT_PARAMETERS #Parameters (System) suffix autotest +symmetry 0 nbands 4 stru_file STRU From 7a612da506af2dcacf955ff991f47de0785065d4 Mon Sep 17 00:00:00 2001 From: maki49 <1579492865@qq.com> Date: Tue, 23 May 2023 15:04:46 +0800 Subject: [PATCH 05/12] update doc and Default_2 --- docs/advanced/input_files/input-main.md | 45 +++++++++++++------------ source/module_io/input.cpp | 3 ++ source/module_io/test/input_test.cpp | 12 ++++--- 3 files changed, 34 insertions(+), 26 deletions(-) diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index c78c725399..00870a62e5 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -395,18 +395,19 @@ These variables are used to control general system parameters. - **Type**: Integer - **Description**: takes value 1, 0 or -1. - - 1: no symmetry will be considered. - - 0: only time reversal symmetry would be considered in symmetry operations, which implied k point and -k point would be treated as a single k point with twice the weight. - - 1: symmetry analysis will be performed to determine the type of Bravais lattice and associated symmetry operations. (point groups, space groups, primitive cells, and irreducible k-points) + - 1: No symmetry will be considered. + - 0: Only time reversal symmetry would be considered in symmetry operations, which implied k point and -k point would be treated as a single k point with twice the weight. + - 1: Symmetry analysis will be performed to determine the type of Bravais lattice and associated symmetry operations. (point groups, space groups, primitive cells, and irreducible k-points) - **Default**: - - 0: if *[calculation](#calculation)=md* + - 0: if *[calculation](#calculation)=md/nscf/istate/ienvelope/get_S* - 1: else ### symmetry_prec - **Type**: Real -- **Description**: The accuracy for symmetry judgment (Bohr). +- **Description**: The accuracy for symmetry judgment. - **Default**: 1.0e-5 +- **Unit**: Bohr ### kpar @@ -1725,21 +1726,21 @@ These variables are relevant when using hybrid functionals ### exx_hse_omega - **Type**: Real -- **Description**: range-separation parameter in HSE functional, such that $1/r=\text{erfc}(\omega r)/r+\text{erf}(\omega r)/r$. +- **Description**: range-separation parameter in HSE functional, such that $1/r=\text{erfc}(\omega r)/r+\text{erf}(\omega r)/r$ - **Default**: 0.11 ### exx_separate_loop - **Type**: Boolean - **Description**: There are two types of iterative approaches provided by ABACUS to evaluate Fock exchange. - - 0: start with a GGA-Loop, and then Hybrid-Loop, in which EXX Hamiltonian $H_{exx}$ is updated with electronic iterations. - - 1: a two-step method is employed, i.e. in the inner iterations, density matrix is updated, while in the outer iterations, $H_{exx}$ is calculated based on density matrix that converges in the inner iteration. -- **Default**: 1 + - False: Start with a GGA-Loop, and then Hybrid-Loop, in which EXX Hamiltonian $H_{exx}$ is updated with electronic iterations. + - True: A two-step method is employed, i.e. in the inner iterations, density matrix is updated, while in the outer iterations, $H_{exx}$ is calculated based on density matrix that converges in the inner iteration. +- **Default**: True ### exx_hybrid_step - **Type**: Integer -- **Description**: the maximal electronic iteration number in the evaluation of Fock exchange. +- **Description**: the maximal electronic iteration number in the evaluation of Fock exchange - **Default**: 100 ### exx_mixing_beta @@ -1826,47 +1827,49 @@ These variables are relevant when using hybrid functionals - **Type**: Real - **Description**: This parameter determines how many times larger the radial mesh required for calculating Columb potential is to that of atomic orbitals. For HSE, setting it to 1 is enough. But for PBE0, a much larger number must be used. -- **Default**: 1.5 if dft_functional==hse else 5 +- **Default**: + - 1.5: if *[dft_functional](#dft_functional)=hse* + - 5: else ### exx_distribute_type - **Type**: String - **Description**: When running in parallel, the evaluation of Fock exchange is done by distributing atom pairs on different threads, then gather the results. exx_distribute_type governs the mechanism of distribution. Available options are `htime`, `order`, `kmean1` and `kmeans2`. - - `order`: atom pairs are simply distributed by their orders. - - `hmeans` the balance in time is achieved on each processor, hence if the memory is sufficient, this is the recommended method. - - `kmeans1` , `kmeans2`: two methods where the k-means clustering method is used to reduce memory requirement. They might be necessary for very large systems. (Currently not used) + - `order`: Atom pairs are simply distributed by their orders. + - `hmeans`: The balance in time is achieved on each processor, hence if the memory is sufficient, this is the recommended method. + - `kmeans1` , `kmeans2`: Two methods where the k-means clustering method is used to reduce memory requirement. They might be necessary for very large systems. (Currently not used) - **Default**: `htime` ### exx_opt_orb_lmax - **Type**: Integer - **Availability**: *[dft_functional](#dft_functional)=opt_orb* -- **Description**: the maximum l of the spherical Bessel functions, when the radial part of opt-ABFs are generated as linear combinations of spherical Bessel functions. A reasonable choice is 2. +- **Description**: The maximum l of the spherical Bessel functions, when the radial part of opt-ABFs are generated as linear combinations of spherical Bessel functions. A reasonable choice is 2. - **Default**: 0 ### exx_opt_orb_ecut - **Type**: Real - **Availability**: *[dft_functional](#dft_functional)=opt_orb* -- **Description**: the cut-off of plane wave expansion (Ry), when the plane wave basis is used to optimize the radial ABFs. A reasonable choice is 60. +- **Description**: The cut-off of plane wave expansion (Ry), when the plane wave basis is used to optimize the radial ABFs. A reasonable choice is 60. - **Default**: 0 ### exx_opt_orb_tolerence - **Type**: Real - **Availability**: *[dft_functional](#dft_functional)=opt_orb* -- **Description**: the threshold when solving for the zeros of spherical Bessel functions. A reasonable choice is 1e-12. +- **Description**: The threshold when solving for the zeros of spherical Bessel functions. A reasonable choice is 1e-12. - **Default**: 0 ### exx_real_number - **Type**: Boolean - **Description**: - - 1: enforce LIBRI to use `double` data type, otherwise - - 0: enforce LIBRI to use `complex` data type. + - True: Enforce LIBRI to use `double` data type. + - False: Enforce LIBRI to use `complex` data type. - **Default**: depends on the [gamma_only](#gamma_only) option - - 1: if gamma_only - - 0: else + - True: if gamma_only + - False: else [back to top](#full-list-of-input-keywords) diff --git a/source/module_io/input.cpp b/source/module_io/input.cpp index c41b01ad61..afb3c591e0 100644 --- a/source/module_io/input.cpp +++ b/source/module_io/input.cpp @@ -2532,6 +2532,7 @@ void Input::Default_2(void) // jiyy add 2019-08-04 else if (calculation == "nscf" || calculation == "get_S") { GlobalV::CALCULATION = "nscf"; + symmetry = 0; this->relax_nmax = 1; out_stru = 0; @@ -2557,6 +2558,7 @@ void Input::Default_2(void) // jiyy add 2019-08-04 else if (calculation == "istate") { GlobalV::CALCULATION = "istate"; + symmetry = 0; this->relax_nmax = 1; out_stru = 0; out_dos = 0; @@ -2574,6 +2576,7 @@ void Input::Default_2(void) // jiyy add 2019-08-04 else if (calculation == "ienvelope") { GlobalV::CALCULATION = "ienvelope"; // mohan fix 2011-11-04 + symmetry = 0; this->relax_nmax = 1; out_stru = 0; out_dos = 0; diff --git a/source/module_io/test/input_test.cpp b/source/module_io/test/input_test.cpp index 3c42da79b5..d6229bf994 100644 --- a/source/module_io/test/input_test.cpp +++ b/source/module_io/test/input_test.cpp @@ -837,8 +837,9 @@ TEST_F(InputTest, Default_2) INPUT.Default_2(); // ^^^^^^^^^^^^^^ EXPECT_EQ(GlobalV::CALCULATION,"istate"); - EXPECT_EQ(INPUT.relax_nmax,1); - EXPECT_EQ(INPUT.out_stru,0); + EXPECT_EQ(INPUT.relax_nmax, 1); + EXPECT_EQ(INPUT.symmetry, 0); + EXPECT_EQ(INPUT.out_stru, 0); EXPECT_EQ(INPUT.out_band,0); EXPECT_EQ(INPUT.out_proj_band,0); EXPECT_EQ(INPUT.cal_force,0); @@ -856,8 +857,9 @@ TEST_F(InputTest, Default_2) INPUT.Default_2(); // ^^^^^^^^^^^^^^ EXPECT_EQ(GlobalV::CALCULATION,"ienvelope"); - EXPECT_EQ(INPUT.relax_nmax,1); - EXPECT_EQ(INPUT.out_stru,0); + EXPECT_EQ(INPUT.relax_nmax, 1); + EXPECT_EQ(INPUT.symmetry, 0); + EXPECT_EQ(INPUT.out_stru, 0); EXPECT_EQ(INPUT.out_band,0); EXPECT_EQ(INPUT.out_proj_band,0); EXPECT_EQ(INPUT.cal_force,0); @@ -884,7 +886,7 @@ TEST_F(InputTest, Default_2) INPUT.Default_2(); // ^^^^^^^^^^^^^^ EXPECT_EQ(GlobalV::CALCULATION,"md"); - EXPECT_EQ(INPUT.symmetry,1); + EXPECT_EQ(INPUT.symmetry,0); EXPECT_EQ(INPUT.cal_force,1); EXPECT_EQ(INPUT.mdp.md_nstep,50); EXPECT_EQ(INPUT.out_level,"m"); From 7a1bb288a84ddb4a7a6f3fb1239d1319d00c56e5 Mon Sep 17 00:00:00 2001 From: cyFortneu <33978601+maki49@users.noreply.github.com> Date: Tue, 23 May 2023 17:16:11 +0800 Subject: [PATCH 06/12] fix a symbol Co-authored-by: dyzheng --- docs/advanced/input_files/input-main.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index 00870a62e5..4b54b1ba6f 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -395,7 +395,7 @@ These variables are used to control general system parameters. - **Type**: Integer - **Description**: takes value 1, 0 or -1. - - 1: No symmetry will be considered. + - -1: No symmetry will be considered. - 0: Only time reversal symmetry would be considered in symmetry operations, which implied k point and -k point would be treated as a single k point with twice the weight. - 1: Symmetry analysis will be performed to determine the type of Bravais lattice and associated symmetry operations. (point groups, space groups, primitive cells, and irreducible k-points) - **Default**: From baff7e7570f277d8ccd3aff3f399e3523677fe55 Mon Sep 17 00:00:00 2001 From: maki49 <1579492865@qq.com> Date: Tue, 23 May 2023 17:39:26 +0800 Subject: [PATCH 07/12] update docs --- docs/advanced/input_files/input-main.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index 4b54b1ba6f..e8d1a12cb0 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -399,13 +399,17 @@ These variables are used to control general system parameters. - 0: Only time reversal symmetry would be considered in symmetry operations, which implied k point and -k point would be treated as a single k point with twice the weight. - 1: Symmetry analysis will be performed to determine the type of Bravais lattice and associated symmetry operations. (point groups, space groups, primitive cells, and irreducible k-points) - **Default**: + - -1: if *[dft_fuctional](#dft_functional)=hse/hf/pbe0* (hybrid functionals), because currently symmetry is not supported in EXX (exact exchange) calculation - 0: if *[calculation](#calculation)=md/nscf/istate/ienvelope/get_S* - 1: else ### symmetry_prec - **Type**: Real -- **Description**: The accuracy for symmetry judgment. +- **Description**: The accuracy for symmetry judgment. Usually the default value is good enough, but if the lattice parameters or atom positions in STRU file is not accurate enough, this value should be enlarged. + + Note: if *[calculation](#calculation)=cell_relax*, this value can be dynamically enlarged corresponding to the accuracy loss of the lattice parameters and atom positions during the relaxation. There will be a warning message in that case. + - **Default**: 1.0e-5 - **Unit**: Bohr @@ -1715,7 +1719,9 @@ These variables are relevant to gate field (compensating charge) ## Exact Exchange -These variables are relevant when using hybrid functionals +These variables are relevant when using hybrid functionals. + +**Availablity**: *[dft_functional](#dft_functional)=hse/hf/pbe0/opt_orb* and *[basis_type](#basis_type)=lcao/lcao_in_pw* ### exx_hybrid_alpha From 5cb27e9be52375f2cd3829d1bf8a6b0d7c798251 Mon Sep 17 00:00:00 2001 From: maki49 <1579492865@qq.com> Date: Tue, 23 May 2023 22:43:26 +0800 Subject: [PATCH 08/12] use symmetry as string to support flexible default value --- docs/advanced/input_files/input-main.md | 2 +- source/module_io/input.cpp | 18 +++++++++++------- source/module_io/input.h | 2 +- source/module_io/input_conv.cpp | 2 +- source/module_io/test/input_test.cpp | 16 +++++++++------- source/module_io/test/input_test_para.cpp | 2 +- 6 files changed, 24 insertions(+), 18 deletions(-) diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index e8d1a12cb0..538ac88fa3 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -399,7 +399,7 @@ These variables are used to control general system parameters. - 0: Only time reversal symmetry would be considered in symmetry operations, which implied k point and -k point would be treated as a single k point with twice the weight. - 1: Symmetry analysis will be performed to determine the type of Bravais lattice and associated symmetry operations. (point groups, space groups, primitive cells, and irreducible k-points) - **Default**: - - -1: if *[dft_fuctional](#dft_functional)=hse/hf/pbe0* (hybrid functionals), because currently symmetry is not supported in EXX (exact exchange) calculation + - -1: if (*[dft_fuctional](#dft_functional)=hse/hf/pbe0/scan0/opt_orb* or *[rpa](#rpa)=True*) and *[calculation](#calculation)!=nscf*. Currently symmetry is not supported in EXX (exact exchange) calculation. - 0: if *[calculation](#calculation)=md/nscf/istate/ienvelope/get_S* - 1: else diff --git a/source/module_io/input.cpp b/source/module_io/input.cpp index afb3c591e0..fa87e055c5 100644 --- a/source/module_io/input.cpp +++ b/source/module_io/input.cpp @@ -196,7 +196,7 @@ void Input::Default(void) ks_solver = "default"; // xiaohui add 2013-09-01 search_radius = -1.0; // unit: a.u. -1.0 has no meaning. search_pbc = true; - symmetry = 1; + symmetry = "default"; init_vel = false; ref_cell_factor = 1.0; symmetry_prec = 1.0e-5; // LiuXh add 2021-08-12, accuracy for symmetry @@ -2489,6 +2489,13 @@ void Input::Default_2(void) // jiyy add 2019-08-04 else if (dft_functional == "hse") exx_ccp_rmesh_times = "1.5"; } + if (symmetry == "default") + { //deal with no-forced default value + if (calculation == "nscf" || calculation == "get_S" || calculation == "istate" || calculation == "ienvelope") + symmetry = "0"; //if md or exx, symmetry will be force-set to 0 or -1 later + else + symmetry = "1"; + } if (diago_proc <= 0) { diago_proc = GlobalV::NPROC; @@ -2532,7 +2539,6 @@ void Input::Default_2(void) // jiyy add 2019-08-04 else if (calculation == "nscf" || calculation == "get_S") { GlobalV::CALCULATION = "nscf"; - symmetry = 0; this->relax_nmax = 1; out_stru = 0; @@ -2558,7 +2564,6 @@ void Input::Default_2(void) // jiyy add 2019-08-04 else if (calculation == "istate") { GlobalV::CALCULATION = "istate"; - symmetry = 0; this->relax_nmax = 1; out_stru = 0; out_dos = 0; @@ -2576,7 +2581,6 @@ void Input::Default_2(void) // jiyy add 2019-08-04 else if (calculation == "ienvelope") { GlobalV::CALCULATION = "ienvelope"; // mohan fix 2011-11-04 - symmetry = 0; this->relax_nmax = 1; out_stru = 0; out_dos = 0; @@ -2594,7 +2598,7 @@ void Input::Default_2(void) // jiyy add 2019-08-04 else if (calculation == "md") // mohan add 2011-11-04 { GlobalV::CALCULATION = "md"; - symmetry = 0; + symmetry = "0"; cal_force = 1; if (mdp.md_nstep == 0) { @@ -2815,7 +2819,7 @@ void Input::Bcast() Parallel_Common::bcast_double(search_radius); Parallel_Common::bcast_bool(search_pbc); Parallel_Common::bcast_double(search_radius); - Parallel_Common::bcast_int(symmetry); + Parallel_Common::bcast_string(symmetry); Parallel_Common::bcast_bool(init_vel); // liuyu 2021-07-14 Parallel_Common::bcast_double(ref_cell_factor); Parallel_Common::bcast_double(symmetry_prec); // LiuXh add 2021-08-12, accuracy for symmetry @@ -3252,7 +3256,7 @@ void Input::Check(void) //---------------------------------------------------------- if (calculation == "nscf" || calculation == "get_S") { - if (out_dos == 3 && symmetry) + if (out_dos == 3 && symmetry == "1") { ModuleBase::WARNING_QUIT("Input::Check", "symmetry can't be used for out_dos==3(Fermi Surface Plotting) by now."); diff --git a/source/module_io/input.h b/source/module_io/input.h index e03069d66e..126d703ae2 100644 --- a/source/module_io/input.h +++ b/source/module_io/input.h @@ -53,7 +53,7 @@ class Input -1, no symmetry at all; 0, only basic time reversal would be considered; 1, point group symmetry would be considered*/ - int symmetry; + string symmetry; double symmetry_prec; // LiuXh add 2021-08-12, accuracy for symmetry int kpar; // ecch pool is for one k point diff --git a/source/module_io/input_conv.cpp b/source/module_io/input_conv.cpp index 88d57cd5fc..0beb92e25c 100644 --- a/source/module_io/input_conv.cpp +++ b/source/module_io/input_conv.cpp @@ -311,7 +311,7 @@ void Input_Conv::Convert(void) GlobalV::OUT_LEVEL = INPUT.out_level; Ions_Move_CG::RELAX_CG_THR = INPUT.relax_cg_thr; // pengfei add 2013-09-09 - ModuleSymmetry::Symmetry::symm_flag = INPUT.symmetry; // 9 + ModuleSymmetry::Symmetry::symm_flag = std::stoi(INPUT.symmetry); GlobalC::symm.epsilon = INPUT.symmetry_prec; // LiuXh add 2021-08-12, accuracy for symmetry GlobalV::BASIS_TYPE = INPUT.basis_type; GlobalV::KS_SOLVER = INPUT.ks_solver; diff --git a/source/module_io/test/input_test.cpp b/source/module_io/test/input_test.cpp index d6229bf994..525c03cbc8 100644 --- a/source/module_io/test/input_test.cpp +++ b/source/module_io/test/input_test.cpp @@ -79,7 +79,7 @@ TEST_F(InputTest, Default) EXPECT_EQ(INPUT.ks_solver,"default"); EXPECT_DOUBLE_EQ(INPUT.search_radius,-1.0); EXPECT_TRUE(INPUT.search_pbc); - EXPECT_EQ(INPUT.symmetry,1); + EXPECT_EQ(INPUT.symmetry,"default"); EXPECT_FALSE(INPUT.init_vel); EXPECT_DOUBLE_EQ(INPUT.ref_cell_factor,1.0); EXPECT_DOUBLE_EQ(INPUT.symmetry_prec,1.0e-5); @@ -415,7 +415,7 @@ TEST_F(InputTest, Read) EXPECT_EQ(INPUT.ks_solver,"genelpa"); EXPECT_DOUBLE_EQ(INPUT.search_radius,-1.0); EXPECT_TRUE(INPUT.search_pbc); - EXPECT_EQ(INPUT.symmetry,1); + EXPECT_EQ(INPUT.symmetry,"1"); EXPECT_FALSE(INPUT.init_vel); EXPECT_DOUBLE_EQ(INPUT.symmetry_prec,1.0e-5); EXPECT_EQ(INPUT.cal_force, 0); @@ -833,13 +833,14 @@ TEST_F(InputTest, Default_2) //================================================== // prepare default parameters for the 4th calling INPUT.calculation = "istate"; + INPUT.symmetry = "default"; // the 4th calling INPUT.Default_2(); // ^^^^^^^^^^^^^^ EXPECT_EQ(GlobalV::CALCULATION,"istate"); EXPECT_EQ(INPUT.relax_nmax, 1); - EXPECT_EQ(INPUT.symmetry, 0); EXPECT_EQ(INPUT.out_stru, 0); + EXPECT_EQ(INPUT.symmetry, "0"); EXPECT_EQ(INPUT.out_band,0); EXPECT_EQ(INPUT.out_proj_band,0); EXPECT_EQ(INPUT.cal_force,0); @@ -853,12 +854,13 @@ TEST_F(InputTest, Default_2) //================================================== // prepare default parameters for the 5th calling INPUT.calculation = "ienvelope"; + INPUT.symmetry = "default"; // the 5th calling INPUT.Default_2(); // ^^^^^^^^^^^^^^ EXPECT_EQ(GlobalV::CALCULATION,"ienvelope"); EXPECT_EQ(INPUT.relax_nmax, 1); - EXPECT_EQ(INPUT.symmetry, 0); + EXPECT_EQ(INPUT.symmetry, "0"); EXPECT_EQ(INPUT.out_stru, 0); EXPECT_EQ(INPUT.out_band,0); EXPECT_EQ(INPUT.out_proj_band,0); @@ -886,7 +888,7 @@ TEST_F(InputTest, Default_2) INPUT.Default_2(); // ^^^^^^^^^^^^^^ EXPECT_EQ(GlobalV::CALCULATION,"md"); - EXPECT_EQ(INPUT.symmetry,0); + EXPECT_EQ(INPUT.symmetry,"0"); EXPECT_EQ(INPUT.cal_force,1); EXPECT_EQ(INPUT.mdp.md_nstep,50); EXPECT_EQ(INPUT.out_level,"m"); @@ -996,12 +998,12 @@ TEST_F(InputTest, Check) // INPUT.calculation = "nscf"; INPUT.out_dos = 3; - INPUT.symmetry = 1; + INPUT.symmetry = "1"; testing::internal::CaptureStdout(); EXPECT_EXIT(INPUT.Check(),::testing::ExitedWithCode(0), ""); output = testing::internal::GetCapturedStdout(); EXPECT_THAT(output,testing::HasSubstr("symmetry can't be used for out_dos==3(Fermi Surface Plotting) by now.")); - INPUT.symmetry = 0; + INPUT.symmetry = "0"; INPUT.out_dos = 0; // INPUT.calculation = "istate"; diff --git a/source/module_io/test/input_test_para.cpp b/source/module_io/test/input_test_para.cpp index 7cf4d079f0..9e0ae42e5d 100644 --- a/source/module_io/test/input_test_para.cpp +++ b/source/module_io/test/input_test_para.cpp @@ -86,7 +86,7 @@ TEST_F(InputParaTest,Bcast) EXPECT_EQ(INPUT.ks_solver,"default"); EXPECT_DOUBLE_EQ(INPUT.search_radius,-1.0); EXPECT_TRUE(INPUT.search_pbc); - EXPECT_EQ(INPUT.symmetry,1); + EXPECT_EQ(INPUT.symmetry,"default"); EXPECT_FALSE(INPUT.init_vel); EXPECT_DOUBLE_EQ(INPUT.symmetry_prec,1.0e-5); EXPECT_EQ(INPUT.cal_force, 0); From 900f47ad3498e54d6de2df4cd6620958f23d8eaf Mon Sep 17 00:00:00 2001 From: maki49 <1579492865@qq.com> Date: Tue, 23 May 2023 23:37:34 +0800 Subject: [PATCH 09/12] update doc --- docs/advanced/input_files/input-main.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index 538ac88fa3..599ed0060a 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -399,8 +399,8 @@ These variables are used to control general system parameters. - 0: Only time reversal symmetry would be considered in symmetry operations, which implied k point and -k point would be treated as a single k point with twice the weight. - 1: Symmetry analysis will be performed to determine the type of Bravais lattice and associated symmetry operations. (point groups, space groups, primitive cells, and irreducible k-points) - **Default**: - - -1: if (*[dft_fuctional](#dft_functional)=hse/hf/pbe0/scan0/opt_orb* or *[rpa](#rpa)=True*) and *[calculation](#calculation)!=nscf*. Currently symmetry is not supported in EXX (exact exchange) calculation. - - 0: if *[calculation](#calculation)=md/nscf/istate/ienvelope/get_S* + - -1: if (*[dft_fuctional](#dft_functional)==hse/hf/pbe0/scan0/opt_orb* or *[rpa](#rpa)==True*) and *[calculation](#calculation)!=nscf*. Currently symmetry is not supported in EXX (exact exchange) calculation. + - 0: if *[calculation](#calculation)==md/nscf/istate/ienvelope/get_S* - 1: else ### symmetry_prec @@ -1721,13 +1721,15 @@ These variables are relevant to gate field (compensating charge) These variables are relevant when using hybrid functionals. -**Availablity**: *[dft_functional](#dft_functional)=hse/hf/pbe0/opt_orb* and *[basis_type](#basis_type)=lcao/lcao_in_pw* +**Availablity**: *[dft_functional](#dft_functional)==hse/hf/pbe0/scan0/opt_orb* or *[rpa](#rpa)==True*, and *[basis_type](#basis_type)==lcao/lcao_in_pw* ### exx_hybrid_alpha - **Type**: Real - **Description**: fraction of Fock exchange in hybrid functionals, so that $E_{X}=\alpha E_{X}+(1-\alpha)E_{X,\text{LDA/GGA}}$ -- **Default**: 1 if dft_functional==hf else 0.25 +- **Default**: + - 1: if *[dft_functional](#dft_functional)==hf* + - 0.25: else ### exx_hse_omega @@ -1752,14 +1754,14 @@ These variables are relevant when using hybrid functionals. ### exx_mixing_beta - **Type**: Real -- **Availability**: *[exx_seperate_loop](#exx_separate_loop)=1* +- **Availability**: *[exx_seperate_loop](#exx_separate_loop)==1* - **Description**: mixing_beta for outer-loop - **Default**: 1.0 ### exx_lambda - **Type**: Real -- **Availability**: *[basis_type](#basis_type)=lcao_in_pw* +- **Availability**: *[basis_type](#basis_type)==lcao_in_pw* - **Description**: It is used to compensate for divergence points at G=0 in the evaluation of Fock exchange using *lcao_in_pw* method. - **Default**: 0.3 @@ -1834,7 +1836,7 @@ These variables are relevant when using hybrid functionals. - **Type**: Real - **Description**: This parameter determines how many times larger the radial mesh required for calculating Columb potential is to that of atomic orbitals. For HSE, setting it to 1 is enough. But for PBE0, a much larger number must be used. - **Default**: - - 1.5: if *[dft_functional](#dft_functional)=hse* + - 1.5: if *[dft_functional](#dft_functional)==hse* - 5: else ### exx_distribute_type @@ -1849,21 +1851,21 @@ These variables are relevant when using hybrid functionals. ### exx_opt_orb_lmax - **Type**: Integer -- **Availability**: *[dft_functional](#dft_functional)=opt_orb* +- **Availability**: *[dft_functional](#dft_functional)==opt_orb* - **Description**: The maximum l of the spherical Bessel functions, when the radial part of opt-ABFs are generated as linear combinations of spherical Bessel functions. A reasonable choice is 2. - **Default**: 0 ### exx_opt_orb_ecut - **Type**: Real -- **Availability**: *[dft_functional](#dft_functional)=opt_orb* +- **Availability**: *[dft_functional](#dft_functional)==opt_orb* - **Description**: The cut-off of plane wave expansion (Ry), when the plane wave basis is used to optimize the radial ABFs. A reasonable choice is 60. - **Default**: 0 ### exx_opt_orb_tolerence - **Type**: Real -- **Availability**: *[dft_functional](#dft_functional)=opt_orb* +- **Availability**: *[dft_functional](#dft_functional)==opt_orb* - **Description**: The threshold when solving for the zeros of spherical Bessel functions. A reasonable choice is 1e-12. - **Default**: 0 From a452d21f36286b5233205e92c4101572f7f695aa Mon Sep 17 00:00:00 2001 From: maki49 <1579492865@qq.com> Date: Wed, 24 May 2023 00:16:54 +0800 Subject: [PATCH 10/12] set symmetry to 0 in 212_NO_wfc_ot --- tests/integrate/212_NO_wfc_out/INPUT | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integrate/212_NO_wfc_out/INPUT b/tests/integrate/212_NO_wfc_out/INPUT index 90e2b7da80..cefec3e0bb 100644 --- a/tests/integrate/212_NO_wfc_out/INPUT +++ b/tests/integrate/212_NO_wfc_out/INPUT @@ -1,6 +1,7 @@ INPUT_PARAMETERS #Parameters (System) suffix autotest +symmetry 0 nbands 4 stru_file STRU From d19d737df8bc85d4eeeb59db86fb0592596a1b0c Mon Sep 17 00:00:00 2001 From: maki49 <1579492865@qq.com> Date: Wed, 24 May 2023 14:04:54 +0800 Subject: [PATCH 11/12] update doc about some exx paras --- docs/advanced/input_files/input-main.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index 599ed0060a..1faf1dc307 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -1748,14 +1748,15 @@ These variables are relevant when using hybrid functionals. ### exx_hybrid_step - **Type**: Integer -- **Description**: the maximal electronic iteration number in the evaluation of Fock exchange +- **Availability**: *[exx_seperate_loop](#exx_separate_loop)==1* +- **Description**: the maximal iteration number of the outer-loop, where the Fock exchange is calculated - **Default**: 100 ### exx_mixing_beta - **Type**: Real - **Availability**: *[exx_seperate_loop](#exx_separate_loop)==1* -- **Description**: mixing_beta for outer-loop +- **Description**: mixing_beta for densty matrix in each iteration of the outer-loop - **Default**: 1.0 ### exx_lambda @@ -1859,8 +1860,9 @@ These variables are relevant when using hybrid functionals. - **Type**: Real - **Availability**: *[dft_functional](#dft_functional)==opt_orb* -- **Description**: The cut-off of plane wave expansion (Ry), when the plane wave basis is used to optimize the radial ABFs. A reasonable choice is 60. +- **Description**: The cut-off of plane wave expansion, when the plane wave basis is used to optimize the radial ABFs. A reasonable choice is 60. - **Default**: 0 +- **Unit**: Ry ### exx_opt_orb_tolerence From dfb2ff2163793df4f8e29ee5c73122cc9c158538 Mon Sep 17 00:00:00 2001 From: maki49 <1579492865@qq.com> Date: Thu, 25 May 2023 11:03:40 +0800 Subject: [PATCH 12/12] if gamma_only, default symmetry=0 --- docs/advanced/input_files/input-main.md | 2 +- source/module_io/input.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index 1faf1dc307..4a69effcc3 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -400,7 +400,7 @@ These variables are used to control general system parameters. - 1: Symmetry analysis will be performed to determine the type of Bravais lattice and associated symmetry operations. (point groups, space groups, primitive cells, and irreducible k-points) - **Default**: - -1: if (*[dft_fuctional](#dft_functional)==hse/hf/pbe0/scan0/opt_orb* or *[rpa](#rpa)==True*) and *[calculation](#calculation)!=nscf*. Currently symmetry is not supported in EXX (exact exchange) calculation. - - 0: if *[calculation](#calculation)==md/nscf/istate/ienvelope/get_S* + - 0: if *[calculation](#calculation)==md/nscf/istate/ienvelope/get_S* or *[gamma_only]==True* - 1: else ### symmetry_prec diff --git a/source/module_io/input.cpp b/source/module_io/input.cpp index fa87e055c5..f8e761fde3 100644 --- a/source/module_io/input.cpp +++ b/source/module_io/input.cpp @@ -2491,7 +2491,7 @@ void Input::Default_2(void) // jiyy add 2019-08-04 } if (symmetry == "default") { //deal with no-forced default value - if (calculation == "nscf" || calculation == "get_S" || calculation == "istate" || calculation == "ienvelope") + if (gamma_only || calculation == "nscf" || calculation == "get_S" || calculation == "istate" || calculation == "ienvelope") symmetry = "0"; //if md or exx, symmetry will be force-set to 0 or -1 later else symmetry = "1";