ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
atom_spec.h
Go to the documentation of this file.
1
5#ifndef ATOM_H
6#define ATOM_H
7
8#include "atom_pseudo.h"
9
13class Atom
14{
15 public:
19 Atom();
20
24 ~Atom();
25
27 double mass = 0.0;
28 std::vector<ModuleBase::Vector3<int>> mbl;
29 bool flag_empty_element = false;
30
31 std::vector<int> iw2m;
32 std::vector<int> iw2n;
33 std::vector<int> iw2l;
34 std::vector<int> iw2_ylm;
35 std::vector<bool> iw2_new;
36 int nw = 0;
37
41 void set_index();
42
43 int type = 0;
44 int na = 0;
45
46 int nwl = 0;
47 double Rcut = 0.0;
48 std::vector<int> l_nchi;
49 int stapos_wf = 0;
50
51 std::string label;
52 std::vector<ModuleBase::Vector3<double>> tau;
53 std::vector<ModuleBase::Vector3<double>> dis;
54 std::vector<ModuleBase::Vector3<double>> taud;
55 std::vector<ModuleBase::Vector3<int>> boundary_shift;
56 std::vector<ModuleBase::Vector3<double>> vel;
57 std::vector<ModuleBase::Vector3<double>> force;
58 std::vector<ModuleBase::Vector3<double>> lambda;
59 std::vector<ModuleBase::Vector3<int>> constrain;
60 std::string label_orb;
61
62 std::vector<double> mag;
63 std::vector<double> angle1;
64 std::vector<double> angle2;
65 std::vector<ModuleBase::Vector3<double>> m_loc_;
66
69 bool coulomb_potential = false;
70
76 void print_Atom(std::ofstream& ofs);
77
84
85#ifdef __MPI
89 void bcast_atom();
90
94 void bcast_atom2();
95#endif
96};
97
98#endif // Atomspec
Atom_pseudo class for atom pseudopotential data.
Atom_pseudo class for atom pseudopotential data.
Definition atom_pseudo.h:17
Atom_pseudo ncpp
pseudopotential for this atom type
Definition atom_spec.h:26
std::vector< ModuleBase::Vector3< int > > constrain
constrain for each atom in this type, used in deltaspin
Definition atom_spec.h:59
void bcast_atom()
Broadcast atom data.
Definition atom_spec.cpp:82
std::vector< int > iw2_ylm
use iw to find ylm index
Definition atom_spec.h:34
bool flag_empty_element
whether is the empty element for bsse (Peize Lin add 2021.04.07)
Definition atom_spec.h:29
std::vector< ModuleBase::Vector3< int > > boundary_shift
record for periodic boundary adjustment
Definition atom_spec.h:55
void update_force(ModuleBase::matrix &fcs)
Update force.
std::vector< int > iw2m
use iw to find m
Definition atom_spec.h:31
std::vector< ModuleBase::Vector3< double > > m_loc_
local magnetic moment
Definition atom_spec.h:65
std::vector< ModuleBase::Vector3< double > > force
force acting on each atom in this type
Definition atom_spec.h:57
void print_Atom(std::ofstream &ofs)
Print atom information.
Definition atom_spec.cpp:53
int na
Number of atoms in this type.
Definition atom_spec.h:44
std::vector< double > angle2
spin angle, added by zhengdy-soc
Definition atom_spec.h:64
int nw
number of local orbitals (l,n,m) of this type
Definition atom_spec.h:36
~Atom()
Destructor.
Definition atom_spec.cpp:13
std::string label_orb
atomic element symbol in the orbital file of lcao
Definition atom_spec.h:60
int nwl
max L(Angular momentum) (for local basis)
Definition atom_spec.h:46
std::vector< ModuleBase::Vector3< double > > vel
velocities of each atom in this type
Definition atom_spec.h:56
int type
Index of atom type.
Definition atom_spec.h:43
void bcast_atom2()
Broadcast atom data (second version).
Definition atom_spec.cpp:154
double mass
the mass of atom
Definition atom_spec.h:27
std::string label
atomic symbol
Definition atom_spec.h:51
bool coulomb_potential
Coulomb potential v(r) = z/r It is a local potential, and has no non-local potential parts.
Definition atom_spec.h:69
std::vector< ModuleBase::Vector3< double > > dis
direct displacements of each atom in this type in current step (liuyu modify 2023-03-22)
Definition atom_spec.h:53
Atom()
Constructor.
Definition atom_spec.cpp:9
int stapos_wf
start position of wave functions
Definition atom_spec.h:49
std::vector< ModuleBase::Vector3< double > > taud
Direct coordinates of each atom in this type.
Definition atom_spec.h:54
std::vector< double > mag
magnetic moment
Definition atom_spec.h:62
double Rcut
cut-off radius (pengfei Li 16-2-29)
Definition atom_spec.h:47
std::vector< int > l_nchi
number of chi for each L
Definition atom_spec.h:48
std::vector< ModuleBase::Vector3< double > > tau
Cartesian coordinates of each atom in this type, in unit of lat0.
Definition atom_spec.h:52
std::vector< int > iw2l
use iw to find L
Definition atom_spec.h:33
std::vector< ModuleBase::Vector3< double > > lambda
Lagrange multiplier for each atom in this type, used in deltaspin.
Definition atom_spec.h:58
std::vector< int > iw2n
use iw to find n
Definition atom_spec.h:32
std::vector< ModuleBase::Vector3< int > > mbl
whether the atoms can move or not
Definition atom_spec.h:28
std::vector< double > angle1
spin angle, added by zhengdy-soc
Definition atom_spec.h:63
void set_index()
Set index arrays.
Definition atom_spec.cpp:17
std::vector< bool > iw2_new
use iw to find new flag
Definition atom_spec.h:35
Definition matrix.h:15