ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Attributes | List of all members
UnitCell Class Reference

#include <unitcell.h>

Collaboration diagram for UnitCell:

Public Member Functions

template<typename Tiait >
Tiait itiaiw2iwt (const Tiait &it, const Tiait &ia, const Tiait &iw) const
 
void set_iat2iwt (const int &npol_in)
 
const int * get_iat2iwt () const
 
const int & get_npol () const
 
template<typename Tiat , typename Tiait >
bool iat2iait (const Tiat iat, Tiait *ia, Tiait *it) const
 
template<typename Tiat , typename Tiait >
bool ijat2iaitjajt (const Tiat ijat, Tiait *ia, Tiait *it, Tiait *ja, Tiait *jt) const
 
template<typename Tiait >
bool step_it (Tiait *it) const
 
template<typename Tiait >
bool step_ia (const Tiait it, Tiait *ia) const
 
template<typename Tiait >
bool step_iait (Tiait *ia, Tiait *it) const
 
template<typename Tiait >
bool step_jajtiait (Tiait *ja, Tiait *jt, Tiait *ia, Tiait *it) const
 
const ModuleBase::Vector3< double > & get_tau (const int &iat) const
 
const ModuleBase::Vector3< double > cal_dtau (const int &iat1, const int &iat2, const ModuleBase::Vector3< int > &R) const
 
 UnitCell ()
 
 ~UnitCell ()
 
void print_cell (std::ofstream &ofs) const
 
void set_iat2itia ()
 
void setup_cell (const std::string &fn, std::ofstream &log)
 
bool if_atoms_can_move () const
 
bool if_cell_can_change () const
 
void setup (const std::string &latname_in, const int &ntype_in, const int &lmaxmax_in, const bool &init_vel_in, const std::string &fixed_axes_in)
 
void compare_atom_labels (const std::string &label1, const std::string &label2)
 check consistency between two atom labels from STRU and pseudo or orb file
 
std::map< int, int > get_atom_Counts () const
 get atomCounts, which is a map from element type to atom number
 
std::map< int, int > get_orbital_Counts () const
 get orbitalCounts, which is a map from element type to orbital number
 
std::map< int, std::map< int, int > > get_lnchi_Counts () const
 get lnchiCounts, which is a map from element type to the l:nchi map
 
std::vector< std::string > get_atomLabels () const
 get atom labels
 
std::vector< int > get_atomCounts () const
 get atomCounts, which is a vector of element type with atom number
 
std::vector< std::vector< int > > get_lnchiCounts () const
 get lnchiCounts, which is a vector of element type with the l:nchi vector
 
std::vector< ModuleBase::Vector3< double > > get_target_mag () const
 get target magnetic moment for deltaspin
 
std::vector< ModuleBase::Vector3< double > > get_lambda () const
 get lagrange multiplier for deltaspin
 
std::vector< ModuleBase::Vector3< int > > get_constrain () const
 get constrain for deltaspin
 

Public Attributes

Atomatoms = nullptr
 
bool set_atom_flag = false
 
Magnetism magnet
 
std::vector< std::vector< double > > atom_mulliken
 
int n_mag_at = 0
 
Lattice lat
 
std::string & Coordinate = lat.Coordinate
 
std::string & latName = lat.latName
 
double & lat0 = lat.lat0
 
double & lat0_angstrom = lat.lat0_angstrom
 
double & tpiba = lat.tpiba
 
double & tpiba2 = lat.tpiba2
 
double & omega = lat.omega
 
int *& lc = lat.lc
 
ModuleBase::Matrix3latvec = lat.latvec
 
ModuleBase::Vector3< double > & a1 = lat.a1
 
ModuleBase::Vector3< double > & a2 = lat.a2
 
ModuleBase::Vector3< double > & a3 = lat.a3
 
ModuleBase::Vector3< double > & latcenter = lat.latcenter
 
ModuleBase::Matrix3latvec_supercell = lat.latvec_supercell
 
ModuleBase::Matrix3G = lat.G
 
ModuleBase::Matrix3GT = lat.GT
 
ModuleBase::Matrix3GGT = lat.GGT
 
ModuleBase::Matrix3invGGT = lat.invGGT
 
Statistics st
 
int & ntype = st.ntype
 
int & nat = st.nat
 
int *& iat2it = st.iat2it
 
int *& iat2ia = st.iat2ia
 
int *& iwt2iat = st.iwt2iat
 
int *& iwt2iw = st.iwt2iw
 
ModuleBase::IntArrayitia2iat = st.itia2iat
 
int & namax = st.namax
 
int & nwmax = st.nwmax
 
ModuleSymmetry::Symmetry symm
 
ModuleBase::Matrix3 G0
 
ModuleBase::Matrix3 GT0
 
ModuleBase::Matrix3 GGT0
 
ModuleBase::Matrix3 invGGT0
 
bool ionic_position_updated = false
 
bool cell_parameter_updated = false
 
int meshx = 0
 
int natomwfc = 0
 
int lmax = 0
 
int nmax = 0
 
int nmax_total = 0
 
int lmax_ppwf = 0
 
