ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
relax_data.h
Go to the documentation of this file.
1#ifndef RELAX_DATA_H
2#define RELAX_DATA_H
3
4#include <vector>
5
15{
16 public:
20 Relax_Data() = default;
21
25 ~Relax_Data() = default;
26
31 void allocate(const int dim_in);
32
33 // Static members - shared global state across all relaxation instances
34 static int dim;
35 static int dim_lattice;
36
37 static double largest_grad;
38
39 // Instance members - per-iteration data
40 std::vector<double> pos;
41 std::vector<double> grad;
42 std::vector<double> move;
43
44 std::vector<double> pos_p;
45 std::vector<double> grad_p;
46 std::vector<double> move_p;
47};
48
49#endif
std::vector< double > grad
Current gradient (negative force) in Ry/Bohr.
Definition relax_data.h:41
std::vector< double > grad_p
Previous gradient.
Definition relax_data.h:45
static int dim_lattice
Dimension of free variables (9) for lattice change.
Definition relax_data.h:35
static int dim
Dimension of free variables (3 * number of atoms) for ion movement.
Definition relax_data.h:34
static double largest_grad
Largest gradient component (force) in current step.
Definition relax_data.h:37
Relax_Data()=default
Default constructor.
std::vector< double > move_p
Previous displacement.
Definition relax_data.h:46
std::vector< double > move
Displacement vector for next step.
Definition relax_data.h:42
~Relax_Data()=default
Default destructor.
std::vector< double > pos_p
Previous atomic positions.
Definition relax_data.h:44
std::vector< double > pos
Current atomic positions in Bohr.
Definition relax_data.h:40
void allocate(const int dim_in)
Allocate memory for data vectors.
Definition relax_data.cpp:8