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

#include <lr_spectrum.h>

Collaboration diagram for LR::LR_Spectrum< T >:

Public Member Functions

 LR_Spectrum (const int &nspin_global, const int &naos, const std::vector< int > &nocc, const std::vector< int > &nvirt, typename TGint< T >::type *gint, const ModulePW::PW_Basis &rho_basis, psi::Psi< T > &psi_ks_in, const UnitCell &ucell, const K_Vectors &kv_in, const Grid_Driver &gd, const std::vector< double > &orb_cutoff, const TwoCenterBundle &two_center_bundle_, const std::vector< Parallel_2D > &pX_in, const Parallel_2D &pc_in, const Parallel_Orbitals &pmat_in, const double *eig, const T *X, const int &nstate, const bool &openshell, const std::string &gauge="length")
 
void optical_absorption_method1 (const std::vector< double > &freq, const double eta)
 calculate the optical absorption spectrum with $Im[1/[(w+i\eta)^2-\Omega_S^2]]$
 
void optical_absorption_method2 (const std::vector< double > &freq, const double eta)
 calculate the optical absorption spectrum with lorentzian delta function
 
void transition_analysis (const std::string &spintype)
 print out the transition dipole moment and the main contributions to the transition amplitude
 
void write_transition_dipole (const std::string &filename)
 write transition dipole
 
void test_transition_dipoles_velocity_ks (const double *const ks_eig)
 calculate transition dipole in velocity gauge using ks eigenvalues instead of excitation energies
 

Private Member Functions

void oscillator_strength ()
 $$2/3\Omega\sum_{ia\sigma} |\braket{\psi_{i}|\mathbf{r}|\psi_{a}} |^2\int \rho_{\alpha\beta}(\mathbf{r}) \mathbf{r} d\mathbf{r}$$
 
ModuleBase::Vector3< Tcal_transition_dipole_istate_length (const int istate)
 calculate the transition dipole of state S in length gauge: $\sum_{iak}X^S_{iak}<ik|r|ak>$
 
void cal_transition_dipoles_length ()
 calculate the transition dipole of all states in length gauge
 
ModuleBase::Vector3< Tcal_transition_dipole_istate_velocity_R (const int istate, const Velocity_op< std::complex< double > > &vR)
 calculate the transition dipole of state S in velocity gauge: $i(\sum_{iak}X^S_{iak}<ik|v|ak>)/\Omega_S$
 
ModuleBase::Vector3< Tcal_transition_dipole_istate_velocity_k (const int istate, const Velocity_op< std::complex< double > > &vR)
 
void cal_transition_dipoles_velocity ()
 calculate the transition dipole of all states in velocity gauge
 
double cal_mean_squared_dipole (ModuleBase::Vector3< T > dipole)
 
elecstate::DensityMatrix< T, Tcal_transition_density_matrix (const int istate, const T *X_in=nullptr, const bool need_R=true)
 calculate the transition density matrix
 
void cal_gint_rho (double **rho, const int &nrxx)
 
std::map< std::string, int > get_pair_info (const int i)
 given the index in X, return its ispin, ik, iocc, ivirt
 
ModuleBase::Vector3< double > cal_transition_dipole_istate_length (const int istate)
 
ModuleBase::Vector3< std::complex< double > > cal_transition_dipole_istate_length (const int istate)
 
double cal_mean_squared_dipole (ModuleBase::Vector3< double > dipole)
 
double cal_mean_squared_dipole (ModuleBase::Vector3< std::complex< double > > dipole)
 

Private Attributes

const int nspin_x = 1
 1 for singlet/triplet, 2 for updown(openshell)
 
const int naos = 1
 
const std::vector< int > & nocc
 
const std::vector< int > & nvirt
 
const int nk = 1
 
const int nstate = 1
 
const int ldim = 1
 local leading dimension of X, or the data size of each state
 
const int gdim = 1
 global leading dimension of X
 
const double ana_thr = 0.3
 {abs(X) > thr} will appear in the transition analysis log
 
const double * eig
 
const TX
 
const K_Vectorskv
 
std::vector< psi::Psi< T > > psi_ks
 
const std::vector< Parallel_2D > & pX
 
const Parallel_2Dpc
 
const Parallel_Orbitalspmat
 
TGint< T >::type * gint = nullptr
 
const ModulePW::PW_Basisrho_basis
 
const Grid_Drivergd_
 
const UnitCellucell
 
const std::vector< double > & orb_cutoff_
 
const TwoCenterBundletwo_center_bundle_
 
std::vector< ModuleBase::Vector3< T > > transition_dipole_
 $\braket{ \psi_{i} | \mathbf{r} | \psi_{a} }$
 
std::vector< double > mean_squared_transition_dipole_
 