int lmaxmax = 0
 
bool init_vel = false
 
std::vector< double > atom_mass
 
std::vector< std::string > atom_label
 
std::vector< std::string > pseudo_fn
 
std::vector< std::string > pseudo_type
 
std::vector< std::string > orbital_fn
 
std::string descriptor_file
 

Private Attributes

std::vector< int > iat2iwt
 
int npol = 1
 
ModuleBase::Matrix3 stress
 

Constructor & Destructor Documentation

◆ UnitCell()

UnitCell::UnitCell ( )

◆ ~UnitCell()

UnitCell::~UnitCell ( )

Member Function Documentation

◆ cal_dtau()

const ModuleBase::Vector3< double > UnitCell::cal_dtau ( const int &  iat1,
const int &  iat2,
const ModuleBase::Vector3< int > &  R 
) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ compare_atom_labels()

void UnitCell::compare_atom_labels ( const std::string &  label1,
const std::string &  label2 
)

check consistency between two atom labels from STRU and pseudo or orb file

Here is the caller graph for this function:

◆ get_atom_Counts()

std::map< int, int > UnitCell::get_atom_Counts ( ) const

get atomCounts, which is a map from element type to atom number

Here is the caller graph for this function:

◆ get_atomCounts()

std::vector< int > UnitCell::get_atomCounts ( ) const

get atomCounts, which is a vector of element type with atom number

Here is the caller graph for this function:

◆ get_atomLabels()

std::vector< std::string > UnitCell::get_atomLabels ( ) const

get atom labels

these are newly added functions, the three above functions are deprecated and will be removed in the future

Here is the caller graph for this function:

◆ get_constrain()

std::vector< ModuleBase::Vector3< int > > UnitCell::get_constrain ( ) const

get constrain for deltaspin

Here is the caller graph for this function:

◆ get_iat2iwt()

const int * UnitCell::get_iat2iwt ( ) const
inline
Here is the caller graph for this function:

◆ get_lambda()

std::vector< ModuleBase::Vector3< double > > UnitCell::get_lambda ( ) const

get lagrange multiplier for deltaspin

Here is the caller graph for this function:

◆ get_lnchi_Counts()

std::map< int, std::map< int, int > > UnitCell::get_lnchi_Counts ( ) const

get lnchiCounts, which is a map from element type to the l:nchi map

Here is the caller graph for this function:

◆ get_lnchiCounts()

std::vector< std::vector< int > > UnitCell::get_lnchiCounts ( ) const

get lnchiCounts, which is a vector of element type with the l:nchi vector

Here is the caller graph for this function:

◆ get_npol()

const int & UnitCell::get_npol ( ) const
inline
Here is the caller graph for this function:

◆ get_orbital_Counts()

std::map< int, int > UnitCell::get_orbital_Counts ( ) const

get orbitalCounts, which is a map from element type to orbital number

Here is the caller graph for this function:

◆ get_target_mag()

std::vector< ModuleBase::Vector3< double > > UnitCell::get_target_mag ( ) const

get target magnetic moment for deltaspin

Here is the caller graph for this function:

◆ get_tau()

const ModuleBase::Vector3< double > & UnitCell::get_tau ( const int &  iat) const
inline
Here is the caller graph for this function:

◆ iat2iait()

template<typename Tiat , typename Tiait >
bool UnitCell::iat2iait ( const Tiat  iat,
Tiait *  ia,
Tiait *  it 
) const
inline
Here is the caller graph for this function:

◆ if_atoms_can_move()

bool UnitCell::if_atoms_can_move ( ) const
Here is the caller graph for this function:

◆ if_cell_can_change()

bool UnitCell::if_cell_can_change ( ) const
Here is the caller graph for this function:

◆ ijat2iaitjajt()

template<typename Tiat , typename Tiait >
bool UnitCell::ijat2iaitjajt ( const Tiat  ijat,
Tiait *  ia,
Tiait *  it,
Tiait *  ja,
Tiait *  jt 
) const
inline
Here is the call graph for this function:

◆ itiaiw2iwt()

template<typename Tiait >
Tiait UnitCell::itiaiw2iwt ( const Tiait &  it,
const Tiait &  ia,
const Tiait &  iw 
) const
inline
Here is the caller graph for this function:

◆ print_cell()

void UnitCell::print_cell ( std::ofstream &  ofs) const
Here is the caller graph for this function:

◆ set_iat2itia()

void UnitCell::set_iat2itia ( )
Here is the caller graph for this function:

◆ set_iat2iwt()

void UnitCell::set_iat2iwt ( const int &  npol_in)
Here is the caller graph for this function:

◆ setup()

void UnitCell::setup ( const std::string &  latname_in,
const int &  ntype_in,
const int &  lmaxmax_in,
const bool &  init_vel_in,
const std::string &  fixed_axes_in 
)
Here is the caller graph for this function:

◆ setup_cell()

void UnitCell::setup_cell ( const std::string &  fn,
std::ofstream &  log 
)
Here is the caller graph for this function:

◆ step_ia()

