Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: fix a bug of relax_nmax default #5506

Merged
merged 8 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/advanced/input_files/input-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion source/module_io/read_input_item_relax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion source/module_parameter/input_parameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading