|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Provide the basic information about unitcell. More...
Public Member Functions | |
| UnitCell () | |
| ~UnitCell () | |
| UnitCell (const UnitCell &)=delete | |
| UnitCell & | operator= (const UnitCell &)=delete |
| UnitCell (UnitCell &&)=delete | |
| UnitCell & | operator= (UnitCell &&)=delete |
| void | setup_from_input (const std::string &latname_in, const int &ntype_in, const int &lmaxmax_in, const bool &init_vel_in, const std::string &fixed_axes_in) |
| Initialize basic cell parameters (latname, ntype, lmaxmax, init_vel) from INPUT and parse fixed_axes into lat_axis_free flags. | |
| void | setup_cell (const std::string &fn, std::ofstream &log, const double symmetry_prec, const int dfthalf_type, const std::string &pseudo_dir, const int nspin, const std::string &basis_type, const std::string &orbital_dir, const std::string &init_wfc, const double onsite_radius, const bool deepks_setorb, const bool rpa, const bool fixed_atoms, const bool noncolin, const std::string &calculation, const std::string &esolver_type, const int symmetry) |
| void | set_iat2itia () |
| void | set_iat2iwt (const int &npol_in) |
| template<typename Tiait> | |
| Tiait | itiaiw2iwt (const Tiait &it, const Tiait &ia, const Tiait &iw) const |
| Indexing tool for find orbital global index from it,ia,iw. | |
| const int * | get_iat2iwt () const |
| Get iat2iwt. | |
| const int & | get_npol () const |
| Get npol. | |
| void | set_iat2iwt_for_test (const std::vector< int > &iat2iwt_in, const int npol_in) |
| Set iat2iwt (and npol) directly; intended for unit tests that build a minimal UnitCell without running the full indexing setup. | |
| template<typename Tiat, typename Tiait> | |
| bool | iat2iait (const Tiat iat, Tiait *ia, Tiait *it) const |
| Indexing tools for ia and it. | |
| template<typename Tiat, typename Tiait> | |
| bool | ijat2iaitjajt (const Tiat ijat, Tiait *ia, Tiait *it, Tiait *ja, Tiait *jt) const |
| const ModuleBase::Vector3< double > & | get_tau (const int &iat) const |
| Get tau for atom iat. | |
| const ModuleBase::Vector3< double > | cal_dtau (const int &iat1, const int &iat2, const ModuleBase::Vector3< int > &R) const |
| Calculate vector between two atoms with R cell. | |
| 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 | |
| Public Member Functions inherited from LCAO_domain::BaseCell | |
| virtual | ~BaseCell ()=default |
| Kind | kind () const |
| std::int64_t | nat () const |
| double | lat0 () const |
| double | omega () const |
| const ModuleBase::Matrix3 & | latvec () const |
| const ModuleBase::Matrix3 & | GT () const |
| void | require_kind (const Kind &expected, const char *caller) const |
Public Attributes | |
| Atom * | atoms = nullptr |
| Sep_Cell | sep_cell |
Lattice | |
these are newly added functions, the three above functions are deprecated and will be removed in the future | |
| 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 |
| std::vector< int > & | lat_axis_free = lat.lat_axis_free |
| ModuleBase::Matrix3 & | latvec = 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::Matrix3 & | latvec_supercell = lat.latvec_supercell |
| ModuleBase::Matrix3 & | G = lat.G |
| ModuleBase::Matrix3 & | GT = lat.GT |
| ModuleBase::Matrix3 & | GGT = lat.GGT |
| ModuleBase::Matrix3 & | invGGT = lat.invGGT |
Statistics | |
| int | ntype = 0 |
| number of atom species in UnitCell | |
| int | nat = 0 |
| total number of atoms of all species in unitcell | |
| std::vector< int > | iat2it |
| iat==>it, distinguish a atom belong to which type | |
| std::vector< int > | iat2ia |
| iat==>ia | |
| std::vector< int > | iwt2iat |
| iwt ==> iat | |
| std::vector< int > | iwt2iw |
| iwt ==> iw (Peize Lin add 2018-07-02) | |
| ModuleBase::IntArray | itia2iat |
| (it, ia)==>iat, the index in nat (add 2009-3-2 by mohan) | |
| int | namax = 0 |
| the max na among all atom species | |
| int | nwmax = 0 |
| the max nw among all atom species | |
Magnetism | |
| Magnetism | magnet |
| magnetism Yu Liu 2021-07-03 | |
| std::vector< std::vector< double > > | atom_mulliken |
| [nat][nspin] | |
| int | n_mag_at = 0 |
| magnetism Yu Liu 2021-07-03 | |
Symmetry | |
| ModuleSymmetry::Symmetry | symm |
Pseudopotential / Orbital parameters | |
meshx : max number of mesh point in pseudopotential file natomwfc : number of starting wavefunctions lmax : Max L used for localized orbital nmax : Max N used for localized orbital lmax_ppwf : Max L of pseudo wave functions lmaxmax : revert from INPUT | |
| int | meshx = 0 |
| mohan add 2009-09-10 | |
| int | natomwfc = 0 |
| mohan add 2009-09-10 | |
| int | lmax = 0 |
| mohan add 2009-09-10 | |
| int | nmax = 0 |
| mohan add 2009-09-10 | |
| int | nmax_total = 0 |
| mohan add 2009-09-10 | |
| int | lmax_ppwf = 0 |
| mohan add 2009-09-10 | |
| int | lmaxmax = 0 |
| liuyu 2021-07-04 | |
| bool | init_vel = false |
| liuyu 2021-07-15 | |
File lists | |
| std::vector< std::string > | pseudo_fn |
| filenames of orbitals, liuyu add 2022-10-19 | |
| std::vector< std::string > | pseudo_type |
| filenames of orbitals, liuyu add 2022-10-19 | |
| std::vector< std::string > | orbital_fn |
| filenames of orbitals, liuyu add 2022-10-19 | |
| std::string | descriptor_file |
| filenames of descriptor_file, liuyu add 2023-04-06 | |
| std::vector< std::string > | abfs_orbital_files |
| ABFS orbital filenames read from STRU "ABFS_ORBITAL" (used by LCAO EXX). | |
| std::vector< std::string > | jle_orbital_files |
| JLE orbital filenames read from STRU "ABFS_JLES_ORBITAL" (used by LCAO EXX). | |
State flags | |
| |
| bool | set_atom_flag = false |
| added on 2009-3-8 by mohan | |
| bool | ionic_position_updated = false |
| whether the ionic position has been updated | |
| bool | cell_parameter_updated = false |
| bool | last_ion_step = false |
| whether the current runner call is the last ionic step of the run. | |
Nonlocal info | |
| std::unique_ptr< NonlocalInfoBase > | infoNL |
| Pointer to non-local pseudopotential information. | |
Private Member Functions | |
| Kind | get_kind () const override |
| std::int64_t | get_nat () const override |
| double | get_lat0 () const override |
| double | get_omega () const override |
| const ModuleBase::Matrix3 & | get_latvec () const override |
| const ModuleBase::Matrix3 & | get_GT () const override |
Private Attributes | |
| std::vector< int > | iat2iwt |
| iat ==> iwt, the first global index for orbital of this atom | |
| int | npol = 1 |
| ModuleBase::Matrix3 | stress |
| calculate stress on the cell | |
Additional Inherited Members | |
| Public Types inherited from LCAO_domain::BaseCell | |
| enum class | Kind { unitcell , mdcell } |
Provide the basic information about unitcell.
| LCAO_domain::UnitCell::UnitCell | ( | ) |
| LCAO_domain::UnitCell::~UnitCell | ( | ) |
|
delete |
Copy and move are both disabled. The defaulted move constructor shallow-copies the owning pointer 'atoms' and 'set_atom_flag' without resetting the source (double free), and the reference aliases into 'lat' (Coordinate, a1, latvec, ...) make the defaulted move assignment implicitly deleted (-Wdefaulted-function-deleted). Correct move semantics require an owning container for 'atoms' and removing the aliases; until then any accidental move must fail at compile time.
|
delete |
|
inline |
Calculate vector between two atoms with R cell.
| std::map< int, int > LCAO_domain::UnitCell::get_atom_Counts | ( | ) | const |
get atomCounts, which is a map from element type to atom number
|
inlineoverrideprivatevirtual |
Implements LCAO_domain::BaseCell.
|
inline |
Get iat2iwt.
|
inlineoverrideprivatevirtual |
Implements LCAO_domain::BaseCell.
|
inlineoverrideprivatevirtual |
Implements LCAO_domain::BaseCell.
|
inlineoverrideprivatevirtual |
Implements LCAO_domain::BaseCell.
| std::map< int, std::map< int, int > > LCAO_domain::UnitCell::get_lnchi_Counts | ( | ) | const |
get lnchiCounts, which is a map from element type to the l:nchi map
|
inlineoverrideprivatevirtual |
Implements LCAO_domain::BaseCell.
|
inline |
Get npol.
|
inlineoverrideprivatevirtual |
Implements LCAO_domain::BaseCell.
| std::map< int, int > LCAO_domain::UnitCell::get_orbital_Counts | ( | ) | const |
get orbitalCounts, which is a map from element type to orbital number
|
inline |
Get tau for atom iat.
|
inline |
Indexing tools for ia and it.
|
inline |
|
inline |
Indexing tool for find orbital global index from it,ia,iw.
iat2iwt is the atom index iat to the first global index for orbital of this atom the size of iat2iwt is nat, the value should be sum_{i=0}^{iat-1} atoms[it].nw * npol where the npol is the number of polarizations, 1 for non-magnetic(NSPIN=1 or 2), 2 for magnetic(only NSPIN=4) this part only used for Atomic Orbital based calculation
| void LCAO_domain::UnitCell::set_iat2itia | ( | ) |
| void LCAO_domain::UnitCell::set_iat2iwt | ( | const int & | npol_in | ) |
|
inline |
Set iat2iwt (and npol) directly; intended for unit tests that build a minimal UnitCell without running the full indexing setup.
| void LCAO_domain::UnitCell::setup_cell | ( | const std::string & | fn, |
| std::ofstream & | log, | ||
| const double | symmetry_prec, | ||
| const int | dfthalf_type, | ||
| const std::string & | pseudo_dir, | ||
| const int | nspin, | ||
| const std::string & | basis_type, | ||
| const std::string & | orbital_dir, | ||
| const std::string & | init_wfc, | ||
| const double | onsite_radius, | ||
| const bool | deepks_setorb, | ||
| const bool | rpa, | ||
| const bool | fixed_atoms, | ||
| const bool | noncolin, | ||
| const std::string & | calculation, | ||
| const std::string & | esolver_type, | ||
| const int | symmetry ) |
| void LCAO_domain::UnitCell::setup_from_input | ( | const std::string & | latname_in, |
| const int & | ntype_in, | ||
| const int & | lmaxmax_in, | ||
| const bool & | init_vel_in, | ||
| const std::string & | fixed_axes_in ) |
Initialize basic cell parameters (latname, ntype, lmaxmax, init_vel) from INPUT and parse fixed_axes into lat_axis_free flags.
| ModuleBase::Vector3<double>& LCAO_domain::UnitCell::a1 = lat.a1 |
| ModuleBase::Vector3<double> & LCAO_domain::UnitCell::a2 = lat.a2 |
| ModuleBase::Vector3<double> & LCAO_domain::UnitCell::a3 = lat.a3 |
| std::vector<std::string> LCAO_domain::UnitCell::abfs_orbital_files |
ABFS orbital filenames read from STRU "ABFS_ORBITAL" (used by LCAO EXX).
| std::vector<std::vector<double> > LCAO_domain::UnitCell::atom_mulliken |
[nat][nspin]
| Atom* LCAO_domain::UnitCell::atoms = nullptr |
| bool LCAO_domain::UnitCell::cell_parameter_updated = false |
whether the cell parameters are updated
| std::string& LCAO_domain::UnitCell::Coordinate = lat.Coordinate |
| std::string LCAO_domain::UnitCell::descriptor_file |
filenames of descriptor_file, liuyu add 2023-04-06
| ModuleBase::Matrix3& LCAO_domain::UnitCell::G = lat.G |
| ModuleBase::Matrix3& LCAO_domain::UnitCell::GGT = lat.GGT |
| ModuleBase::Matrix3& LCAO_domain::UnitCell::GT = lat.GT |
| std::vector<int> LCAO_domain::UnitCell::iat2ia |
iat==>ia
| std::vector<int> LCAO_domain::UnitCell::iat2it |
iat==>it, distinguish a atom belong to which type
|
private |
iat ==> iwt, the first global index for orbital of this atom
| std::unique_ptr<NonlocalInfoBase> LCAO_domain::UnitCell::infoNL |
Pointer to non-local pseudopotential information.
This pointer is set during LCAO initialization and provides access to non-local projector data. It is null for non-LCAO calculations.
| bool LCAO_domain::UnitCell::init_vel = false |
liuyu 2021-07-15
| ModuleBase::Matrix3& LCAO_domain::UnitCell::invGGT = lat.invGGT |
| bool LCAO_domain::UnitCell::ionic_position_updated = false |
whether the ionic position has been updated
| ModuleBase::IntArray LCAO_domain::UnitCell::itia2iat |
(it, ia)==>iat, the index in nat (add 2009-3-2 by mohan)
| std::vector<int> LCAO_domain::UnitCell::iwt2iat |
iwt ==> iat
| std::vector<int> LCAO_domain::UnitCell::iwt2iw |
iwt ==> iw (Peize Lin add 2018-07-02)
| std::vector<std::string> LCAO_domain::UnitCell::jle_orbital_files |
JLE orbital filenames read from STRU "ABFS_JLES_ORBITAL" (used by LCAO EXX).
| bool LCAO_domain::UnitCell::last_ion_step = false |
whether the current runner call is the last ionic step of the run.
Set by the outer ionic driver (source_md) right before calling ESolver::runner, so the output layer can write the final ionic step even when it does not sit on the out_freq_ion cadence or its SCF did not converge. It is not a user input and stays false for single-shot runs.
| Lattice LCAO_domain::UnitCell::lat |
| double& LCAO_domain::UnitCell::lat0 = lat.lat0 |
| double& LCAO_domain::UnitCell::lat0_angstrom = lat.lat0_angstrom |
| std::vector<int>& LCAO_domain::UnitCell::lat_axis_free = lat.lat_axis_free |
| ModuleBase::Vector3<double>& LCAO_domain::UnitCell::latcenter = lat.latcenter |
| std::string& LCAO_domain::UnitCell::latName = lat.latName |
| ModuleBase::Matrix3& LCAO_domain::UnitCell::latvec = lat.latvec |
| ModuleBase::Matrix3& LCAO_domain::UnitCell::latvec_supercell = lat.latvec_supercell |
| int LCAO_domain::UnitCell::lmax = 0 |
mohan add 2009-09-10
| int LCAO_domain::UnitCell::lmax_ppwf = 0 |
mohan add 2009-09-10
| int LCAO_domain::UnitCell::lmaxmax = 0 |
liuyu 2021-07-04
| Magnetism LCAO_domain::UnitCell::magnet |
magnetism Yu Liu 2021-07-03
| int LCAO_domain::UnitCell::meshx = 0 |
mohan add 2009-09-10
| int LCAO_domain::UnitCell::n_mag_at = 0 |
magnetism Yu Liu 2021-07-03
| int LCAO_domain::UnitCell::namax = 0 |
the max na among all atom species
| int LCAO_domain::UnitCell::nat = 0 |
total number of atoms of all species in unitcell
| int LCAO_domain::UnitCell::natomwfc = 0 |
mohan add 2009-09-10
| int LCAO_domain::UnitCell::nmax = 0 |
mohan add 2009-09-10
| int LCAO_domain::UnitCell::nmax_total = 0 |
mohan add 2009-09-10
|
private |
number of spin polarizations, initialized in set_iat2iwt --------------— END of iat2iwt part --------------—
| int LCAO_domain::UnitCell::ntype = 0 |
number of atom species in UnitCell
| int LCAO_domain::UnitCell::nwmax = 0 |
the max nw among all atom species
| double& LCAO_domain::UnitCell::omega = lat.omega |
| std::vector<std::string> LCAO_domain::UnitCell::orbital_fn |
filenames of orbitals, liuyu add 2022-10-19
| std::vector<std::string> LCAO_domain::UnitCell::pseudo_fn |
filenames of orbitals, liuyu add 2022-10-19
| std::vector<std::string> LCAO_domain::UnitCell::pseudo_type |
filenames of orbitals, liuyu add 2022-10-19
| Sep_Cell LCAO_domain::UnitCell::sep_cell |
| bool LCAO_domain::UnitCell::set_atom_flag = false |
added on 2009-3-8 by mohan
|
private |
calculate stress on the cell
| ModuleSymmetry::Symmetry LCAO_domain::UnitCell::symm |
| double& LCAO_domain::UnitCell::tpiba = lat.tpiba |
| double& LCAO_domain::UnitCell::tpiba2 = lat.tpiba2 |