ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LR::ESolver_LR< T, TR > Class Template Reference

Excited State Solver: Linear Response TDDFT (Tamm Dancoff Approximation) More...

#include <esolver_lrtd_lcao.h>

Inheritance diagram for LR::ESolver_LR< T, TR >:
Collaboration diagram for LR::ESolver_LR< T, TR >:

Public Member Functions

 ESolver_LR (ModuleESolver::ESolver_KS_LCAO< T, TR > &&ks_sol, const Input_para &inp, UnitCell &ucell)
 a move constructor from ESolver_KS_LCAO
 
 ESolver_LR (const Input_para &inp, UnitCell &ucell)
 a from-scratch constructor
 
 ~ESolver_LR ()
 
virtual void before_all_runners (UnitCell &ucell, const Input_para &inp) override
 input: input, call, basis(LCAO), psi(ground state), elecstate
 
virtual void runner (UnitCell &ucell, int istep) override
 run energy solver
 
virtual void after_all_runners (UnitCell &ucell) override
 perform post processing calculations
 
virtual double cal_energy () override
 calculate total energy of a given system
 
virtual void cal_force (UnitCell &ucell, ModuleBase::matrix &force) override
 calcualte forces for the atoms in the given cell
 
virtual void cal_stress (UnitCell &ucell, ModuleBase::matrix &stress) override
 calcualte stress of given cell
 
- Public Member Functions inherited from ModuleESolver::ESolver_FP
 ESolver_FP ()
 Constructor.
 
virtual ~ESolver_FP ()
 Deconstructor.
 
- Public Member Functions inherited from ModuleESolver::ESolver
 ESolver ()
 
virtual ~ESolver ()
 
virtual void others (UnitCell &ucell, const int istep)
 

Protected Member Functions

void set_gint ()
 
void setup_eigenvectors_X ()
 allocate and set the inital value of X
 
void set_X_initial_guess ()
 
void read_ks_wfc ()
 read in the ground state wave function, band energy and occupation
 
void read_ks_chg (Charge &chg)
 read in the ground state charge density
 
void init_pot (const Charge &chg_gs)
 
void parameter_check () const
 check the legality of the input parameters
 
void set_dimension ()
 set nocc, nvirt, nbasis, npairs and nstates
 
void reset_dim_spin2 ()
 reset nocc, nvirt, npairs after read ground-state wavefunction when nspin=2
 
void set_gint ()
 
void set_gint ()
 
- Protected Member Functions inherited from ModuleESolver::ESolver_FP
virtual void before_scf (UnitCell &ucell, const int istep)
 Something to do before SCF iterations.
 
virtual void after_scf (UnitCell &ucell, const int istep, const bool conv_esolver)
 Something to do after SCF iterations when SCF is converged or comes to the max iter step.
 
virtual void iter_finish (UnitCell &ucell, const int istep, int &iter, bool &conv_esolver)
 Something to do after hamilt2rho function in each iter loop.
 

Protected Attributes

const Input_parainput
 
const UnitCellucell
 
Grid_Driver gd
 
std::vector< double > orb_cutoff_
 
std::vector< std::shared_ptr< PotHxcLR > > pot
 
psi::Psi< T > * psi_ks = nullptr
 ground state wave function
 
ModuleBase::matrix eig_ks
 ground state bands, read from the file, or moved from ESolver_FP::pelec.ekb
 
std::vector< ct::TensorX
 Excited state wavefunction (locc, lvirt are local size of nocc and nvirt in each process) size of X: [neq][{nstate, nloc_per_band}], namely:
 
int nloc_per_band = 1
 
std::vector< int > nocc
 number of occupied orbitals for each spin used in the calculation
 
int nocc_in = 1
 nocc read from input (adjusted by nelec): max(spin-up, spindown)
 
int nocc_max = 1
 nelec/2
 
std::vector< int > nvirt
 number of virtual orbitals for each spin used in the calculation
 
int nvirt_in = 1
 nvirt read from input (adjusted by nelec): min(spin-up, spindown)
 
int nbands = 2
 
