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 "../source_io/output.h"
5#include "atom_pseudo.h"
6class Atom
7{
8 public:
9 // constructor and destructor
10 Atom();
11 ~Atom();
12
14 double mass = 0.0; // the mass of atom
15 std::vector<ModuleBase::Vector3<int>> mbl; // whether the atoms can move or not
16 bool flag_empty_element = false; // whether is the empty element for bsse. Peize Lin add 2021.04.07
17
18 std::vector<int> iw2m; // use iw to find m
19 std::vector<int> iw2n; // use iw to find n
20 std::vector<int> iw2l; // use iw to find L
21 std::vector<int> iw2_ylm;
22 std::vector<bool> iw2_new;
23 int nw = 0; // number of local orbitals (l,n,m) of this type
24
25 void set_index();
26
27 int type = 0; // Index of atom type
28 int na = 0; // Number of atoms in this type.
29
30 int nwl = 0; // max L(Angular momentum) (for local basis)
31 double Rcut = 0.0; // pengfei Li 16-2-29
32 std::vector<int> l_nchi; // number of chi for each L
33 int stapos_wf = 0; // start position of wave functions
34
35 std::string label = "\0"; // atomic symbol
36 std::vector<ModuleBase::Vector3<double>> tau; // Cartesian coordinates of each atom in this type.
37 std::vector<ModuleBase::Vector3<double>> dis; // direct displacements of each atom in this type in current step liuyu modift 2023-03-22
38 std::vector<ModuleBase::Vector3<double>> taud; // Direct coordinates of each atom in this type.
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:13
Definition atom_spec.h:7
Atom_pseudo ncpp
Definition atom_spec.h:13
std::vector< ModuleBase::Vector3< int > > constrain
Definition atom_spec.h:42
void bcast_atom()
Definition atom_spec.cpp:78
std::vector< int > iw2_ylm
Definition atom_spec.h:21
bool flag_empty_element
Definition atom_spec.h:16
void update_force(ModuleBase::matrix &fcs)
std::vector< int > iw2m
Definition atom_spec.h:18
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:49
int na
Definition atom_spec.h:28
std::vector< double > angle2
Definition atom_spec.h:47
int nw
Definition atom_spec.h:23
~Atom()
Definition atom_spec.cpp:9
std::string label_orb
Definition atom_spec.h:43
int nwl
Definition atom_spec.h:30
std::vector< ModuleBase::Vector3< double > > vel
Definition atom_spec.h:39
int type
Definition atom_spec.h:27
void bcast_atom2()
Definition atom_spec.cpp:149
double mass
Definition atom_spec.h:14
std::string label
Definition atom_spec.h:35
bool coulomb_potential
Definition atom_spec.h:51
std::vector< ModuleBase::Vector3< double > > dis
Definition atom_spec.h:37
Atom()
Definition atom_spec.cpp:5
int stapos_wf
Definition atom_spec.h:33
std::vector< ModuleBase::Vector3< double > > taud
Definition atom_spec.h:38
std::vector< double > mag
Definition atom_spec.h:45
double Rcut
Definition atom_spec.h:31
std::vector< int > l_nchi
Definition atom_spec.h:32
std::vector< ModuleBase::Vector3< double > > tau
Definition atom_spec.h:36
std::vector< int > iw2l
Definition atom_spec.h:20
std::vector< ModuleBase::Vector3< double > > lambda
Definition atom_spec.h:41
std::vector< int > iw2n
Definition atom_spec.h:19
std::vector< ModuleBase::Vector3< int > > mbl
Definition atom_spec.h:15
std::vector< double > angle1
Definition atom_spec.h:46
void set_index()
Definition atom_spec.cpp:13
std::vector< bool > iw2_new
Definition atom_spec.h:22
Definition matrix.h:19