ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
hamilt::HamiltLCAO< TK, TR > Class Template Reference

#include <hamilt_lcao.h>

Inheritance diagram for hamilt::HamiltLCAO< TK, TR >:
Collaboration diagram for hamilt::HamiltLCAO< TK, TR >:

Public Types

using TAC = std::pair< int, std::array< int, 3 > >
 

Public Member Functions

 HamiltLCAO (Gint_Gamma *GG_in, Gint_k *GK_in, const UnitCell &ucell, const Grid_Driver &grid_d, const Parallel_Orbitals *paraV, elecstate::Potential *pot_in, const K_Vectors &kv_in, const TwoCenterBundle &two_center_bundle, const LCAO_Orbitals &orb, elecstate::DensityMatrix< TK, double > *DM_in, LCAO_Deepks< TK > *ld_in)
 Constructor of Hamiltonian for LCAO base HR and SR will be allocated with Operators.
 
 HamiltLCAO (const UnitCell &ucell, const Grid_Driver &grid_d, const Parallel_Orbitals *paraV, const K_Vectors &kv_in, const TwoCenterIntegrator &intor_overlap_orb, const std::vector< double > &orb_cutoff)
 Constructor of vacuum Operators, only HR and SR will be initialed as empty HContainer.
 
 ~HamiltLCAO ()
 
Operator< TK > *& getOperator ()
 get pointer of Operator<TK> ops
 
TK * getHk () const
 get H(k) pointer
 
TK * getSk () const
 get S(k) pointer
 
int get_size_hsk () const
 
HContainer< TR > *& getHR ()
 get HR pointer of *this->hR, which is a HContainerand contains H(R)
 
HContainer< TR > *& getSR ()
 get SR pointer of *this->sR, which is a HContainerand contains S(R)
 
HContainer< TR > *& get_V_delta_R ()
 get V_delta_R pointer of *this->V_delta_R, which is a HContainerand contains V_delta(R)
 
void refresh () override
 refresh the status of HR
 
virtual void updateHk (const int ik) override
 for target K point, update consequence of hPsi() and matrix()
 
void updateSk (const int ik, const int hk_type=0)
 special for LCAO, update SK only
 
void matrix (MatrixBlock< TK > &hk_in, MatrixBlock< TK > &sk_in) override
 
- Public Member Functions inherited from hamilt::Hamilt< TK >
virtual ~Hamilt ()
 
virtual void hPsi (const TK *psi_in, TK *hpsi, const size_t size) const
 core function: for solving eigenvalues of Hamiltonian with iterative method
 
virtual void sPsi (const TK *psi_in, TK *spsi, const int nrow, const int npw, const int nbands) const
 
virtual void matrix (MatrixBlock< std::complex< double > > &hk_in, MatrixBlock< std::complex< double > > &sk_in)
 core function: return H(k) and S(k) matrixs for direct solving eigenvalues.
 
virtual void matrix (MatrixBlock< double > &hk_in, MatrixBlock< double > &sk_in)
 
virtual std::vector< TK > matrix ()
 

Private Attributes

const K_Vectorskv = nullptr
 
HContainer< TR > * hR = nullptr
 Real space Hamiltonian H(R), where R is the Bravis lattice vector.
 
HContainer< TR > * sR = nullptr
 Real space overlap matrix S(R), where R is the Bravis lattice vector.
 
HContainer< TR > * V_delta_R = nullptr
 
HS_Matrix_K< TK > * hsk = nullptr
 Hamiltonian and overlap matrices for a specific k point.
 
std::vector< TR > hRS2
 
int refresh_times = 1
 
int current_spin = 0
 
const int istep = 0
 

Additional Inherited Members

- Public Attributes inherited from hamilt::Hamilt< TK >
std::string classname
 
int non_first_scf
 
Operator< TK, base_device::DEVICE_CPU > * ops
 first node operator, add operations from each operators
 
- Protected Types inherited from hamilt::Hamilt< TK >
using syncmem_op = base_device::memory::synchronize_memory_op< TK, base_device::DEVICE_CPU, base_device::DEVICE_CPU >
 
- Protected Attributes inherited from hamilt::Hamilt< TK >
base_device::DEVICE_CPU * ctx
 

Member Typedef Documentation

◆ TAC

template<typename TK , typename TR >
using hamilt::HamiltLCAO< TK, TR >::TAC = std::pair<int, std::array<int, 3> >

Constructor & Destructor Documentation

◆ HamiltLCAO() [1/2]

template<typename TK , typename TR >
hamilt::HamiltLCAO< TK, TR >::HamiltLCAO ( Gint_Gamma GG_in,
Gint_k GK_in,
const UnitCell ucell,
const Grid_Driver grid_d,
const Parallel_Orbitals paraV,
elecstate::Potential pot_in,
const K_Vectors kv_in,
const TwoCenterBundle two_center_bundle,
const LCAO_Orbitals orb,
elecstate::DensityMatrix< TK, double > *  DM_in,
LCAO_Deepks< TK > *  ld_in 
)