int nbasis = 2
 
std::vector< int > npairs
 n_occ*nvirt, the basis size of electron-hole pair representation
 
int nstates = 1
 how many 2-particle states to be solved
 
int nspin = 1
 
int nk = 1
 
int nupdown = 0
 
bool openshell = false
 
std::string xc_kernel
 
Grid_Technique gt_
 
Gint_Gamma gint_g_
 
Gint_k gint_k_
 
TGint< T >::type * gint_ = nullptr
 
std::unique_ptr< ModuleGint::GintInfogint_info_ = nullptr
 
Parallel_2D paraC_
 variables for parallel distribution of KS orbitals
 
std::vector< Parallel_2DparaX_
 variables for parallel distribution of excited states
 
Parallel_Orbitals paraMat_
 variables for parallel distribution of matrix in AO representation
 
TwoCenterBundle two_center_bundle_
 
- Protected Attributes inherited from ModuleESolver::ESolver_FP
elecstate::ElecStatepelec = nullptr
 Electronic states.
 
K_Vectors kv
 K points in Brillouin zone.
 
Charge chr
 Electorn charge density.
 
ModulePW::PW_Basispw_rho
 
ModulePW::PW_Basispw_rhod
 
ModulePW::PW_Basis_Bigpw_big
 dense grid for USPP
 
Parallel_Grid Pgrid
 parallel for rho grid
 
Structure_Factor sf
 Structure factors that used with plane-wave basis set.
 
pseudopot_cell_vl locpp
 local pseudopotentials
 
Charge_Extra CE
 charge extrapolation method
 
surchem solvent
 solvent model
 
int pw_rho_flag = false
 flag for pw_rho, 0: not initialized, 1: initialized
 
double iter_time
 the start time of scf iteration
 

Additional Inherited Members

- Public Attributes inherited from ModuleESolver::ESolver
bool conv_esolver = true
 
std::string classname
 

Detailed Description

template<typename T, typename TR = double>
class LR::ESolver_LR< T, TR >

Excited State Solver: Linear Response TDDFT (Tamm Dancoff Approximation)

Constructor & Destructor Documentation

◆ ESolver_LR() [1/2]

template<typename T , typename TR >
LR::ESolver_LR< T, TR >::ESolver_LR ( ModuleESolver::ESolver_KS_LCAO< T, TR > &&  ks_sol,
const Input_para inp,
UnitCell ucell 
)

a move constructor from ESolver_KS_LCAO

Here is the call graph for this function:

◆ ESolver_LR() [2/2]

template<typename T , typename TR >
LR::ESolver_LR< T, TR >::ESolver_LR ( const Input_para inp,
UnitCell ucell 
)

a from-scratch constructor

read orbitals and build the interpolation table

Here is the call graph for this function:

◆ ~ESolver_LR()

template<typename T , typename TR = double>
LR::ESolver_LR< T, TR >::~ESolver_LR ( )
inline

Member Function Documentation

◆ after_all_runners()

template<typename T , typename TR >
void LR::ESolver_LR< T, TR >::after_all_runners ( UnitCell ucell)
overridevirtual

perform post processing calculations

Reimplemented from ModuleESolver::ESolver_FP.

Here is the call graph for this function:

◆ before_all_runners()

template<typename T , typename TR = double>
virtual void LR::ESolver_LR< T, TR >::before_all_runners ( UnitCell ucell,
const Input_para inp 
)
inlineoverridevirtual

input: input, call, basis(LCAO), psi(ground state), elecstate

Reimplemented from ModuleESolver::ESolver_FP.

◆ cal_energy()

template<typename T , typename TR = double>
virtual double LR::ESolver_LR< T, TR >::cal_energy ( )
inlineoverridevirtual

calculate total energy of a given system

Implements ModuleESolver::ESolver.

◆ cal_force()

template<typename T , typename TR = double>
virtual void LR::ESolver_LR< T, TR >::cal_force ( UnitCell ucell,
ModuleBase::matrix force 
)
inlineoverridevirtual

