ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <Exx_LRI_interface.h>
Classes | |
struct | Flag_Finish |
Public Types | |
using | TA = int |
using | TC = std::array< int, 3 > |
using | TAC = std::pair< TA, TC > |
Public Member Functions | |
Exx_LRI_Interface (const Exx_Info::Exx_Info_RI &info) | |
Constructor for Exx_LRI_Interface. | |
Exx_LRI_Interface ()=delete | |
std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > & | get_Hexxs () const |
double & | get_Eexx () const |
ModuleBase::matrix & | get_force () const |
ModuleBase::matrix & | get_stress () const |
void | init (const MPI_Comm &mpi_comm, const UnitCell &ucell, const K_Vectors &kv, const LCAO_Orbitals &orb) |
in init: Exx_LRI::init() | |
void | cal_exx_ions (const UnitCell &ucell, const bool write_cv=false) |
: in cal_exx_ions: Exx_LRI::cal_exx_ions() | |
void | cal_exx_elec (const std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > &Ds, const UnitCell &ucell, const Parallel_Orbitals &pv, const ModuleSymmetry::Symmetry_rotation *p_symrot=nullptr) |
: in cal_exx_elec: Exx_LRI::cal_exx_elec() | |
void | cal_exx_force (const int &nat) |
: in cal_exx_force: Exx_LRI::cal_exx_force() | |
void | cal_exx_stress (const double &omega, const double &lat0) |
: in cal_exx_stress: Exx_LRI::cal_exx_stress() | |
void | exx_before_all_runners (const K_Vectors &kv, const UnitCell &ucell, const Parallel_2D &pv) |
in before_all_runners: set symmetry according to irreducible k-points since k-points are not reduced again after the variation of the cell and exx-symmetry must be consistent with k-points. In the future, we will reduce k-points again during cell-relax, then this setting can be moved to exx_beforescf . | |
void | exx_beforescf (const int istep, const K_Vectors &kv, const Charge_Mixing &chgmix, const UnitCell &ucell, const LCAO_Orbitals &orb) |
in beforescf: set xc type, opt_orb, do DM mixing | |
void | exx_eachiterinit (const int istep, const UnitCell &ucell, const elecstate::DensityMatrix< T, double > &dm, const K_Vectors &kv, const int &iter) |
in eachiterinit: do DM mixing and calculate Hexx when entering 2nd SCF | |
void | exx_hamilt2rho (elecstate::ElecState &elec, const Parallel_Orbitals &pv, const int iter) |
in hamilt2rho: calculate Hexx and Eexx | |
void | exx_iter_finish (const K_Vectors &kv, const UnitCell &ucell, hamilt::Hamilt< T > &hamilt, elecstate::ElecState &elec, Charge_Mixing &chgmix, const double &scf_ene_thr, int &iter, const int istep, bool &conv_esolver) |
in iter_finish: write Hexx, do something according to whether SCF is converged | |
bool | exx_after_converge (const UnitCell &ucell, hamilt::Hamilt< T > &hamilt, const elecstate::DensityMatrix< T, double > &dm, const K_Vectors &kv, const int &nspin, int &iter, const int &istep, const double &etot, const double &scf_ene_thr) |
: in do_after_converge: add exx operators; do DM mixing if seperate loop | |
Public Attributes | |
int | two_level_step = 0 |
double | etot_last_outer_loop = 0.0 |
elecstate::DensityMatrix< T, double > * | dm_last_step |
std::shared_ptr< Exx_LRI< Tdata > > | exx_ptr |
Private Attributes | |
Mix_DMk_2D | mix_DMk_2D |
bool | exx_spacegroup_symmetry = false |
ModuleSymmetry::Symmetry_rotation | symrot_ |
Flag_Finish | flag_finish |
using Exx_LRI_Interface< T, Tdata >::TA = int |
using Exx_LRI_Interface< T, Tdata >::TC = std::array<int, 3> |
|
inline |
Constructor for Exx_LRI_Interface.
|
delete |
void Exx_LRI_Interface< T, Tdata >::cal_exx_elec | ( | const std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > & | Ds, |
const UnitCell & | ucell, | ||
const Parallel_Orbitals & | pv, | ||
const ModuleSymmetry::Symmetry_rotation * | p_symrot = nullptr |
||
) |
void Exx_LRI_Interface< T, Tdata >::cal_exx_force | ( | const int & | nat | ) |
void Exx_LRI_Interface< T, Tdata >::cal_exx_ions | ( | const UnitCell & | ucell, |
const bool | write_cv = false |
||
) |
void Exx_LRI_Interface< T, Tdata >::cal_exx_stress | ( | const double & | omega, |
const double & | lat0 | ||
) |
bool Exx_LRI_Interface< T, Tdata >::exx_after_converge | ( | const UnitCell & | ucell, |
hamilt::Hamilt< T > & | hamilt, | ||
const elecstate::DensityMatrix< T, double > & | dm, | ||
const K_Vectors & | kv, | ||
const int & | nspin, | ||
int & | iter, | ||
const int & | istep, | ||
const double & | etot, | ||
const double & | scf_ene_thr | ||
) |
: in do_after_converge: add exx operators; do DM mixing if seperate loop
dm | double should be Tdata if complex-PBE-DM is supported |
void Exx_LRI_Interface< T, Tdata >::exx_before_all_runners | ( | const K_Vectors & | kv, |
const UnitCell & | ucell, | ||
const Parallel_2D & | pv | ||
) |
in before_all_runners: set symmetry according to irreducible k-points since k-points are not reduced again after the variation of the cell and exx-symmetry must be consistent with k-points. In the future, we will reduce k-points again during cell-relax, then this setting can be moved to exx_beforescf
.
void Exx_LRI_Interface< T, Tdata >::exx_beforescf | ( | const int | istep, |
const K_Vectors & | kv, | ||
const Charge_Mixing & | chgmix, | ||
const UnitCell & | ucell, | ||
const LCAO_Orbitals & | orb | ||
) |
in beforescf: set xc type, opt_orb, do DM mixing
void Exx_LRI_Interface< T, Tdata >::exx_eachiterinit | ( | const int | istep, |
const UnitCell & | ucell, | ||
const elecstate::DensityMatrix< T, double > & | dm, | ||
const K_Vectors & | kv, | ||
const int & | iter | ||
) |
in eachiterinit: do DM mixing and calculate Hexx when entering 2nd SCF
dm | double should be Tdata if complex-PBE-DM is supported |
void Exx_LRI_Interface< T, Tdata >::exx_hamilt2rho | ( | elecstate::ElecState & | elec, |
const Parallel_Orbitals & | pv, | ||
const int | iter | ||
) |
in hamilt2rho: calculate Hexx and Eexx
void Exx_LRI_Interface< T, Tdata >::exx_iter_finish | ( | const K_Vectors & | kv, |
const UnitCell & | ucell, | ||
hamilt::Hamilt< T > & | hamilt, | ||
elecstate::ElecState & | elec, | ||
Charge_Mixing & | chgmix, | ||
const double & | scf_ene_thr, | ||
int & | iter, | ||
const int | istep, | ||
bool & | conv_esolver | ||
) |
in iter_finish: write Hexx, do something according to whether SCF is converged
|
inline |
|
inline |
|
inline |
|
inline |
void Exx_LRI_Interface< T, Tdata >::init | ( | const MPI_Comm & | mpi_comm, |
const UnitCell & | ucell, | ||
const K_Vectors & | kv, | ||
const LCAO_Orbitals & | orb | ||
) |
elecstate::DensityMatrix<T, double>* Exx_LRI_Interface< T, Tdata >::dm_last_step |
double Exx_LRI_Interface< T, Tdata >::etot_last_outer_loop = 0.0 |
std::shared_ptr<Exx_LRI<Tdata> > Exx_LRI_Interface< T, Tdata >::exx_ptr |
|
private |
|
private |
|
private |
|
private |
int Exx_LRI_Interface< T, Tdata >::two_level_step = 0 |