Constructor of Hamiltonian for LCAO base HR and SR will be allocated with Operators.

Here is the call graph for this function:

◆ HamiltLCAO() [2/2]

template<typename TK , typename TR >
hamilt::HamiltLCAO< TK, TR >::HamiltLCAO ( const UnitCell ucell,
const Grid_Driver grid_d,
const Parallel_Orbitals paraV,
const K_Vectors kv_in,
const TwoCenterIntegrator intor_overlap_orb,
const std::vector< double > &  orb_cutoff 
)

Constructor of vacuum Operators, only HR and SR will be initialed as empty HContainer.

◆ ~HamiltLCAO()

template<typename TK , typename TR >
hamilt::HamiltLCAO< TK, TR >::~HamiltLCAO ( )
inline

Member Function Documentation

◆ get_size_hsk()

template<typename TK , typename TR >
int hamilt::HamiltLCAO< TK, TR >::get_size_hsk ( ) const
inline

◆ get_V_delta_R()

template<typename TK , typename TR >
HContainer< TR > *& hamilt::HamiltLCAO< TK, TR >::get_V_delta_R ( )
inline

get V_delta_R pointer of *this->V_delta_R, which is a HContainerand contains V_delta(R)

Here is the caller graph for this function:

◆ getHk()

template<typename TK , typename TR >
TK * hamilt::HamiltLCAO< TK, TR >::getHk ( ) const
inline

get H(k) pointer

◆ getHR()

template<typename TK , typename TR >
HContainer< TR > *& hamilt::HamiltLCAO< TK, TR >::getHR ( )
inline

get HR pointer of *this->hR, which is a HContainerand contains H(R)

Here is the caller graph for this function:

◆ getOperator()

template<typename TK , typename TR >
Operator< TK > *& hamilt::HamiltLCAO< TK, TR >::getOperator ( )

get pointer of Operator<TK> ops

◆ getSk()

template<typename TK , typename TR >
TK * hamilt::HamiltLCAO< TK, TR >::getSk ( ) const
inline

get S(k) pointer

◆ getSR()

template<typename TK , typename TR >
HContainer< TR > *& hamilt::HamiltLCAO< TK, TR >::getSR ( )
inline

get SR pointer of *this->sR, which is a HContainerand contains S(R)

Here is the caller graph for this function:

◆ matrix()

template<typename TK , typename TR >
void hamilt::HamiltLCAO< TK, TR >::matrix ( MatrixBlock< TK > &  hk_in,
MatrixBlock< TK > &  sk_in 
)
override

◆ refresh()

template<typename TK , typename TR >
void hamilt::HamiltLCAO< TK, TR >::refresh ( void  )
overridevirtual

refresh the status of HR

Reimplemented from hamilt::Hamilt< TK >.

Here is the call graph for this function:

◆ updateHk()

template<typename TK , typename TR >
void hamilt::HamiltLCAO< TK, TR >::updateHk ( const int  ik)
overridevirtual

for target K point, update consequence of hPsi() and matrix()

Reimplemented from hamilt::Hamilt< TK >.

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

◆ updateSk()

template<typename TK , typename TR >
void hamilt::HamiltLCAO< TK, TR >::updateSk ( const int  ik,
const int  hk_type = 0 
)

special for LCAO, update SK only

Parameters
iktarget K point
kvec_ddirect coordinates of k-points
hk_type0: SK is row-major, 1: SK is collumn-major
Returns
void
Here is the call graph for this function:

Member Data Documentation

◆ current_spin

template<typename TK , typename TR >
int hamilt::HamiltLCAO< TK, TR >::current_spin = 0
private

current_spin for NSPIN=2 case 0: Hamiltonian for spin up, 1: Hamiltonian for spin down

◆ hR

template<typename TK , typename TR >
HContainer<TR>* hamilt::HamiltLCAO< TK, TR >::hR = nullptr
private

Real space Hamiltonian H(R), where R is the Bravis lattice vector.

◆ hRS2

template<typename TK , typename TR >
std::vector<TR> hamilt::HamiltLCAO< TK, TR >::hRS2
private

◆ hsk

template<typename TK , typename TR >
HS_Matrix_K<TK>* hamilt::HamiltLCAO< TK, TR >::hsk = nullptr
private

Hamiltonian and overlap matrices for a specific k point.

◆ istep

template<typename TK , typename TR >
const int hamilt::HamiltLCAO< TK, TR >::istep = 0
private

◆ kv

template<typename TK , typename TR >
const K_Vectors* hamilt::HamiltLCAO< TK, TR >::kv = nullptr
private

◆ refresh_times

template<typename TK , typename TR >
int hamilt::HamiltLCAO< TK, TR >::refresh_times = 1
private

◆ sR

template<typename TK , typename TR >
HContainer<TR>* hamilt::HamiltLCAO< TK, TR >::sR = nullptr
private

Real space overlap matrix S(R), where R is the Bravis lattice vector.

◆ V_delta_R

template<typename TK , typename TR >
HContainer<TR>* hamilt::HamiltLCAO< TK, TR >::V_delta_R = nullptr
private

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