calcualte forces for the atoms in the given cell

Implements ModuleESolver::ESolver.

◆ cal_stress()

template<typename T , typename TR = double>
virtual void LR::ESolver_LR< T, TR >::cal_stress ( UnitCell ucell,
ModuleBase::matrix stress 
)
inlineoverridevirtual

calcualte stress of given cell

Implements ModuleESolver::ESolver.

◆ init_pot()

template<typename T , typename TR >
void LR::ESolver_LR< T, TR >::init_pot ( const Charge chg_gs)
protected
Here is the caller graph for this function:

◆ parameter_check()

template<typename T , typename TR >
void LR::ESolver_LR< T, TR >::parameter_check ( ) const
protected

check the legality of the input parameters

Here is the caller graph for this function:

◆ read_ks_chg()

template<typename T , typename TR >
void LR::ESolver_LR< T, TR >::read_ks_chg ( Charge chg)
protected

read in the ground state charge density

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_ks_wfc()

template<typename T , typename TR >
void LR::ESolver_LR< T, TR >::read_ks_wfc ( )
protected

read in the ground state wave function, band energy and occupation

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_dim_spin2()

template<typename T , typename TR >
void LR::ESolver_LR< T, TR >::reset_dim_spin2 ( )
protected

reset nocc, nvirt, npairs after read ground-state wavefunction when nspin=2

Here is the caller graph for this function:

◆ runner()

template<typename T , typename TR >
void LR::ESolver_LR< T, TR >::runner ( UnitCell cell,
int  istep 
)
overridevirtual

run energy solver

Implements ModuleESolver::ESolver.

Here is the call graph for this function:

◆ set_dimension()

template<typename T , typename TR >
void LR::ESolver_LR< T, TR >::set_dimension ( )
protected

set nocc, nvirt, nbasis, npairs and nstates

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_gint() [1/3]

void LR::ESolver_LR< double >::set_gint ( )
protected

◆ set_gint() [2/3]

void LR::ESolver_LR< std::complex< double > >::set_gint ( )
protected

◆ set_gint() [3/3]

template<typename T , typename TR = double>
void LR::ESolver_LR< T, TR >::set_gint ( )
protected
Here is the caller graph for this function:

◆ set_X_initial_guess()

template<typename T , typename TR >
void LR::ESolver_LR< T, TR >::set_X_initial_guess ( )
protected

global index map between (i,c) and ix

Here is the call graph for this function:

◆ setup_eigenvectors_X()

template<typename T , typename TR >
void LR::ESolver_LR< T, TR >::setup_eigenvectors_X ( )
protected

allocate and set the inital value of X

Here is the call graph for this function:

Member Data Documentation

◆ eig_ks

template<typename T , typename TR = double>
ModuleBase::matrix LR::ESolver_LR< T, TR >::eig_ks
protected

ground state bands, read from the file, or moved from ESolver_FP::pelec.ekb

energy of ground state

◆ gd

template<typename T , typename TR = double>
Grid_Driver LR::ESolver_LR< T, TR >::gd
protected

◆ gint_

template<typename T , typename TR = double>
TGint<T>::type* LR::ESolver_LR< T, TR >::gint_ = nullptr
protected

◆ gint_g_

template<typename T , typename TR = double>
Gint_Gamma LR::ESolver_LR< T, TR >::gint_g_
protected

◆ gint_info_

template<typename T , typename TR = double>
std::unique_ptr<ModuleGint::GintInfo> LR::ESolver_LR< T, TR >::gint_info_ = nullptr
protected

◆ gint_k_

template<typename T , typename TR = double>
Gint_k LR::ESolver_LR< T, TR >::gint_k_
protected

◆ gt_

template<typename T , typename TR = double>
Grid_Technique LR::ESolver_LR< T, TR >::gt_
protected

◆ input

template<typename T , typename TR = double>
const Input_para& LR::ESolver_LR< T, TR >::input
protected

◆ nbands

template<typename T , typename TR = double>
int LR::ESolver_LR< T, TR >::nbands = 2
protected

◆ nbasis

