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#ifndef ATOM_H
2#define ATOM_H
3
4#include "atom_pseudo.h"
5class Atom
6{
7 public:
8 // constructor and destructor
9 Atom();
10 ~Atom();
11
13 double mass = 0.0; // the mass of atom
14 std::vector<ModuleBase::Vector3<int>> mbl; // whether the atoms can move or not
15 bool flag_empty_element = false; // whether is the empty element for bsse. Peize Lin add 2021.04.07
16
17 std::vector<int> iw2m; // use iw to find m
18 std::vector<int> iw2n; // use iw to find n
19 std::vector<int> iw2l; // use iw to find L
20 std::vector<int> iw2_ylm;
21 std::vector<bool> iw2_new;
22 int nw = 0; // number of local orbitals (l,n,m) of this type
23
24 void set_index();
25
26 int type = 0; // Index of atom type
27 int na = 0; // Number of atoms in this type.
28
29 int nwl = 0; // max L(Angular momentum) (for local basis)
30 double Rcut = 0.0; // pengfei Li 16-2-29
31 std::vector<int> l_nchi; // number of chi for each L
32 int stapos_wf = 0; // start position of wave functions
33
34 std::string label = "\0"; // atomic symbol
35 std::vector<ModuleBase::Vector3<double>> tau; // Cartesian coordinates of each atom in this type.
36 std::vector<ModuleBase::Vector3<double>> dis; // direct displacements of each atom in this type in current step liuyu modift 2023-03-22
37 std::vector<ModuleBase::Vector3<double>> taud; // Direct coordinates of each atom in this type.
38 std::vector<ModuleBase::Vector3<int>> boundary_shift; // record for periodic boundary adjustment.
39 std::vector<ModuleBase::Vector3<double>> vel; // velocities of each atom in this type.
40 std::vector<ModuleBase::Vector3<double>> force; // force acting on each atom in this type.
41 std::vector<ModuleBase::Vector3<double>> lambda; // Lagrange multiplier for each atom in this type. used in deltaspin
42 std::vector<ModuleBase::Vector3<int>> constrain; // constrain for each atom in this type. used in deltaspin
43 std::string label_orb = "\0"; // atomic Element symbol in the orbital file of lcao
44
45 std::vector<double> mag;
46 std::vector<double> angle1; // spin angle, added by zhengdy-soc
47 std::vector<double> angle2;
48 std::vector<ModuleBase::Vector3<double>> m_loc_;
49 // Coulomb potential v(r) = z/r
50 // It is a local potentail, and has no non-local potential parts.
51 bool coulomb_potential = false;
52 void print_Atom(std::ofstream& ofs);
54#ifdef __MPI
55 void bcast_atom();
56 void bcast_atom2();
57#endif
58};
59
60#endif // Atomspec
Definition atom_pseudo.h:11
Definition atom_spec.h:6
Atom_pseudo ncpp
Definition atom_spec.h:12
std::vector< ModuleBase::Vector3< int > > constrain
Definition atom_spec.h:42
void bcast_atom()
Definition atom_spec.cpp:79
std::vector< int > iw2_ylm
Definition atom_spec.h:20
bool flag_empty_element
Definition atom_spec.h:15
std::vector< ModuleBase::Vector3< int > > boundary_shift
Definition atom_spec.h:38
void update_force(ModuleBase::matrix &fcs)
std::vector< int > iw2m
Definition atom_spec.h:17
std::vector< ModuleBase::Vector3< double > > m_loc_
Definition atom_spec.h:48
std::vector< ModuleBase::Vector3< double > > force
Definition atom_spec.h:40
void print_Atom(std::ofstream &ofs)
Definition atom_spec.cpp:50
int na
Definition atom_spec.h:27
std::vector< double > angle2
Definition atom_spec.h:47
int nw
Definition atom_spec.h:22
~Atom()
Definition atom_spec.cpp:10
std::string label_orb
Definition atom_spec.h:43
int nwl
Definition atom_spec.h:29
std::vector< ModuleBase::Vector3< double > > vel
Definition atom_spec.h:39
int type
Definition atom_spec.h:26
void bcast_atom2()
Definition atom_spec.cpp:151
double mass
Definition atom_spec.h:13
std::string label
Definition atom_spec.h:34
bool coulomb_potential
Definition atom_spec.h:51
std::vector< ModuleBase::Vector3< double > > dis
Definition atom_spec.h:36
Atom()
Definition atom_spec.cpp:6
int stapos_wf
Definition atom_spec.h:32
std::vector< ModuleBase::Vector3< double > > taud
Definition atom_spec.h:37
std::vector< double > mag
Definition atom_spec.h:45
double Rcut
Definition atom_spec.h:30
std::vector< int > l_nchi
Definition atom_spec.h:31
std::vector< ModuleBase::Vector3< double > > tau
Definition atom_spec.h:35
std::vector< int > iw2l
Definition atom_spec.h:19
std::vector< ModuleBase::Vector3< double > > lambda
Definition atom_spec.h:41
std::vector< int > iw2n
Definition atom_spec.h:18
std::vector< ModuleBase::Vector3< int > > mbl
Definition atom_spec.h:14
std::vector< double > angle1
Definition atom_spec.h:46
void set_index()
Definition atom_spec.cpp:14
std::vector< bool > iw2_new
Definition atom_spec.h:21
Definition matrix.h:18