ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
cell_tools.h
Go to the documentation of this file.
1
5#ifndef CELL_TOOLS_H
6#define CELL_TOOLS_H
7
8#include <string>
9#include <vector>
10
11#include "source_base/vector3.h"
13
17namespace unitcell
18{
20 struct AtomData
21 {
23 double mass = 0.0;
24 double valence_charge = 0.0;
25 int atomic_number = 0;
26 };
27
30 int pseudo_atom_z(const Atom& atom);
31
34 std::vector<AtomData> get_atom_data(const Atom* atoms, int ntype, double lattice_scale);
35
40 std::vector<std::string> get_atomLabels(const Atom* atoms, const int ntype);
41
46 std::vector<int> get_atomCounts(const Atom* atoms, const int ntype);
47
52 std::vector<std::vector<int>> get_lnchiCounts(const Atom* atoms, const int ntype);
53
59 std::vector<ModuleBase::Vector3<double>> get_target_mag(const Atom* atoms,
60 const int ntype,
61 const int nat);
62
68 std::vector<ModuleBase::Vector3<double>> get_lambda(const Atom* atoms,
69 const int ntype,
70 const int nat);
71
77 std::vector<ModuleBase::Vector3<int>> get_constrain(const Atom* atoms,
78 const int ntype,
79 const int nat);
80
85 bool if_atoms_can_move(const Atom* atoms, const int ntype);
86
90 bool if_cell_can_change(const std::vector<int>& lat_axis_free);
91}
92
93#endif // CELL_TOOLS_H
Atom class for storing atom information.
Atom class for storing atom information.
Definition atom_spec.h:14
3 elements vector
Definition vector3.h:21
Free functions for extracting atom/orbital info from Atom array.
Definition bcast_cell.cpp:8
int pseudo_atom_z(const Atom &atom)
Definition cell_tools.cpp:12
std::vector< std::vector< int > > get_lnchiCounts(const Atom *atoms, const int ntype)
Get lnchi counts (number of chi functions per L) for each atom type.
Definition cell_tools.cpp:76
std::vector< int > get_atomCounts(const Atom *atoms, const int ntype)
Get atom counts (number of atoms) for each atom type.
Definition cell_tools.cpp:66
std::vector< ModuleBase::Vector3< double > > get_lambda(const Atom *atoms, const int ntype, const int nat)
Get Lagrange multiplier for each atom (used by deltaspin).
Definition cell_tools.cpp:107
std::vector< ModuleBase::Vector3< double > > get_target_mag(const Atom *atoms, const int ntype, const int nat)
Get target magnetic moment for each atom (used by deltaspin).
Definition cell_tools.cpp:90
std::vector< AtomData > get_atom_data(const Atom *atoms, const int ntype, const double lattice_scale)
Definition cell_tools.cpp:31
std::vector< ModuleBase::Vector3< int > > get_constrain(const Atom *atoms, const int ntype, const int nat)
Get constrain flag for each atom (used by deltaspin).
Definition cell_tools.cpp:124
std::vector< std::string > get_atomLabels(const Atom *atoms, const int ntype)
Get atom labels for each atom type.
Definition cell_tools.cpp:56
bool if_atoms_can_move(const Atom *atoms, const int ntype)
Judge if any atom can move (any mbl component is non-zero).
Definition cell_tools.cpp:141
bool if_cell_can_change(const std::vector< int > &lat_axis_free)
Judge if any lattice vector can change.
Definition cell_tools.cpp:156
Cartesian atom information in type-major order, matching ABACUS atom indices.
Definition cell_tools.h:21
double mass
Definition cell_tools.h:23
double valence_charge
Positive ionic charge in units of e.
Definition cell_tools.h:24
int atomic_number
Nuclear charge from the pseudopotential element; 0 if unknown.
Definition cell_tools.h:25
ModuleBase::Vector3< double > position
Bohr.
Definition cell_tools.h:22