ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Sto_EleCond< FPTYPE, Device > Class Template Reference

#include <sto_elecond.h>

Inheritance diagram for Sto_EleCond< FPTYPE, Device >:
Collaboration diagram for Sto_EleCond< FPTYPE, Device >:

Public Types

using lowTYPE = double
using lcomplex = std::complex<lowTYPE>
using resmem_lcomplex_op = base_device::memory::resize_memory_op<std::complex<lowTYPE>, Device>
using delmem_lcomplex_op = base_device::memory::delete_memory_op<std::complex<lowTYPE>, Device>
using cpymem_lcomplex_op = base_device::memory::synchronize_memory_op<std::complex<lowTYPE>, Device, Device>
using castmem_lcomplex_op = base_device::memory::cast_memory_op<std::complex<lowTYPE>, std::complex<FPTYPE>, Device, Device>
using cpymem_complex_op = base_device::memory::synchronize_memory_op<std::complex<FPTYPE>, Device, Device>

Public Member Functions

 Sto_EleCond (UnitCell *p_ucell_in, K_Vectors *p_kv_in, elecstate::ElecState *p_elec_in, ModulePW::PW_Basis_K *p_wfcpw_in, psi::Psi< std::complex< FPTYPE >, Device > *p_psi_in, pseudopot_cell_vnl *p_ppcell_in, hamilt::Hamilt< std::complex< FPTYPE >, Device > *p_hamilt_in, StoChe< FPTYPE, Device > &stoche, Stochastic_WF< std::complex< FPTYPE >, Device > *p_stowf_in)
 ~Sto_EleCond ()
void decide_nche (const FPTYPE dt, const FPTYPE cond_thr, const int &fd_nche, FPTYPE try_emin, FPTYPE try_emax)
 Set the N order of Chebyshev expansion for conductivities It will change class member : fd_nche, cond_nche.
void sKG (const int &smear_type, const double &fwhmin, const double &wcut, const double &dw_in, const double &dt_in, const bool &nonlocal, const int &npart_sto)
 calculate Stochastic Kubo-Greenwood

Protected Member Functions

void cal_jmatrix (StoHamiltPW< std::complex< lowTYPE >, Device > *hamilt, const psi::Psi< std::complex< lowTYPE >, Device > &kspsi_all, const psi::Psi< std::complex< lowTYPE >, Device > &vkspsi, const double *en, const double *en_all, std::complex< FPTYPE > *leftfact, std::complex< FPTYPE > *rightfact, psi::Psi< std::complex< lowTYPE >, Device > &leftchi, psi::Psi< std::complex< lowTYPE >, Device > &rightchi, psi::Psi< std::complex< lowTYPE >, Device > &left_hchi, psi::Psi< std::complex< lowTYPE >, Device > &right_hchi, psi::Psi< std::complex< lowTYPE >, Device > &batch_vchi, psi::Psi< std::complex< lowTYPE >, Device > &batch_vhchi, psi::Psi< std::complex< lowTYPE >, Device > &chi_all, psi::Psi< std::complex< lowTYPE >, Device > &hchi_all, void *gatherinfo_ks, void *gatherinfo_sto, const int &bsize_psi, std::complex< lowTYPE > *j1, std::complex< lowTYPE > *j2, std::complex< lowTYPE > *tmpj, hamilt::Velocity< lowTYPE, Device > &velop, const int &ik, const std::complex< lowTYPE > &factor, const int bandinfo[6])
 calculate Jmatrix <leftv|J|rightv>
Protected Member Functions inherited from EleCond< FPTYPE, Device >
void jjresponse_ks (const int ik, const int nt, const double dt, const double decut, ModuleBase::matrix &wg, hamilt::Velocity< FPTYPE, Device > &velop, double *ct11, double *ct12, double *ct22)
 calculate the response function Cmn(t) for currents
void calcondw (const int nt, const double dt, const int &smear_type, const double fwhmin, const double wcut, const double dw_in, double *ct11, double *ct12, double *ct22)
 Calculate the conductivity using the response function.
 EleCond (UnitCell *p_ucell_in, K_Vectors *p_kv_in, elecstate::ElecState *p_elec_in, ModulePW::PW_Basis_K *p_wfcpw_in, psi::Psi< std::complex< FPTYPE >, Device > *p_psi_in, pseudopot_cell_vnl *p_ppcell_in)
 ~EleCond ()
void KG (const int &smear_type, const double &fwhmin, const double &wcut, const double &dw_in, const double &dt_in, const bool &nonlocal, const bool &mgga_vel, ModuleBase::matrix &wg)
 calculate Onsager coefficients Lmn(\omega) and conductivities with Kubo-Greenwood formula

Protected Attributes

int nbands_ks = 0
 number of KS bands
int nbands_sto = 0
 number of stochastic bands
int cond_nche = 0
 number of Chebyshev orders for conductivities
int fd_nche = 0
 number of Chebyshev orders for Fermi-Dirac function
