diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index 40edbf5538..d8491bbf71 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -1389,7 +1389,7 @@ These variables are used to control the geometry relaxation. - **Type**: Integer - **Description**: The maximal number of ionic iteration steps, the minimum value is 1. -- **Default**: 1 +- **Default**: 1 for SCF, 50 for relax and cell-relax calcualtions ### relax_cg_thr diff --git a/source/module_io/read_input_item_relax.cpp b/source/module_io/read_input_item_relax.cpp index f222b25ef9..e39abb57d0 100644 --- a/source/module_io/read_input_item_relax.cpp +++ b/source/module_io/read_input_item_relax.cpp @@ -58,7 +58,7 @@ void ReadInput::item_relax() } else if (calculation == "relax" || calculation == "cell-relax") { - if (!para.input.relax_nmax) + if (para.input.relax_nmax == 0) // default value { para.input.relax_nmax = 50; } diff --git a/source/module_parameter/input_parameter.h b/source/module_parameter/input_parameter.h index bfd9ae91cb..db71d32b63 100644 --- a/source/module_parameter/input_parameter.h +++ b/source/module_parameter/input_parameter.h @@ -152,7 +152,7 @@ struct Input_para bool relax_new = true; bool relax = false; ///< allow relaxation along the specific direction double relax_scale_force = 0.5; - int relax_nmax = 1; ///< number of max ionic iter + int relax_nmax = 0; ///< number of max ionic iter double relax_cg_thr = 0.5; ///< threshold when cg to bfgs, pengfei add 2011-08-15 double force_thr = -1; ///< threshold of force in unit (Ry/Bohr) double force_thr_ev = -1; ///< threshold of force in unit (eV/Angstrom)