template<typename T , typename TR = double>
int LR::ESolver_LR< T, TR >::nbasis = 2
protected

◆ nk

template<typename T , typename TR = double>
int LR::ESolver_LR< T, TR >::nk = 1
protected

◆ nloc_per_band

template<typename T , typename TR = double>
int LR::ESolver_LR< T, TR >::nloc_per_band = 1
protected

◆ nocc

template<typename T , typename TR = double>
std::vector<int> LR::ESolver_LR< T, TR >::nocc
protected

number of occupied orbitals for each spin used in the calculation

◆ nocc_in

template<typename T , typename TR = double>
int LR::ESolver_LR< T, TR >::nocc_in = 1
protected

nocc read from input (adjusted by nelec): max(spin-up, spindown)

◆ nocc_max

template<typename T , typename TR = double>
int LR::ESolver_LR< T, TR >::nocc_max = 1
protected

nelec/2

◆ npairs

template<typename T , typename TR = double>
std::vector<int> LR::ESolver_LR< T, TR >::npairs
protected

n_occ*nvirt, the basis size of electron-hole pair representation

◆ nspin

template<typename T , typename TR = double>
int LR::ESolver_LR< T, TR >::nspin = 1
protected

◆ nstates

template<typename T , typename TR = double>
int LR::ESolver_LR< T, TR >::nstates = 1
protected

how many 2-particle states to be solved

◆ nupdown

template<typename T , typename TR = double>
int LR::ESolver_LR< T, TR >::nupdown = 0
protected

◆ nvirt

template<typename T , typename TR = double>
std::vector<int> LR::ESolver_LR< T, TR >::nvirt
protected

number of virtual orbitals for each spin used in the calculation

◆ nvirt_in

template<typename T , typename TR = double>
int LR::ESolver_LR< T, TR >::nvirt_in = 1
protected

nvirt read from input (adjusted by nelec): min(spin-up, spindown)

◆ openshell

template<typename T , typename TR = double>
bool LR::ESolver_LR< T, TR >::openshell = false
protected

◆ orb_cutoff_

template<typename T , typename TR = double>
std::vector<double> LR::ESolver_LR< T, TR >::orb_cutoff_
protected

◆ paraC_

template<typename T , typename TR = double>
Parallel_2D LR::ESolver_LR< T, TR >::paraC_
protected

variables for parallel distribution of KS orbitals

◆ paraMat_

template<typename T , typename TR = double>
Parallel_Orbitals LR::ESolver_LR< T, TR >::paraMat_
protected

variables for parallel distribution of matrix in AO representation

◆ paraX_

template<typename T , typename TR = double>
std::vector<Parallel_2D> LR::ESolver_LR< T, TR >::paraX_
protected

variables for parallel distribution of excited states

◆ pot

template<typename T , typename TR = double>
std::vector<std::shared_ptr<PotHxcLR> > LR::ESolver_LR< T, TR >::pot
protected

◆ psi_ks

template<typename T , typename TR = double>
psi::Psi<T>* LR::ESolver_LR< T, TR >::psi_ks = nullptr
protected

ground state wave function

◆ two_center_bundle_

template<typename T , typename TR = double>
TwoCenterBundle LR::ESolver_LR< T, TR >::two_center_bundle_
protected

◆ ucell

template<typename T , typename TR = double>
const UnitCell& LR::ESolver_LR< T, TR >::ucell
protected

◆ X

template<typename T , typename TR = double>
std::vector<ct::Tensor> LR::ESolver_LR< T, TR >::X
protected

Excited state wavefunction (locc, lvirt are local size of nocc and nvirt in each process) size of X: [neq][{nstate, nloc_per_band}], namely:

  • [nspin][{nstates, nk* (locc* lvirt}] for close- shell,
  • [1][{nstates, nk * (locc[0] * lvirt[0]) + nk * (locc[1] * lvirt[1])}] for open-shell

◆ xc_kernel

template<typename T , typename TR = double>
std::string LR::ESolver_LR< T, TR >::xc_kernel
protected

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