ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
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, const ModulePW::PW_Basis &rho_basis, psi::Psi< T > &psi_ks_in, const UnitCell &ucell, const K_Vectors &kv_in, const std::vector< double > &spatial_weights_in, const Grid_Driver &gd, const std::vector< double > &orb_cutoff, const TwoCenterBundle &two_center_bundle_, const std::vector< Parallel_Blkcyclic > &pX_in, const Parallel_Blkcyclic &pc_in, const Parallel_Orbitals &pmat_in, const double *omega, const double *eig_ks, const T *X, const int &nstate, const bool &openshell, const std::string &gauge, const int my_rank, const std::string &out_dir)
void set_vmo (std::complex< double > *vmo_in)
void set_Y (T *Y_in)
void set_full (bool tag)
void cal_spectrum ()
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_omega ()
 calculate transition dipole in velocity gauge using excitation eigenvalues instead of KS differences

Private Types

enum class  DipoleEnergyType { LR_EIG , KS_GAP }

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< T > cal_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< T > cal_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< T > cal_transition_dipole_istate_velocity_k (const int istate, const Velocity_op< std::complex< double > > &vR)
void cal_transition_dipole_istate_velocity_mo (DipoleEnergyType method, const std::vector< double > &eig_ks_diff)
void cal_transition_dipoles_velocity (const double *const eig_ks)
 calculate the transition dipole of all states in velocity gauge
double cal_mean_squared_dipole (ModuleBase::Vector3< T > dipole)
module_dm::DensityMatrix< T, T > cal_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 my_rank
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 * omega
 excitation energies
const double * eig_ks
 KS eigenvalues.
const T * X
T * Y = nullptr
 the deexcitation part of amplitudes
bool is_full = false
const K_Vectors & kv
const std::vector< double > spatial_weights
 Pure spatial weights, with no spin degeneracy; same spin/k ordering as kv.
std::vector< psi::Psi< T > > psi_ks_vec
const std::vector< Parallel_Blkcyclic > & pX
const Parallel_Blkcyclic & pc
const Parallel_Orbitals & pmat
const ModulePW::PW_Basis & rho_basis
const Grid_Driver & gd_
const UnitCell & ucell
const std::vector< double > & orb_cutoff_
const TwoCenterBundle & two_center_bundle_
const std::string gauge
const std::string out_dir
std::complex< double > * vmo_ptr = nullptr
 pointer to velocity matrix elements in MO basis, used in velocity gauge
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)

Member Enumeration Documentation

◆ DipoleEnergyType

template<typename T>
enum class LR::LR_Spectrum::DipoleEnergyType
strongprivate
Enumerator
LR_EIG 
KS_GAP 

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,
const ModulePW::PW_Basis & rho_basis,
psi::Psi< T > & psi_ks_in,
const UnitCell & ucell,
const K_Vectors & kv_in,
const std::vector< double > & spatial_weights_in,
const Grid_Driver & gd,
const std::vector< double > & orb_cutoff,
const TwoCenterBundle & two_center_bundle_,
const std::vector< Parallel_Blkcyclic > & pX_in,
const Parallel_Blkcyclic & pc_in,
const Parallel_Orbitals & pmat_in,
const double * omega,
const double * eig_ks,
const T * X,
const int & nstate,
const bool & openshell,
const std::string & gauge,
const int my_rank,
const std::string & out_dir )
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
Here is the call graph for this function:

◆ cal_mean_squared_dipole() [3/3]

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

◆ cal_spectrum()

template<typename T>
void LR::LR_Spectrum< T >::cal_spectrum ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_transition_density_matrix()

template<typename T>
module_dm::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:
Here is the caller graph for this function:

◆ cal_transition_dipole_istate_length() [1/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() [2/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() [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>$

Here is the caller graph for this function:

◆ 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_mo()

template<typename T>
void LR::LR_Spectrum< T >::cal_transition_dipole_istate_velocity_mo ( DipoleEnergyType method,
const std::vector< double > & eig_ks_diff )
private
Here is the call graph for this function:
Here is the caller 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 is stored for reference

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 call graph for this function:
Here is the caller graph for this function:

◆ cal_transition_dipoles_velocity()

template<typename T>
void LR::LR_Spectrum< T >::cal_transition_dipoles_velocity ( const double *const eig_ks)
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

Here is the caller graph for this function:

◆ 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:

◆ set_full()

template<typename T>
void LR::LR_Spectrum< T >::set_full ( bool tag)
inline
Here is the caller graph for this function:

◆ set_vmo()

template<typename T>
void LR::LR_Spectrum< T >::set_vmo ( std::complex< double > * vmo_in)
inline
Here is the caller graph for this function:

◆ set_Y()

template<typename T>
void LR::LR_Spectrum< T >::set_Y ( T * Y_in)
inline
Here is the caller graph for this function:

◆ test_transition_dipoles_velocity_omega()

template<typename T>
void LR::LR_Spectrum< T >::test_transition_dipoles_velocity_omega ( )

calculate transition dipole in velocity gauge using excitation eigenvalues instead of KS differences

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

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

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

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_ks

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

KS eigenvalues.

◆ gauge

template<typename T>
const std::string LR::LR_Spectrum< T >::gauge
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

◆ is_full

template<typename T>
bool LR::LR_Spectrum< T >::is_full = false
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

◆ my_rank

template<typename T>
const int LR::LR_Spectrum< T >::my_rank
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

◆ omega

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

excitation energies

◆ 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)

◆ out_dir

template<typename T>
const std::string LR::LR_Spectrum< T >::out_dir
private

◆ pc

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

◆ pmat

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

◆ psi_ks_vec

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

◆ pX

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

◆ rho_basis

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

◆ spatial_weights

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

Pure spatial weights, with no spin degeneracy; same spin/k ordering as kv.

◆ 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

◆ vmo_ptr

template<typename T>
std::complex<double>* LR::LR_Spectrum< T >::vmo_ptr = nullptr
private

pointer to velocity matrix elements in MO basis, used in velocity gauge

◆ X

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

◆ Y

template<typename T>
T* LR::LR_Spectrum< T >::Y = nullptr
private

the deexcitation part of amplitudes


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