ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
cell_geometry.h
Go to the documentation of this file.
1#ifndef CELL_GEOMETRY_H
2#define CELL_GEOMETRY_H
3
5
6#include <array>
7#include <vector>
8
9namespace ModuleBase
10{
11class Matrix3;
12}
13
14namespace unitcell
15{
16
20{
21 std::array<ModuleBase::Vector3<double>, 3> axes;
22 std::array<double, 3> lengths;
24};
25
29 double lattice_scale,
30 double relative_tolerance,
31 OrthogonalCell& cell);
32
36 const OrthogonalCell& cell);
37
44 const std::vector<double>& weights,
45 const OrthogonalCell& cell);
46
50{
52 double length = 0.0;
53 double area = 0.0;
54 double origin = 0.0;
55};
56
59bool make_slab_cell(const ModuleBase::Matrix3& lattice,
60 double lattice_scale,
61 int open_axis,
62 double relative_tolerance,
63 SlabCell& cell);
64
66double relative_coordinate(const ModuleBase::Vector3<double>& position, const SlabCell& cell);
67
70double weighted_center(const std::vector<ModuleBase::Vector3<double>>& positions,
71 const std::vector<double>& weights,
72 const SlabCell& cell);
73
74} // namespace unitcell
75
76#endif
3x3 matrix and related mathamatical operations
Definition matrix3.h:15
3 elements vector
Definition vector3.h:21
Definition clebsch_gordan_coeff.cpp:8
Free functions for extracting atom/orbital info from Atom array.
Definition bcast_cell.cpp:8
bool make_slab_cell(const ModuleBase::Matrix3 &lattice, const double lattice_scale, const int open_axis, const double relative_tolerance, SlabCell &cell)
Definition cell_geometry.cpp:80
bool make_orthogonal_cell(const ModuleBase::Matrix3 &lattice, const double lattice_scale, const double relative_tolerance, OrthogonalCell &cell)
Definition cell_geometry.cpp:10
ModuleBase::Vector3< double > relative_position(const ModuleBase::Vector3< double > &position, const OrthogonalCell &cell)
Definition cell_geometry.cpp:43
ModuleBase::Vector3< double > weighted_center(const std::vector< ModuleBase::Vector3< double > > &positions, const std::vector< double > &weights, const OrthogonalCell &cell)
Definition cell_geometry.cpp:60
double relative_coordinate(const ModuleBase::Vector3< double > &position, const SlabCell &cell)
Normal displacement in [-L/2, L/2); requires a validated cell and position.
Definition cell_geometry.cpp:109
Definition cell_geometry.h:20
ModuleBase::Vector3< double > origin
Definition cell_geometry.h:23
std::array< double, 3 > lengths
Definition cell_geometry.h:22
std::array< ModuleBase::Vector3< double >, 3 > axes
Definition cell_geometry.h:21
Definition cell_geometry.h:50
double area
Definition cell_geometry.h:53
double origin
Definition cell_geometry.h:54
ModuleBase::Vector3< double > normal
Definition cell_geometry.h:51
double length
Definition cell_geometry.h:52