ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Relax_Criteria Struct Reference

INPUT-derived settings that the relaxation algorithms need. More...

#include <relax_criteria.h>

Collaboration diagram for Relax_Criteria:

Public Attributes

double force_thr = -1
 Force convergence threshold, Ry/Bohr.
double force_thr_ev = -1
 The same threshold in eV/Angstrom, reconciled by ReadInput.
double stress_thr = 0.5
 Stress convergence threshold, kbar.
bool fixed_ibrav = false
 Keep the Bravais lattice type fixed while relaxing the cell.
std::string out_level = "ie"
 Output verbosity; "ie" prints per-step energy to stdout.
int test_relax_method = 0
 Debug verbosity for the relaxation algorithms.

Detailed Description

INPUT-derived settings that the relaxation algorithms need.

These values used to be read straight out of the global PARAM inside the algorithms. That made the algorithms impossible to unit test without mutating global state, which in turn is why their tests had to switch off access control with #define private public.

They are now filled once by the relaxation driver and passed down explicitly. Leaf functions still take only the individual values they use; this struct exists to keep the plumbing signatures readable.

Member Data Documentation

◆ fixed_ibrav

bool Relax_Criteria::fixed_ibrav = false

Keep the Bravais lattice type fixed while relaxing the cell.

◆ force_thr

double Relax_Criteria::force_thr = -1

Force convergence threshold, Ry/Bohr.

◆ force_thr_ev

double Relax_Criteria::force_thr_ev = -1

The same threshold in eV/Angstrom, reconciled by ReadInput.

◆ out_level

std::string Relax_Criteria::out_level = "ie"

Output verbosity; "ie" prints per-step energy to stdout.

◆ stress_thr

double Relax_Criteria::stress_thr = 0.5

Stress convergence threshold, kbar.

◆ test_relax_method

int Relax_Criteria::test_relax_method = 0

Debug verbosity for the relaxation algorithms.


The documentation for this struct was generated from the following file: