ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
unitcell_data.h
Go to the documentation of this file.
1#ifndef UNITCELL_DATA_H
2#define UNITCELL_DATA_H
3
7struct Lattice
8{
9 std::string Coordinate = "Direct"; // "Direct" or "Cartesian" or "Cartesian_angstrom"
10 std::string latName = "none"; // Lattice name
11 double lat0 = 0.0; // Lattice constant(bohr)(a.u.)
12 double lat0_angstrom = 0.0; // Lattice constant(angstrom)
13 double tpiba = 0.0; // 2*pi / lat0;
14 double tpiba2 = 0.0; // tpiba ^ 2
15 double omega = 0.0; // the volume of the unit cell
16 int* lc = new int[3]; // Change the lattice vectors or not
17
18 ModuleBase::Matrix3 latvec = ModuleBase::Matrix3(); // Unitcell lattice vectors
19 ModuleBase::Vector3<double> a1, a2, a3; // Same as latvec, just at another form.
20 ModuleBase::Vector3<double> latcenter; // (a1+a2+a3)/2 the center of vector
22 ModuleBase::Matrix3 G = ModuleBase::Matrix3(); // reciprocal lattice vector (2pi*inv(R) )
26
28 {
29 delete[] lc;
30 }
31};
32
33//========================================================
34// relationship between:
35// ntype, it
36// nat, iat
37// atoms[it].na, ia,
38// atoms[it].nw, iw
39//
40// if know it ==> atoms[it].na; atoms[it].nw
41// if know iat ==> it; ia;
42// if know ia, mush have known it ==> iat
43// if know iwt, must have known it, ia ==> iwt
44//========================================================
47{
48 int ntype = 0; // number of atom species in UnitCell
49 int nat = 0; // total number of atoms of all species in unitcell
50 int* iat2it = nullptr; // iat==>it, distinguish a atom belong to which type
51 int* iat2ia = nullptr; // iat==>ia
52 int* iwt2iat = nullptr; // iwt ==> iat.
53 int* iwt2iw = nullptr; // iwt ==> iw, Peize Lin add 2018-07-02
54 ModuleBase::IntArray itia2iat; //(it, ia)==>iat, the index in nat, add 2009-3-2 by mohan
55 int namax = 0; // the max na among all atom species
56 int nwmax = 0; // the max nw among all atom species
57
59 {
60 delete[] iat2it;
61 delete[] iat2ia;
62 delete[] iwt2iat;
63 delete[] iwt2iw;
64 }
65};
66
67#endif
Integer array.
Definition intarray.h:20
3x3 matrix and related mathamatical operations
Definition matrix3.h:19
3 elements vector
Definition vector3.h:22
info of lattice
Definition unitcell_data.h:8
ModuleBase::Vector3< double > a1
Definition unitcell_data.h:19
ModuleBase::Matrix3 latvec
Definition unitcell_data.h:18
double omega
Definition unitcell_data.h:15
ModuleBase::Vector3< double > latcenter
Definition unitcell_data.h:20
ModuleBase::Matrix3 invGGT
Definition unitcell_data.h:25
double tpiba2
Definition unitcell_data.h:14
std::string Coordinate
Definition unitcell_data.h:9
ModuleBase::Vector3< double > a3
Definition unitcell_data.h:19
ModuleBase::Matrix3 GT
Definition unitcell_data.h:23
ModuleBase::Matrix3 latvec_supercell
Definition unitcell_data.h:21
double lat0
Definition unitcell_data.h:11
int * lc
Definition unitcell_data.h:16
~Lattice()
Definition unitcell_data.h:27
std::string latName
Definition unitcell_data.h:10
ModuleBase::Matrix3 GGT
Definition unitcell_data.h:24
ModuleBase::Matrix3 G
Definition unitcell_data.h:22
double lat0_angstrom
Definition unitcell_data.h:12
double tpiba
Definition unitcell_data.h:13
ModuleBase::Vector3< double > a2
Definition unitcell_data.h:19
usefull data and index maps
Definition unitcell_data.h:47
ModuleBase::IntArray itia2iat
Definition unitcell_data.h:54
int nwmax
Definition unitcell_data.h:56
int * iwt2iat
Definition unitcell_data.h:52
int nat
Definition unitcell_data.h:49
int * iat2it
Definition unitcell_data.h:50
int namax
Definition unitcell_data.h:55
int * iat2ia
Definition unitcell_data.h:51
~Statistics()
Definition unitcell_data.h:58
int * iwt2iw
Definition unitcell_data.h:53
int ntype
Definition unitcell_data.h:48