int cond_dtbatch = 0
 number of time steps in a batch
hamilt::Hamilt< std::complex< FPTYPE >, Device > * p_hamilt = nullptr
 pointer to the Hamiltonian
Stochastic_WF< std::complex< FPTYPE >, Device > * p_stowf = nullptr
 pointer to the stochastic wavefunctions
Sto_Func< FPTYPE > stofunc
 functions
StoHamiltPW< std::complex< FPTYPE >, Device > * p_hamilt_sto = nullptr
 pointer to the Hamiltonian for sDFT
StoHamiltPW< std::complex< lowTYPE >, Device > * hamilt_sto_ = nullptr
 pointer to the Hamiltonian for sDFT
lowTYPE low_emin_ = 0
 Emin of the Hamiltonian for sDFT.
lowTYPE low_emax_ = 0
 Emax of the Hamiltonian for sDFT.
Protected Attributes inherited from EleCond< FPTYPE, Device >
pseudopot_cell_vnl * p_ppcell = nullptr
 pointer to the pseudopotential
UnitCell * p_ucell = nullptr
 pointer to the unit cell
ModulePW::PW_Basis_K * p_wfcpw = nullptr
 pointer to the plane wave basis
K_Vectors * p_kv = nullptr
 pointer to the k vectors
elecstate::ElecState * p_elec = nullptr
 pointer to the electronic state
psi::Psi< std::complex< FPTYPE >, Device > * p_psi = nullptr
 pointer to the wavefunction

Additional Inherited Members

Protected Types inherited from EleCond< FPTYPE, Device >
using resmem_complex_op = base_device::memory::resize_memory_op<std::complex<FPTYPE>, Device>
using delmem_complex_op = base_device::memory::delete_memory_op<std::complex<FPTYPE>, Device>
using syncmem_complex_d2h_op

Member Typedef Documentation

◆ castmem_lcomplex_op

template<typename FPTYPE, typename Device>
using Sto_EleCond< FPTYPE, Device >::castmem_lcomplex_op = base_device::memory::cast_memory_op<std::complex<lowTYPE>, std::complex<FPTYPE>, Device, Device>

◆ cpymem_complex_op

template<typename FPTYPE, typename Device>
using Sto_EleCond< FPTYPE, Device >::cpymem_complex_op = base_device::memory::synchronize_memory_op<std::complex<FPTYPE>, Device, Device>

◆ cpymem_lcomplex_op

template<typename FPTYPE, typename Device>
using Sto_EleCond< FPTYPE, Device >::cpymem_lcomplex_op = base_device::memory::synchronize_memory_op<std::complex<lowTYPE>, Device, Device>

◆ delmem_lcomplex_op

template<typename FPTYPE, typename Device>
using Sto_EleCond< FPTYPE, Device >::delmem_lcomplex_op = base_device::memory::delete_memory_op<std::complex<lowTYPE>, Device>

◆ lcomplex

template<typename FPTYPE, typename Device>
using Sto_EleCond< FPTYPE, Device >::lcomplex = std::complex<lowTYPE>

◆ lowTYPE

template<typename FPTYPE, typename Device>
using Sto_EleCond< FPTYPE, Device >::lowTYPE = double

◆ resmem_lcomplex_op

template<typename FPTYPE, typename Device>
using Sto_EleCond< FPTYPE, Device >::resmem_lcomplex_op = base_device::memory::resize_memory_op<std::complex<lowTYPE>, Device>

Constructor & Destructor Documentation

◆ Sto_EleCond()

template<typename FPTYPE, typename Device>
Sto_EleCond< FPTYPE, Device >::Sto_EleCond ( UnitCell * p_ucell_in,
K_Vectors * p_kv_in,
elecstate::ElecState * p_elec_in,
ModulePW::PW_Basis_K * p_wfcpw_in,
psi::Psi< std::complex< FPTYPE >, Device > * p_psi_in,
pseudopot_cell_vnl * p_ppcell_in,
hamilt::Hamilt< std::complex< FPTYPE >, Device > * p_hamilt_in,
StoChe< FPTYPE, Device > & stoche,
Stochastic_WF< std::complex< FPTYPE >, Device > * p_stowf_in )
Here is the call graph for this function:

◆ ~Sto_EleCond()

template<typename FPTYPE, typename Device>
Sto_EleCond< FPTYPE, Device >::~Sto_EleCond ( )
inline

Member Function Documentation

◆ cal_jmatrix()

