ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
Exx_LRI_Interface< T, Tdata > Class Template Reference

#include <Exx_LRI_interface.h>

Collaboration diagram for Exx_LRI_Interface< T, Tdata >:

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::matrixget_force () const
 
ModuleBase::matrixget_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
 

Member Typedef Documentation

◆ TA

template<typename T , typename Tdata >
using Exx_LRI_Interface< T, Tdata >::TA = int

◆ TAC

template<typename T , typename Tdata >
using Exx_LRI_Interface< T, Tdata >::TAC = std::pair<TA, TC>

◆ TC

template<typename T , typename Tdata >
using Exx_LRI_Interface< T, Tdata >::TC = std::array<int, 3>

Constructor & Destructor Documentation

◆ Exx_LRI_Interface() [1/2]

template<typename T , typename Tdata >
Exx_LRI_Interface< T, Tdata >::Exx_LRI_Interface ( const Exx_Info::Exx_Info_RI info)
inline

Constructor for Exx_LRI_Interface.

◆ Exx_LRI_Interface() [2/2]

template<typename T , typename Tdata >
Exx_LRI_Interface< T, Tdata >::Exx_LRI_Interface ( )
delete

Member Function Documentation

◆ cal_exx_elec()

template<typename T , typename Tdata >
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 
)

: in cal_exx_elec: Exx_LRI::cal_exx_elec()

Here is the call graph for this function:

◆ cal_exx_force()

template<typename T , typename Tdata >
void Exx_LRI_Interface< T, Tdata >::cal_exx_force ( const int &  nat)

: in cal_exx_force: Exx_LRI::cal_exx_force()

Here is the call graph for this function:

◆ cal_exx_ions()

template<typename T , typename Tdata >
void Exx_LRI_Interface< T, Tdata >::cal_exx_ions ( const UnitCell ucell,
const bool  write_cv = false 
)

: in cal_exx_ions: Exx_LRI::cal_exx_ions()

Here is the call graph for this function:

◆ cal_exx_stress()

template<typename T , typename Tdata >
void Exx_LRI_Interface< T, Tdata >::cal_exx_stress ( const double &  omega,
const double &  lat0 
)

: in cal_exx_stress: Exx_LRI::cal_exx_stress()

Here is the call graph for this function:

◆ exx_after_converge()

template<typename T , typename Tdata >
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

Parameters
dmdouble should be Tdata if complex-PBE-DM is supported
Here is the call graph for this function:

◆ exx_before_all_runners()

template<typename T , typename Tdata >
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.

Here is the call graph for this function:

◆ exx_beforescf()

template<typename T , typename Tdata >
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

Here is the call graph for this function:

◆ exx_eachiterinit()

template<typename T , typename Tdata >
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

Parameters
dmdouble should be Tdata if complex-PBE-DM is supported
Here is the call graph for this function:

◆ exx_hamilt2rho()

template<typename T , typename Tdata >
void Exx_LRI_Interface< T, Tdata >::exx_hamilt2rho ( elecstate::ElecState elec,
const Parallel_Orbitals pv,
const int  iter 
)

in hamilt2rho: calculate Hexx and Eexx

Here is the call graph for this function:

◆ exx_iter_finish()

template<typename T , typename Tdata >
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

Here is the call graph for this function:

◆ get_Eexx()

template<typename T , typename Tdata >
double & Exx_LRI_Interface< T, Tdata >::get_Eexx ( ) const
inline

◆ get_force()

template<typename T , typename Tdata >
ModuleBase::matrix & Exx_LRI_Interface< T, Tdata >::get_force ( ) const
inline

◆ get_Hexxs()

template<typename T , typename Tdata >
std::vector< std::map< TA, std::map< TAC, RI::Tensor< Tdata > > > > & Exx_LRI_Interface< T, Tdata >::get_Hexxs ( ) const
inline

◆ get_stress()

template<typename T , typename Tdata >
ModuleBase::matrix & Exx_LRI_Interface< T, Tdata >::get_stress ( ) const
inline

◆ init()

template<typename T , typename Tdata >
void Exx_LRI_Interface< T, Tdata >::init ( const MPI_Comm &  mpi_comm,
const UnitCell ucell,
const K_Vectors kv,
const LCAO_Orbitals orb 
)

in init: Exx_LRI::init()

Here is the call graph for this function:

Member Data Documentation

◆ dm_last_step

template<typename T , typename Tdata >
elecstate::DensityMatrix<T, double>* Exx_LRI_Interface< T, Tdata >::dm_last_step

◆ etot_last_outer_loop

template<typename T , typename Tdata >
double Exx_LRI_Interface< T, Tdata >::etot_last_outer_loop = 0.0

◆ exx_ptr

template<typename T , typename Tdata >
std::shared_ptr<Exx_LRI<Tdata> > Exx_LRI_Interface< T, Tdata >::exx_ptr

◆ exx_spacegroup_symmetry

template<typename T , typename Tdata >
bool Exx_LRI_Interface< T, Tdata >::exx_spacegroup_symmetry = false
private

◆ flag_finish

template<typename T , typename Tdata >
Flag_Finish Exx_LRI_Interface< T, Tdata >::flag_finish
private

◆ mix_DMk_2D

template<typename T , typename Tdata >
Mix_DMk_2D Exx_LRI_Interface< T, Tdata >::mix_DMk_2D
private

◆ symrot_

template<typename T , typename Tdata >
ModuleSymmetry::Symmetry_rotation Exx_LRI_Interface< T, Tdata >::symrot_
private

◆ two_level_step

template<typename T , typename Tdata >
int Exx_LRI_Interface< T, Tdata >::two_level_step = 0

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