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

Open-shell (spin-unrestricted) counterpart of Z_vector_L. More...

#include <hamilt_zeq_l.h>

Inheritance diagram for LR::Z_vector_UL< T >:
Collaboration diagram for LR::Z_vector_UL< T >:

Public Member Functions

 Z_vector_UL (const std::string &xc_kernel, const int &nspin, const int &naos, const std::vector< int > &nocc, const std::vector< int > &nvirt, const UnitCell &ucell, const std::vector< double > &orb_cutoff, const Grid_Driver &gd, const psi::Psi< T > &psi_ks, const ModuleBase::matrix &eig_ks, std::weak_ptr< PotLRBase > pot_hxc_gs, const K_Vectors &kv, const std::vector< Parallel_Blkcyclic > &pX, const Parallel_Blkcyclic &pc, const Parallel_Orbitals &pmat, const std::string &dft_functional, const int nk, const int local_dimension, const int global_dimension)
Public Member Functions inherited from LR::ZeqULR< T >
 ZeqULR (const std::vector< int > &nocc_in, const std::vector< int > &nvirt_in, const std::vector< Parallel_Blkcyclic > &pX_in, const int nk_in, const int local_dimension, const int global_dimension)
virtual ~ZeqULR ()
void hPsi (const T *const psi_in, T *const hpsi, const int ld_psi, const int nband)
void hPsi (const T *psi_in, T *hpsi, const int ld_psi, const int nband, const std::vector< std::vector< ct::Tensor > > &window_density)
std::vector< T > matrix ()
 The full (replicated) matrix, column by column. Only used by the LAPACK solver.

Protected Member Functions

void set_dm (const int is, const T *const X, const std::vector< ct::Tensor > *density_add) override
 rebuild the density matrices the operators read, from the is block of X
Protected Member Functions inherited from LR::ZeqULR< T >
void apply (const T *const psi_in, T *const hpsi, const int ld_psi, const int nband, const std::vector< std::vector< ct::Tensor > > *window_density)
virtual void band_extra (const T *const X, T *const out) const
 optional per-band contribution that does not fit the 2x2 block structure. NOTE matrix() deliberately does NOT call this: it exists for the right-hand side, which is not a linear operator, while matrix() is only ever used for the LHS.

Private Types

using ATYPE = typename OperatorLRHxc<T>::MO_TO_AO_TYPE

Private Attributes

const int naos_ = 1
const Parallel_Blkcyclic & pc_
const Parallel_Orbitals & pmat_
const psi::Psi< T > & psi_ks_
std::vector< psi::Psi< T > > psi_ks_spin_
std::unique_ptr< module_dm::DensityMatrix< T, T > > DM_trans
std::vector< ct::Tensor > dm_buf_
 the tensors DM_trans points into; kept alive for the whole act chain

Additional Inherited Members

Public Attributes inherited from LR::ZeqULR< T >
const std::vector< int > & nocc
const std::vector< int > & nvirt
const std::vector< Parallel_Blkcyclic > & pX
const int nk = 1
const int ldim = 1
const int gdim = 1
Protected Attributes inherited from LR::ZeqULR< T >
std::vector< hamilt::Operator< T > * > ops

Detailed Description

template<typename T>
class LR::Z_vector_UL< T >

Open-shell (spin-unrestricted) counterpart of Z_vector_L.

Left-hand side of the Z-vector equation: the orbital Hessian built with the GROUND-STATE kernel, $H_{ai\sigma}[D^Z]+Z_{ai\sigma}(\epsilon_{a\sigma}-\epsilon_{i\sigma})$.

Factor 2.0 on the Hxc blocks (the closed-shell Z_vector_L uses 4.0): there pot_hxc_gs is S2_gs = S2_singlet/2, so recovering $H^S=2K^S=4\cdot$pot needs 4. Here pot_hxc_gs is S2_updown, which IS one $K_{\sigma\sigma'}$ component with no halving, so only the $H=2K$ factor remains. The spin sum $\sum_{\sigma'}$ that the singlet combination had baked in is now done by the block loop in ZeqULR::hPsi.

Member Typedef Documentation

◆ ATYPE

template<typename T>
using LR::Z_vector_UL< T >::ATYPE = typename OperatorLRHxc<T>::MO_TO_AO_TYPE
private

Constructor & Destructor Documentation

◆ Z_vector_UL()

template<typename T>
LR::Z_vector_UL< T >::Z_vector_UL ( const std::string & xc_kernel,
const int & nspin,
const int & naos,
const std::vector< int > & nocc,
const std::vector< int > & nvirt,
const UnitCell & ucell,
const std::vector< double > & orb_cutoff,
const Grid_Driver & gd,
const psi::Psi< T > & psi_ks,
const ModuleBase::matrix & eig_ks,
std::weak_ptr< PotLRBase > pot_hxc_gs,
const K_Vectors & kv,
const std::vector< Parallel_Blkcyclic > & pX,
const Parallel_Blkcyclic & pc,
const Parallel_Orbitals & pmat,
const std::string & dft_functional,
const int nk,
const int local_dimension,
const int global_dimension )
inline
Here is the call graph for this function:

Member Function Documentation

◆ set_dm()

template<typename T>
void LR::Z_vector_UL< T >::set_dm ( const int is,
const T *const X,
const std::vector< ct::Tensor > * density_add )
inlineoverrideprotectedvirtual

rebuild the density matrices the operators read, from the is block of X

Implements LR::ZeqULR< T >.

Here is the call graph for this function:

Member Data Documentation

◆ dm_buf_

template<typename T>
std::vector<ct::Tensor> LR::Z_vector_UL< T >::dm_buf_
private

the tensors DM_trans points into; kept alive for the whole act chain

◆ DM_trans

template<typename T>
std::unique_ptr<module_dm::DensityMatrix<T, T> > LR::Z_vector_UL< T >::DM_trans
private

◆ naos_

template<typename T>
const int LR::Z_vector_UL< T >::naos_ = 1
private

◆ pc_

template<typename T>
const Parallel_Blkcyclic& LR::Z_vector_UL< T >::pc_
private

◆ pmat_

template<typename T>
const Parallel_Orbitals& LR::Z_vector_UL< T >::pmat_
private

◆ psi_ks_

template<typename T>
const psi::Psi<T>& LR::Z_vector_UL< T >::psi_ks_
private

◆ psi_ks_spin_

template<typename T>
std::vector<psi::Psi<T> > LR::Z_vector_UL< T >::psi_ks_spin_
private

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