template<typename FPTYPE, typename Device>
void Sto_EleCond< FPTYPE, Device >::cal_jmatrix ( StoHamiltPW< std::complex< lowTYPE >, Device > * hamilt,
const psi::Psi< std::complex< lowTYPE >, Device > & kspsi_all,
const psi::Psi< std::complex< lowTYPE >, Device > & vkspsi,
const double * en,
const double * en_all,
std::complex< FPTYPE > * leftfact,
std::complex< FPTYPE > * rightfact,
psi::Psi< std::complex< lowTYPE >, Device > & leftchi,
psi::Psi< std::complex< lowTYPE >, Device > & rightchi,
psi::Psi< std::complex< lowTYPE >, Device > & left_hchi,
psi::Psi< std::complex< lowTYPE >, Device > & right_hchi,
psi::Psi< std::complex< lowTYPE >, Device > & batch_vchi,
psi::Psi< std::complex< lowTYPE >, Device > & batch_vhchi,
psi::Psi< std::complex< lowTYPE >, Device > & chi_all,
psi::Psi< std::complex< lowTYPE >, Device > & hchi_all,
void * gatherinfo_ks,
void * gatherinfo_sto,
const int & bsize_psi,
std::complex< lowTYPE > * j1,
std::complex< lowTYPE > * j2,
std::complex< lowTYPE > * tmpj,
hamilt::Velocity< lowTYPE, Device > & velop,
const int & ik,
const std::complex< lowTYPE > & factor,
const int bandinfo[6] )
protected

calculate Jmatrix <leftv|J|rightv>

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

◆ decide_nche()

template<typename FPTYPE, typename Device>
void Sto_EleCond< FPTYPE, Device >::decide_nche ( const FPTYPE dt,
const FPTYPE cond_thr,
const int & fd_nche,
FPTYPE try_emin,
FPTYPE try_emax )

Set the N order of Chebyshev expansion for conductivities It will change class member : fd_nche, cond_nche.

Parameters
dtt step
nbatchnumber of t batch
cond_thrthreshold of errors for conductivities
fd_ncheN order of Chebyshev for Fermi-Dirac function
try_emintrial Emin
try_emaxtrial Emax
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sKG()

template<typename FPTYPE, typename Device>
void Sto_EleCond< FPTYPE, Device >::sKG ( const int & smear_type,
const double & fwhmin,
const double & wcut,
const double & dw_in,
const double & dt_in,
const bool & nonlocal,
const int & npart_sto )

calculate Stochastic Kubo-Greenwood

Parameters
fwhminFWHM
smear_type1: Gaussian, 2: Lorentzian
wcutcutoff omega
dw_inomega step
dt_int step
nonlocalwhether to include the nonlocal potential corrections for velocity operator
nbatcht step batch
npart_stonumber stochastic wavefunctions parts to evalution simultaneously
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ cond_dtbatch

template<typename FPTYPE, typename Device>
int Sto_EleCond< FPTYPE, Device >::cond_dtbatch = 0
protected

number of time steps in a batch

◆ cond_nche

template<typename FPTYPE, typename Device>
int Sto_EleCond< FPTYPE, Device >::cond_nche = 0
protected

number of Chebyshev orders for conductivities

◆ fd_nche

template<typename FPTYPE, typename Device>
int Sto_EleCond< FPTYPE, Device >::fd_nche = 0
protected

number of Chebyshev orders for Fermi-Dirac function

◆ hamilt_sto_

template<typename FPTYPE, typename Device>
StoHamiltPW<std::complex<lowTYPE>, Device>* Sto_EleCond< FPTYPE, Device >::hamilt_sto_ = nullptr
protected

pointer to the Hamiltonian for sDFT

◆ low_emax_

template<typename FPTYPE, typename Device>
lowTYPE Sto_EleCond< FPTYPE, Device >::low_emax_ = 0
protected

Emax of the Hamiltonian for sDFT.

◆ low_emin_

template<typename FPTYPE, typename Device>
lowTYPE Sto_EleCond< FPTYPE, Device >::low_emin_ = 0
protected

Emin of the Hamiltonian for sDFT.

◆ nbands_ks

template<typename FPTYPE, typename Device>
int Sto_EleCond< FPTYPE, Device >::nbands_ks = 0
protected

number of KS bands

◆ nbands_sto

template<typename FPTYPE, typename Device>
int Sto_EleCond< FPTYPE, Device >::nbands_sto = 0
protected

number of stochastic bands

◆ p_hamilt

template<typename FPTYPE, typename Device>
hamilt::Hamilt<std::complex<FPTYPE>, Device>* Sto_EleCond< FPTYPE, Device >::p_hamilt = nullptr
protected

pointer to the Hamiltonian

◆ p_hamilt_sto

template<typename FPTYPE, typename Device>
StoHamiltPW<std::complex<FPTYPE>, Device>* Sto_EleCond< FPTYPE, Device >::p_hamilt_sto = nullptr
protected

pointer to the Hamiltonian for sDFT

◆ p_stowf

template<typename FPTYPE, typename Device>
Stochastic_WF<std::complex<FPTYPE>, Device>* Sto_EleCond< FPTYPE, Device >::p_stowf = nullptr
protected

pointer to the stochastic wavefunctions

◆ stofunc

template<typename FPTYPE, typename Device>
Sto_Func<FPTYPE> Sto_EleCond< FPTYPE, Device >::stofunc
protected

functions


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