template<typename Tiait >
bool UnitCell::step_ia ( const Tiait  it,
Tiait *  ia 
) const
inline
Here is the caller graph for this function:

◆ step_iait()

template<typename Tiait >
bool UnitCell::step_iait ( Tiait *  ia,
Tiait *  it 
) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ step_it()

template<typename Tiait >
bool UnitCell::step_it ( Tiait *  it) const
inline
Here is the caller graph for this function:

◆ step_jajtiait()

template<typename Tiait >
bool UnitCell::step_jajtiait ( Tiait *  ja,
Tiait *  jt,
Tiait *  ia,
Tiait *  it 
) const
inline
Here is the call graph for this function:

Member Data Documentation

◆ a1

ModuleBase::Vector3<double>& UnitCell::a1 = lat.a1

◆ a2

ModuleBase::Vector3<double> & UnitCell::a2 = lat.a2

◆ a3

ModuleBase::Vector3<double> & UnitCell::a3 = lat.a3

◆ atom_label

std::vector<std::string> UnitCell::atom_label

◆ atom_mass

std::vector<double> UnitCell::atom_mass

◆ atom_mulliken

std::vector<std::vector<double> > UnitCell::atom_mulliken

◆ atoms

Atom* UnitCell::atoms = nullptr

◆ cell_parameter_updated

bool UnitCell::cell_parameter_updated = false

◆ Coordinate

std::string& UnitCell::Coordinate = lat.Coordinate

◆ descriptor_file

std::string UnitCell::descriptor_file

◆ G

ModuleBase::Matrix3& UnitCell::G = lat.G

◆ G0

ModuleBase::Matrix3 UnitCell::G0

◆ GGT

ModuleBase::Matrix3& UnitCell::GGT = lat.GGT

◆ GGT0

ModuleBase::Matrix3 UnitCell::GGT0

◆ GT

ModuleBase::Matrix3& UnitCell::GT = lat.GT

◆ GT0

ModuleBase::Matrix3 UnitCell::GT0

◆ iat2ia

int*& UnitCell::iat2ia = st.iat2ia

◆ iat2it

int*& UnitCell::iat2it = st.iat2it

◆ iat2iwt

std::vector<int> UnitCell::iat2iwt
private

◆ init_vel

bool UnitCell::init_vel = false

◆ invGGT

ModuleBase::Matrix3& UnitCell::invGGT = lat.invGGT

◆ invGGT0

ModuleBase::Matrix3 UnitCell::invGGT0

◆ ionic_position_updated

bool UnitCell::ionic_position_updated = false

◆ itia2iat

ModuleBase::IntArray& UnitCell::itia2iat = st.itia2iat

◆ iwt2iat

int*& UnitCell::iwt2iat = st.iwt2iat

◆ iwt2iw

int*& UnitCell::iwt2iw = st.iwt2iw

◆ lat

Lattice UnitCell::lat

◆ lat0

double& UnitCell::lat0 = lat.lat0

◆ lat0_angstrom

double& UnitCell::lat0_angstrom = lat.lat0_angstrom

◆ latcenter

ModuleBase::Vector3<double>& UnitCell::latcenter = lat.latcenter

◆ latName

std::string& UnitCell::latName = lat.latName

◆ latvec

ModuleBase::Matrix3& UnitCell::latvec = lat.latvec

◆ latvec_supercell

ModuleBase::Matrix3& UnitCell::latvec_supercell = lat.latvec_supercell

◆ lc

int*& UnitCell::lc = lat.lc

◆ lmax

int UnitCell::lmax = 0

◆ lmax_ppwf

int UnitCell::lmax_ppwf = 0

◆ lmaxmax

int UnitCell::lmaxmax = 0

◆ magnet

Magnetism UnitCell::magnet

◆ meshx

int UnitCell::meshx = 0

◆ n_mag_at

int UnitCell::n_mag_at = 0

◆ namax

int& UnitCell::namax = st.namax

◆ nat

int& UnitCell::nat = st.nat

◆ natomwfc

int UnitCell::natomwfc = 0

◆ nmax

int UnitCell::nmax = 0

◆ nmax_total

int UnitCell::nmax_total = 0

◆ npol

int UnitCell::npol = 1
private

◆ ntype

int& UnitCell::ntype = st.ntype

◆ nwmax

int& UnitCell::nwmax = st.nwmax

◆ omega

double& UnitCell::omega = lat.omega

◆ orbital_fn

std::vector<std::string> UnitCell::orbital_fn

◆ pseudo_fn

std::vector<std::string> UnitCell::pseudo_fn

◆ pseudo_type

std::vector<std::string> UnitCell::pseudo_type

◆ set_atom_flag

bool UnitCell::set_atom_flag = false

◆ st

Statistics UnitCell::st

◆ stress

ModuleBase::Matrix3 UnitCell::stress
private

◆ symm

ModuleSymmetry::Symmetry UnitCell::symm

◆ tpiba

double& UnitCell::tpiba = lat.tpiba

◆ tpiba2

double& UnitCell::tpiba2 = lat.tpiba2

The documentation for this class was generated from the following files: