ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
LR::OperatorLRHxc< T, Device > Class Template Reference

Hxc part of A operator for LR-TDDFT. More...

#include <operator_lr_hxc.h>

Inheritance diagram for LR::OperatorLRHxc< T, Device >:
Collaboration diagram for LR::OperatorLRHxc< T, Device >:

Public Types

enum class  MO_TO_AO_TYPE { CC_vo , CC_oo , CXC , CXC_o }
 type of molecular orbital to atomic orbital transformation: CC_vo: MO = C_v^* AO C_o; CC_oo: MO = C_o^* AO C_o; CXC: MO = C_v^* AO X C_v- C_o^* X^* AO C_o CXC_o: MO = C_o^* X^* AO C_o More...
using TransitionDensityCache
Public Types inherited from hamilt::Operator< double, base_device::DEVICE_CPU >
typedef std::tuple< const psi::Psi< double, base_device::DEVICE_CPU > *, const psi::Range, double * > hpsi_info
 input type of hPsi: (psi_input, range, hpsi_pointer)

Public Member Functions

 OperatorLRHxc (const int &nspin, const int &naos, const std::vector< int > &nocc, const std::vector< int > &nvirt, const psi::Psi< T, Device > &psi_ks_in, module_dm::DensityMatrix< T, T > &DM_trans_in, std::weak_ptr< PotLRBase > pot_in, const UnitCell &ucell_in, const std::vector< double > &orb_cutoff, const Grid_Driver &gd_in, const K_Vectors &kv_in, const std::vector< Parallel_Blkcyclic > &pX_in, const Parallel_Blkcyclic &pc_in, const Parallel_Orbitals &pmat_in, const std::vector< int > &ispin_ks, const T factor_in, const MO_TO_AO_TYPE dm_pq_in, const hamilt::calculation_type cal_type_in)
 ~OperatorLRHxc ()
void init (const int ik_in) override
virtual void act (const int nbands, const int nbasis, const int npol, const T *psi_in, T *hpsi, const int ngk_ik=0, const bool is_first_node=false) const override
void act_with_shared_density (const T *psi_in, T *hpsi, TransitionDensityCache &density_cache) const
Public Member Functions inherited from hamilt::Operator< double, base_device::DEVICE_CPU >
 Operator ()
virtual ~Operator ()
virtual hpsi_info hPsi (hpsi_info &input) const
 Core hot-path: compute H|psi> by traversing the operator chain.
virtual void add (Operator *next)
virtual int get_ik () const
virtual void act (const int nbands, const int nbasis, const int npol, const double *tmpsi_in, double *tmhpsi, const int ngk_ik=0, const bool is_first_node=false) const
int get_act_type () const
calculation_type get_cal_type () const

Private Member Functions

void grid_calculation (TransitionDensityCache &density_cache) const
void grid_calculation (TransitionDensityCache &density_cache) const
void grid_calculation (TransitionDensityCache &density_cache) const

Private Attributes

const int & nspin
const int & naos
const int nk = 1
const std::vector< int > & nocc
const std::vector< int > & nvirt
const std::vector< int > ispin_ks = { 0 }
 the index of spin of psi_ks used in {AX, DM_trans}
const K_Vectors & kv
const psi::Psi< T, Device > & psi_ks = nullptr
 ground state wavefunction
module_dm::DensityMatrix< T, T > & DM_trans
 transition density matrix
std::unique_ptr< hamilt::HContainer< T > > hR = nullptr
 transition hamiltonian in AO representation
const Parallel_Blkcyclic & pc
 parallel info
const std::vector< Parallel_Blkcyclic > & pX
const Parallel_Orbitals & pmat
std::weak_ptr< PotLRBase > pot
const UnitCell & ucell
std::vector< double > orb_cutoff_
const Grid_Driver & gd
MO_TO_AO_TYPE dm_pq_ = MO_TO_AO_TYPE::CC_vo
const T factor_ = (T)1.0
bool first_print = true
 test

Additional Inherited Members

Public Attributes inherited from hamilt::Operator< double, base_device::DEVICE_CPU >
Operator * next_op
 interface type 3: return a Psi-type HPsi
Protected Types inherited from hamilt::Operator< double, base_device::DEVICE_CPU >
using set_memory_op
Protected Member Functions inherited from hamilt::Operator< double, base_device::DEVICE_CPU >
double * get_hpsi (const hpsi_info &info) const
Protected Attributes inherited from hamilt::Operator< double, base_device::DEVICE_CPU >
int ik
int act_type
 determine which act() interface would be called in hPsi()
bool in_place
enum calculation_type cal_type
Operator * next_sub_op
bool is_first_node
psi::Psi< double, base_device::DEVICE_CPU > * hpsi
base_device::DEVICE_CPU * ctx

Detailed Description

template<typename T = double, typename Device = base_device::DEVICE_CPU>
class LR::OperatorLRHxc< T, Device >

Hxc part of A operator for LR-TDDFT.

Member Typedef Documentation

◆ TransitionDensityCache

template<typename T = double, typename Device = base_device::DEVICE_CPU>
using LR::OperatorLRHxc< T, Device >::TransitionDensityCache
Initial value:
std::map<const module_dm::DensityMatrix<T, T>*,
std::vector<std::vector<double>>>

Member Enumeration Documentation

◆ MO_TO_AO_TYPE

template<typename T = double, typename Device = base_device::DEVICE_CPU>
enum class LR::OperatorLRHxc::MO_TO_AO_TYPE
strong

type of molecular orbital to atomic orbital transformation: CC_vo: MO = C_v^* AO C_o; CC_oo: MO = C_o^* AO C_o; CXC: MO = C_v^* AO X C_v- C_o^* X^* AO C_o CXC_o: MO = C_o^* X^* AO C_o

Enumerator
CC_vo 
CC_oo 
CXC 
CXC_o 

Constructor & Destructor Documentation

◆ OperatorLRHxc()

template<typename T = double, typename Device = base_device::DEVICE_CPU>
LR::OperatorLRHxc< T, Device >::OperatorLRHxc ( const int & nspin,
const int & naos,
const std::vector< int > & nocc,
const std::vector< int > & nvirt,
const psi::Psi< T, Device > & psi_ks_in,
module_dm::DensityMatrix< T, T > & DM_trans_in,
std::weak_ptr< PotLRBase > pot_in,
const UnitCell & ucell_in,
const std::vector< double > & orb_cutoff,
const Grid_Driver & gd_in,
const K_Vectors & kv_in,
const std::vector< Parallel_Blkcyclic > & pX_in,
const Parallel_Blkcyclic & pc_in,
const Parallel_Orbitals & pmat_in,
const std::vector< int > & ispin_ks,
const T factor_in,
const MO_TO_AO_TYPE dm_pq_in,
const hamilt::calculation_type cal_type_in )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~OperatorLRHxc()

template<typename T = double, typename Device = base_device::DEVICE_CPU>
LR::OperatorLRHxc< T, Device >::~OperatorLRHxc ( )
inline

Member Function Documentation

◆ act()

template<typename T, typename Device>
void LR::OperatorLRHxc< T, Device >::act ( const int nbands,
const int nbasis,
const int npol,
const T * psi_in,
T * hpsi,
const int ngk_ik = 0,
const bool is_first_node = false ) const
overridevirtual
Here is the call graph for this function:

◆ act_with_shared_density()

template<typename T, typename Device>
void LR::OperatorLRHxc< T, Device >::act_with_shared_density ( const T * psi_in,
T * hpsi,
TransitionDensityCache & density_cache ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ grid_calculation() [1/3]

void LR::OperatorLRHxc< std::complex< double >, base_device::DEVICE_CPU >::grid_calculation ( TransitionDensityCache & density_cache) const
private
Here is the call graph for this function:

◆ grid_calculation() [2/3]

void LR::OperatorLRHxc< double, base_device::DEVICE_CPU >::grid_calculation ( TransitionDensityCache & density_cache) const
private
Here is the call graph for this function:

◆ grid_calculation() [3/3]

template<typename T = double, typename Device = base_device::DEVICE_CPU>
void LR::OperatorLRHxc< T, Device >::grid_calculation ( TransitionDensityCache & density_cache) const
private
Here is the caller graph for this function:

◆ init()

template<typename T = double, typename Device = base_device::DEVICE_CPU>
void LR::OperatorLRHxc< T, Device >::init ( const int ik_in)
inlineoverridevirtual

Member Data Documentation

◆ dm_pq_

template<typename T = double, typename Device = base_device::DEVICE_CPU>
MO_TO_AO_TYPE LR::OperatorLRHxc< T, Device >::dm_pq_ = MO_TO_AO_TYPE::CC_vo
private

◆ DM_trans

template<typename T = double, typename Device = base_device::DEVICE_CPU>
module_dm::DensityMatrix<T, T>& LR::OperatorLRHxc< T, Device >::DM_trans
private

transition density matrix

◆ factor_

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const T LR::OperatorLRHxc< T, Device >::factor_ = (T)1.0
private

◆ first_print

template<typename T = double, typename Device = base_device::DEVICE_CPU>
bool LR::OperatorLRHxc< T, Device >::first_print = true
mutableprivate

test

◆ gd

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const Grid_Driver& LR::OperatorLRHxc< T, Device >::gd
private

◆ hR

template<typename T = double, typename Device = base_device::DEVICE_CPU>
std::unique_ptr<hamilt::HContainer<T> > LR::OperatorLRHxc< T, Device >::hR = nullptr
private

transition hamiltonian in AO representation

◆ ispin_ks

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const std::vector<int> LR::OperatorLRHxc< T, Device >::ispin_ks = { 0 }
private

the index of spin of psi_ks used in {AX, DM_trans}

◆ kv

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const K_Vectors& LR::OperatorLRHxc< T, Device >::kv
private

◆ naos

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const int& LR::OperatorLRHxc< T, Device >::naos
private

◆ nk

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const int LR::OperatorLRHxc< T, Device >::nk = 1
private

◆ nocc

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const std::vector<int>& LR::OperatorLRHxc< T, Device >::nocc
private

◆ nspin

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const int& LR::OperatorLRHxc< T, Device >::nspin
private

◆ nvirt

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const std::vector<int>& LR::OperatorLRHxc< T, Device >::nvirt
private

◆ orb_cutoff_

template<typename T = double, typename Device = base_device::DEVICE_CPU>
std::vector<double> LR::OperatorLRHxc< T, Device >::orb_cutoff_
private

◆ pc

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const Parallel_Blkcyclic& LR::OperatorLRHxc< T, Device >::pc
private

parallel info

◆ pmat

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const Parallel_Orbitals& LR::OperatorLRHxc< T, Device >::pmat
private

◆ pot

template<typename T = double, typename Device = base_device::DEVICE_CPU>
std::weak_ptr<PotLRBase> LR::OperatorLRHxc< T, Device >::pot
private

◆ psi_ks

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const psi::Psi<T, Device>& LR::OperatorLRHxc< T, Device >::psi_ks = nullptr
private

ground state wavefunction

◆ pX

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const std::vector<Parallel_Blkcyclic>& LR::OperatorLRHxc< T, Device >::pX
private

◆ ucell

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const UnitCell& LR::OperatorLRHxc< T, Device >::ucell
private

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