ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
This class is used to get the information of the atoms and orbitals indices in the unit cell. More...
#include <cell_index.h>
Public Member Functions | |
CellIndex ()=default | |
CellIndex (const std::vector< std::string > &atomLabels_in, const std::vector< int > &atomCounts_in, const std::vector< std::vector< int > > &lnchiCounts_in, const int &nspin) | |
int | get_nat () |
the total number of atoms | |
int | get_nat (int it) |
the total number of atoms of a given type | |
int | get_ntype () |
get ntype | |
int | get_nw () |
get nw | |
int | get_nw (int iat) |
get nw of a given type | |
int | get_iwt (int iat, int orbital_index) |
get iwt | |
int | get_maxL (int iat) |
get maximum L of a given atom | |
int | get_nchi (int iat, int L) |
get nchi of a given atom and a give L | |
std::string | get_atom_label (int iat, bool order=false) |
get atom label of a given atom | |
void | write_orb_info (std::string out_dir) |
write orbital info into file | |
Private Member Functions | |
void | cal_orbitalCounts () |
calculate orbitalCounts from lnchiCounts | |
bool | check_nspin (int nspin) |
check nspin | |
void | check_atomCounts () |
check if atomCounts is set ok | |
int | iat2it (int iat) |
get type of atom from total order | |
int | iat2ia (int iat) |
get index of atom in the same type | |
int | iw2l (int iat, int iw) |
get L from iw | |
int | iw2z (int iat, int iw) |
get Z from iw | |
int | iw2m (int iat, int iw) |
get m from iw | |
Private Attributes | |
std::vector< int > | atomCounts = {} |
atomCounts is a vector used to store the number of atoms for each type | |
std::vector< int > | orbitalCounts = {} |
orbitalCounts is a vector used to store the number of orbitals for each type | |
std::vector< std::vector< int > > | lnchiCounts = {} |
lnchiCounts is a vector used to store the number of chi for each L | |
std::vector< std::string > | atomLabels = {} |
atomLabels is a vector used to store the atom labels | |
int | npol_ = 1 |
npol is determined by nspin and used in get_iwt and get_nw | |
This class is used to get the information of the atoms and orbitals indices in the unit cell.
The information includes the number of atoms, the number of orbitals, the number of chi, the atom labels, the maximum L of a given atom, the number of chi of a given atom and a given L, the atom label of a given atom, etc. The class provides the interface to get the information of the atoms and orbitals indices in the unit cell. It also provides the interface to write the orbital information into a file. It is now used only in the Output_Mulliken class. However, it is supposed to be able to replace ucell in LCAO codes where only cell indices are needed. Take care that the three key vectors atomCounts, lnchiCounts, and atomLabels should be set from the UnitCell class. It depends on nspin because the functions get_nw() and get_iwt() are related to nspin, and can be used in the LCAO Hamiltonian construction.
|
default |
CellIndex::CellIndex | ( | const std::vector< std::string > & | atomLabels_in, |
const std::vector< int > & | atomCounts_in, | ||
const std::vector< std::vector< int > > & | lnchiCounts_in, | ||
const int & | nspin | ||
) |
|
private |
calculate orbitalCounts from lnchiCounts
|
private |
check if atomCounts is set ok
|
private |
check nspin
std::string CellIndex::get_atom_label | ( | int | iat, |
bool | order = false |
||
) |
get atom label of a given atom
int CellIndex::get_iwt | ( | int | iat, |
int | orbital_index | ||
) |
get iwt
int CellIndex::get_maxL | ( | int | iat | ) |
get maximum L of a given atom
int CellIndex::get_nat | ( | ) |
the total number of atoms
int CellIndex::get_nat | ( | int | it | ) |
the total number of atoms of a given type
int CellIndex::get_nchi | ( | int | iat, |
int | L | ||
) |
get nchi of a given atom and a give L
get nchi
int CellIndex::get_ntype | ( | ) |
get ntype
int CellIndex::get_nw | ( | ) |
get nw
int CellIndex::get_nw | ( | int | iat | ) |
get nw of a given type
|
private |
get index of atom in the same type
|
private |
get type of atom from total order
|
private |
get L from iw
|
private |
get m from iw
|
private |
get Z from iw
void CellIndex::write_orb_info | ( | std::string | out_dir | ) |
write orbital info into file
|
private |
atomCounts is a vector used to store the number of atoms for each type
|
private |
atomLabels is a vector used to store the atom labels
|
private |
lnchiCounts is a vector used to store the number of chi for each L
|
private |
npol is determined by nspin and used in get_iwt and get_nw
|
private |
orbitalCounts is a vector used to store the number of orbitals for each type