|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Unified data structure for geometry optimization algorithms. More...
#include <relax_data.h>
Public Member Functions | |
| Relax_Data ()=default | |
| Default constructor. | |
| ~Relax_Data ()=default | |
| Default destructor. | |
| void | allocate (const int dim_in) |
| Allocate memory for data vectors. | |
Public Attributes | |
| std::vector< double > | pos |
| Current atomic positions in Bohr. | |
| std::vector< double > | grad |
| Current gradient (negative force) in Ry/Bohr. | |
| std::vector< double > | move |
| Displacement vector for next step. | |
| std::vector< double > | pos_p |
| Previous atomic positions. | |
| std::vector< double > | grad_p |
| Previous gradient. | |
| std::vector< double > | move_p |
| Previous displacement. | |
Static Public Attributes | |
| static int | dim = 0 |
| Dimension of free variables (3 * number of atoms) for ion movement. | |
| static int | dim_lattice = 0 |
| Dimension of free variables (9) for lattice change. | |
| static double | largest_grad = 0.0 |
| Largest gradient component (force) in current step. | |
Unified data structure for geometry optimization algorithms.
This class provides a common data container for all relaxation methods (BFGS, CG, SD, etc.) to share and reuse key variables like positions, gradients, and move vectors. It serves as the single source of truth for optimization state across different algorithms.
|
default |
Default constructor.
|
default |
Default destructor.
| void Relax_Data::allocate | ( | const int | dim_in | ) |
Allocate memory for data vectors.
| dim_in | Dimension of the optimization problem (3 * number of atoms). |
|
static |
Dimension of free variables (3 * number of atoms) for ion movement.
|
static |
Dimension of free variables (9) for lattice change.
| std::vector<double> Relax_Data::grad |
Current gradient (negative force) in Ry/Bohr.
| std::vector<double> Relax_Data::grad_p |
Previous gradient.
|
static |
Largest gradient component (force) in current step.
| std::vector<double> Relax_Data::move |
Displacement vector for next step.
| std::vector<double> Relax_Data::move_p |
Previous displacement.
| std::vector<double> Relax_Data::pos |
Current atomic positions in Bohr.
| std::vector<double> Relax_Data::pos_p |
Previous atomic positions.