std::vector< double > oscillator_strength_
 $|dipole|^2/3$, atomic unit (Hartree)
 

Constructor & Destructor Documentation

◆ LR_Spectrum()

template<typename T >
LR::LR_Spectrum< T >::LR_Spectrum ( const int &  nspin_global,
const int &  naos,
const std::vector< int > &  nocc,
const std::vector< int > &  nvirt,
typename TGint< T >::type *  gint,
const ModulePW::PW_Basis rho_basis,
psi::Psi< T > &  psi_ks_in,
const UnitCell ucell,
const K_Vectors kv_in,
const Grid_Driver gd,
const std::vector< double > &  orb_cutoff,
const TwoCenterBundle two_center_bundle_,
const std::vector< Parallel_2D > &  pX_in,
const Parallel_2D pc_in,
const Parallel_Orbitals pmat_in,
const double *  eig,
const T X,
const int &  nstate,
const bool &  openshell,
const std::string &  gauge = "length" 
)
inline
Here is the call graph for this function:

Member Function Documentation

◆ cal_gint_rho()

template<typename T >
void LR::LR_Spectrum< T >::cal_gint_rho ( double **  rho,
const int &  nrxx 
)
private

◆ cal_mean_squared_dipole() [1/3]

double LR::LR_Spectrum< double >::cal_mean_squared_dipole ( ModuleBase::Vector3< double >  dipole)
private
Here is the call graph for this function:

◆ cal_mean_squared_dipole() [2/3]

double LR::LR_Spectrum< std::complex< double > >::cal_mean_squared_dipole ( ModuleBase::Vector3< std::complex< double > >  dipole)
private

◆ cal_mean_squared_dipole() [3/3]

template<typename T >
double LR::LR_Spectrum< T >::cal_mean_squared_dipole ( ModuleBase::Vector3< T dipole)
private

◆ cal_transition_density_matrix()

template<typename T >
elecstate::DensityMatrix< T, T > LR::LR_Spectrum< T >::cal_transition_density_matrix ( const int  istate,
const T X_in = nullptr,
const bool  need_R = true 
)
private

calculate the transition density matrix

Here is the call graph for this function:

◆ cal_transition_dipole_istate_length() [1/3]

ModuleBase::Vector3< double > LR::LR_Spectrum< double >::cal_transition_dipole_istate_length ( const int  istate)
private
Here is the call graph for this function:

◆ cal_transition_dipole_istate_length() [2/3]

ModuleBase::Vector3< std::complex< double > > LR::LR_Spectrum< std::complex< double > >::cal_transition_dipole_istate_length ( const int  istate)
private
Here is the call graph for this function:

◆ cal_transition_dipole_istate_length() [3/3]

template<typename T >
ModuleBase::Vector3< T > LR::LR_Spectrum< T >::cal_transition_dipole_istate_length ( const int  istate)
private

calculate the transition dipole of state S in length gauge: $\sum_{iak}X^S_{iak}<ik|r|ak>$

◆ cal_transition_dipole_istate_velocity_k()

template<typename T >
ModuleBase::Vector3< T > LR::LR_Spectrum< T >::cal_transition_dipole_istate_velocity_k ( const int  istate,
const Velocity_op< std::complex< double > > &  vR 
)
private
Here is the call graph for this function:

◆ cal_transition_dipole_istate_velocity_R()

template<typename T >
ModuleBase::Vector3< T > LR::LR_Spectrum< T >::cal_transition_dipole_istate_velocity_R ( const int  istate,
const Velocity_op< std::complex< double > > &  vR 
)
private

calculate the transition dipole of state S in velocity gauge: $i(\sum_{iak}X^S_{iak}<ik|v|ak>)/\Omega_S$

this algorithm has bug in multi-k cases, just for test

Here is the call graph for this function:

◆ cal_transition_dipoles_length()

template<typename T >
void LR::LR_Spectrum< T >::cal_transition_dipoles_length ( )
private

calculate the transition dipole of all states in length gauge

Here is the caller graph for this function:

◆ cal_transition_dipoles_velocity()

template<typename T >
void LR::LR_Spectrum< T >::cal_transition_dipoles_velocity ( )
private

calculate the transition dipole of all states in velocity gauge

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

◆ get_pair_info()

template<typename T >
std::map< std::string, int > LR::LR_Spectrum< T >::get_pair_info ( const int  i)
private

given the index in X, return its ispin, ik, iocc, ivirt

◆ optical_absorption_method1()

template<typename T >
void LR::LR_Spectrum< T >::optical_absorption_method1 ( const std::vector< double > &  freq,
const double  eta 
)

calculate the optical absorption spectrum with $Im[1/[(w+i\eta)^2-\Omega_S^2]]$

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

