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

#include <esolver_ks_lcao_tddft.h>

Inheritance diagram for ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >:
Collaboration diagram for ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >:

Public Member Functions

 ESolver_KS_LCAO_TDDFT ()
 
 ~ESolver_KS_LCAO_TDDFT ()
 
void before_all_runners (UnitCell &ucell, const Input_para &inp) override
 Initialize of the first-principels energy solver.
 
- Public Member Functions inherited from ModuleESolver::ESolver_KS_LCAO< std::complex< double >, TR >
 ESolver_KS_LCAO ()
 
 ~ESolver_KS_LCAO ()
 
double cal_energy () override
 calculate total energy of a given system
 
void cal_force (UnitCell &ucell, ModuleBase::matrix &force) override
 calcualte forces for the atoms in the given cell
 
void cal_stress (UnitCell &ucell, ModuleBase::matrix &stress) override
 
void after_all_runners (UnitCell &ucell) override
 perform post processing calculations
 
- Public Member Functions inherited from ModuleESolver::ESolver_KS< T, Device >
 ESolver_KS ()
 Constructor.
 
virtual ~ESolver_KS ()
 Deconstructor.
 
- 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 ()
 

Protected Member Functions

virtual void runner (UnitCell &cell, const int istep) override
 run energy solver
 
virtual void hamilt2rho_single (UnitCell &ucell, const int istep, const int iter, const double ethr) override
 
virtual void update_pot (UnitCell &ucell, const int istep, const int iter, const bool conv_esolver) override
 <Temporary> It should be replaced by a function in Hamilt Class
 
virtual void iter_finish (UnitCell &ucell, const int istep, int &iter, bool &conv_esolver) override
 Something to do after hamilt2rho function in each iter loop.
 
virtual void after_scf (UnitCell &ucell, const int istep, const bool conv_esolver) override
 Something to do after SCF iterations when SCF is converged or comes to the max iter step.
 
void print_step ()
 
- Protected Member Functions inherited from ModuleESolver::ESolver_KS_LCAO< std::complex< double >, TR >
virtual void before_scf (UnitCell &ucell, const int istep) override
 Something to do before SCF iterations.
 
virtual void iter_init (UnitCell &ucell, const int istep, const int iter) override
 Something to do before hamilt2rho function in each iter loop.
 
virtual void others (UnitCell &ucell, const int istep) override
 
- Protected Member Functions inherited from ModuleESolver::ESolver_KS< T, Device >
void hamilt2rho (UnitCell &ucell, const int istep, const int iter, const double ethr)
 

Protected Attributes

psi::Psi< std::complex< double > > * psi_laststep = nullptr
 wave functions of last time step
 
std::complex< double > ** Hk_laststep = nullptr
 Hamiltonian of last time step.
 
std::complex< double > ** Sk_laststep = nullptr
 Overlap matrix of last time step.
 
const int td_htype = 1
 
bool use_tensor = false
 Control heterogeneous computing of the TDDFT solver.
 
bool use_lapack = false
 
int totstep = -1
 Total steps for evolving the wave function.
 
Velocity_op< TR > * velocity_mat = nullptr
 Velocity matrix for calculating current.
 
TD_infotd_p = nullptr
 
bool restart_done = false
 doubt
 
- Protected Attributes inherited from ModuleESolver::ESolver_KS_LCAO< std::complex< double >, TR >
Record_adj RA
 Store information about Adjacent Atoms.
 
Grid_Driver gd
 Store information about Adjacent Atoms.
 
Parallel_Orbitals pv
 NAO orbitals: 2d block-cyclic distribution info.
 
Gint_k GK
 Grid integration: used for k-point-dependent algorithm.
 
Gint_Gamma GG
 Grid integration: used for gamma only algorithms.
 
Grid_Technique GridT
 Grid integration: used to store some basic information.
 
std::unique_ptr< ModuleGint::GintInfogint_info_
 GintInfo: used to store some basic infomation about module_gint.
 
TwoCenterBundle two_center_bundle_
 NAO orbitals: two-center integrations.
 
rdmft::RDMFT< std::complex< double >, TR > rdmft_solver
 For RDMFT calculations, added by jghan, 2024-03-16.
 
LCAO_Orbitals orb_
 NAO: store related information.
 
ModuleBase::matrix scs
 
bool have_force
 
LCAO_Deepks< std::complex< double > > ld
 
- Protected Attributes inherited from ModuleESolver::ESolver_KS< T, Device >
hamilt::Hamilt< T, Device > * p_hamilt = nullptr
 Hamiltonian.
 
ModulePW::PW_Basis_Kpw_wfc = nullptr
 PW for wave functions, only used in KSDFT, not in OFDFT.
 
Charge_Mixingp_chgmix = nullptr
 Charge mixing method.
 
pseudopot_cell_vnl ppcell
 nonlocal pseudopotentials
 
psi::Psi< T > * psi = nullptr
 Electronic wavefunctions.
 
std::string basisname
 
double esolver_KS_ne = 0.0
 esolver_ks_lcao.cpp
 
double diag_ethr
 number of electrons
 