◆ optical_absorption_method2()

template<typename T >
void LR::LR_Spectrum< T >::optical_absorption_method2 ( const std::vector< double > &  freq,
const double  eta 
)

calculate the optical absorption spectrum with lorentzian delta function

Here is the call graph for this function:

◆ oscillator_strength()

template<typename T >
void LR::LR_Spectrum< T >::oscillator_strength ( )
private

$$2/3\Omega\sum_{ia\sigma} |\braket{\psi_{i}|\mathbf{r}|\psi_{a}} |^2\int \rho_{\alpha\beta}(\mathbf{r}) \mathbf{r} d\mathbf{r}$$

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

◆ test_transition_dipoles_velocity_ks()

template<typename T >
void LR::LR_Spectrum< T >::test_transition_dipoles_velocity_ks ( const double *const  ks_eig)

calculate transition dipole in velocity gauge using ks eigenvalues instead of excitation energies

Here is the call graph for this function:

◆ transition_analysis()

template<typename T >
void LR::LR_Spectrum< T >::transition_analysis ( const std::string &  spintype)

print out the transition dipole moment and the main contributions to the transition amplitude

find the main contributions (> 0.5)

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

◆ write_transition_dipole()

template<typename T >
void LR::LR_Spectrum< T >::write_transition_dipole ( const std::string &  filename)

write transition dipole

Member Data Documentation

◆ ana_thr

template<typename T >
const double LR::LR_Spectrum< T >::ana_thr = 0.3
private

{abs(X) > thr} will appear in the transition analysis log

◆ eig

template<typename T >
const double* LR::LR_Spectrum< T >::eig
private

◆ gd_

template<typename T >
const Grid_Driver& LR::LR_Spectrum< T >::gd_
private

◆ gdim

template<typename T >
const int LR::LR_Spectrum< T >::gdim = 1
private

global leading dimension of X

◆ gint

template<typename T >
TGint<T>::type* LR::LR_Spectrum< T >::gint = nullptr
private

◆ kv

template<typename T >
const K_Vectors& LR::LR_Spectrum< T >::kv
private

◆ ldim

template<typename T >
const int LR::LR_Spectrum< T >::ldim = 1
private

local leading dimension of X, or the data size of each state

◆ mean_squared_transition_dipole_

template<typename T >
std::vector<double> LR::LR_Spectrum< T >::mean_squared_transition_dipole_
private

◆ naos

template<typename T >
const int LR::LR_Spectrum< T >::naos = 1
private

◆ nk

template<typename T >
const int LR::LR_Spectrum< T >::nk = 1
private

◆ nocc

template<typename T >
const std::vector<int>& LR::LR_Spectrum< T >::nocc
private

◆ nspin_x

template<typename T >
const int LR::LR_Spectrum< T >::nspin_x = 1
private

1 for singlet/triplet, 2 for updown(openshell)

◆ nstate

template<typename T >
const int LR::LR_Spectrum< T >::nstate = 1
private

◆ nvirt

template<typename T >
const std::vector<int>& LR::LR_Spectrum< T >::nvirt
private

◆ orb_cutoff_

template<typename T >
const std::vector<double>& LR::LR_Spectrum< T >::orb_cutoff_
private

◆ oscillator_strength_

template<typename T >
std::vector<double> LR::LR_Spectrum< T >::oscillator_strength_
private

$|dipole|^2/3$, atomic unit (Hartree)

$2/3\Omega |\sum_{ia\sigma} \braket{\psi_{i}|\mathbf{r}|\psi_{a}} |^2$, atomic unit (Hartree)

◆ pc

template<typename T >
const Parallel_2D& LR::LR_Spectrum< T >::pc
private

◆ pmat

template<typename T >
const Parallel_Orbitals& LR::LR_Spectrum< T >::pmat
private

◆ psi_ks

template<typename T >
std::vector<psi::Psi<T> > LR::LR_Spectrum< T >::psi_ks
private

◆ pX

template<typename T >
const std::vector<Parallel_2D>& LR::LR_Spectrum< T >::pX
private

◆ rho_basis

template<typename T >
const ModulePW::PW_Basis& LR::LR_Spectrum< T >::rho_basis
private

◆ transition_dipole_

template<typename T >
std::vector<ModuleBase::Vector3<T> > LR::LR_Spectrum< T >::transition_dipole_
private

$\braket{ \psi_{i} | \mathbf{r} | \psi_{a} }$

◆ two_center_bundle_

template<typename T >
const TwoCenterBundle& LR::LR_Spectrum< T >::two_center_bundle_
private

◆ ucell

template<typename T >
const UnitCell& LR::LR_Spectrum< T >::ucell
private

◆ X

template<typename T >
const T* LR::LR_Spectrum< T >::X
private

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