double scf_thr
 the threshold for diagonalization
 
double scf_ene_thr
 scf density threshold
 
double drho
 scf energy threshold
 
double hsolver_error
 the difference between rho_in (before HSolver) and rho_out (After HSolver)
 
int maxniter
 the error of HSolver
 
int niter
 maximum iter steps for scf
 
bool oscillate_esolver = false
 iter steps actually used in scf
 
- 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
 

Private Member Functions

void weight_dm_rho (const UnitCell &ucell)
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ ESolver_KS_LCAO_TDDFT()

template<typename TR , typename Device >
ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::ESolver_KS_LCAO_TDDFT ( )

◆ ~ESolver_KS_LCAO_TDDFT()

template<typename TR , typename Device >
ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::~ESolver_KS_LCAO_TDDFT ( )

Member Function Documentation

◆ after_scf()

template<typename TR , typename Device >
void ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::after_scf ( UnitCell ucell,
const int  istep,
const bool  conv_esolver 
)
overrideprotectedvirtual

Something to do after SCF iterations when SCF is converged or comes to the max iter step.

1) call after_scf() of ESolver_KS

2) output of lcao every few ionic steps

3) Clean up RA, which is used to serach for adjacent atoms

Reimplemented from ModuleESolver::ESolver_KS_LCAO< std::complex< double >, TR >.

Here is the call graph for this function:

◆ before_all_runners()

template<typename TR , typename Device >
void ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::before_all_runners ( UnitCell ucell,
const Input_para inp 
)
overridevirtual

Initialize of the first-principels energy solver.

Reimplemented from ModuleESolver::ESolver_KS_LCAO< std::complex< double >, TR >.

Here is the call graph for this function:

◆ hamilt2rho_single()

template<typename TR , typename Device >
void ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::hamilt2rho_single ( UnitCell ucell,
const int  istep,
const int  iter,
const double  ethr 
)
overrideprotectedvirtual

the 5th function of ESolver_KS: hamilt2rho_single mohan add 2024-05-11

Reimplemented from ModuleESolver::ESolver_KS_LCAO< std::complex< double >, TR >.

Here is the call graph for this function:

◆ iter_finish()

template<typename TR , typename Device >
void ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::iter_finish ( UnitCell ucell,
const int  istep,
int &  iter,
bool &  conv_esolver 
)
overrideprotectedvirtual

Something to do after hamilt2rho function in each iter loop.

Reimplemented from ModuleESolver::ESolver_KS_LCAO< std::complex< double >, TR >.

◆ print_step()

template<typename TR , typename Device >
void ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::print_step ( )
protected

◆ runner()

template<typename TR , typename Device >
void ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::runner ( UnitCell cell,
const int  istep 
)
overrideprotectedvirtual

run energy solver

Reimplemented from ModuleESolver::ESolver_KS< T, Device >.

Here is the call graph for this function:

◆ update_pot()

template<typename TR , typename Device >
void ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::update_pot ( UnitCell ucell,
const int  istep,
const int  iter,
const bool  conv_esolver 
)
overrideprotectedvirtual

<Temporary> It should be replaced by a function in Hamilt Class

Reimplemented from ModuleESolver::ESolver_KS_LCAO< std::complex< double >, TR >.

Here is the call graph for this function:

◆ weight_dm_rho()

template<typename TR , typename Device >
void ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::weight_dm_rho ( const UnitCell ucell)
private
Here is the call graph for this function:

Member Data Documentation

◆ Hk_laststep

template<typename TR , typename Device = base_device::DEVICE_CPU>
std::complex<double>** ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::Hk_laststep = nullptr
protected

Hamiltonian of last time step.

◆ psi_laststep

template<typename TR , typename Device = base_device::DEVICE_CPU>
psi::Psi<std::complex<double> >* ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::psi_laststep = nullptr
protected

wave functions of last time step

◆ restart_done

template<typename TR , typename Device = base_device::DEVICE_CPU>
bool ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::restart_done = false
protected

doubt

◆ Sk_laststep

template<typename TR , typename Device = base_device::DEVICE_CPU>
std::complex<double>** ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::Sk_laststep = nullptr
protected

Overlap matrix of last time step.

◆ td_htype

template<typename TR , typename Device = base_device::DEVICE_CPU>
const int ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::td_htype = 1
protected

◆ td_p

template<typename TR , typename Device = base_device::DEVICE_CPU>
TD_info* ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::td_p = nullptr
protected

◆ totstep

template<typename TR , typename Device = base_device::DEVICE_CPU>
int ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::totstep = -1
protected

Total steps for evolving the wave function.

◆ use_lapack

template<typename TR , typename Device = base_device::DEVICE_CPU>
bool ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::use_lapack = false
protected

◆ use_tensor

template<typename TR , typename Device = base_device::DEVICE_CPU>
bool ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::use_tensor = false
protected

Control heterogeneous computing of the TDDFT solver.

◆ velocity_mat

template<typename TR , typename Device = base_device::DEVICE_CPU>
Velocity_op<TR>* ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >::velocity_mat = nullptr
protected

Velocity matrix for calculating current.


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