ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
psi_base< T > Class Template Referenceabstract

#include <psi_base.h>

Inheritance diagram for psi_base< T >:
Collaboration diagram for psi_base< T >:

Public Member Functions

 psi_base ()
virtual ~psi_base ()
virtual void initialize (const Structure_Factor *sf, const ModulePW::PW_Basis_K *pw_wfc, const UnitCell *p_ucell, const std::vector< int > &ik2iktot, const int &random_seed, const int &rank, const int &npol, const int &nbands)
 initialize the psi_base with external data and methods
virtual void tabulate ()
 CENTRAL FUNCTION: calculate the interpolate table if needed.
virtual void init_psig (T *psig, const int &ik)=0
 CENTRAL FUNCTION: init psi in pw basis.
std::string method () const
int nbands_start () const
int nbands_complem () const
template<typename U>
std::enable_if< std::is_same< U, float >::value, U >::type cast_to_T (const std::complex< double > in)
template<typename U>
std::enable_if< std::is_same< U, double >::value, U >::type cast_to_T (const std::complex< double > in)
template<typename U>
std::enable_if< std::is_same< U, std::complex< float > >::value, U >::type cast_to_T (const std::complex< double > in)
template<typename U>
std::enable_if< std::is_same< U, std::complex< double > >::value, U >::type cast_to_T (const std::complex< double > in)

Protected Member Functions

void stick_to_pool (Real *stick, const int &ir, Real *out) const
 mapping from (ix, iy) to is
void random_t (T *psi, const int iw_start, const int iw_end, const int ik, const int mode=1)
 mode, 0 for rr*exp(i*arg), 1 for rr/(1+gk2)*exp(i*arg)

Protected Attributes

const Structure_Factor * sf_ = nullptr
 Structure_Factor.
const ModulePW::PW_Basis_K * pw_wfc_ = nullptr
 use |k+G>, |G>, getgpluskcar and so on in PW_Basis_K
const UnitCell * p_ucell_ = nullptr
 UnitCell.
std::vector< int > ik2iktot_
 local->global k-point mapping
int random_seed_ = 1
 random seed, shared by random, atomic+random, nao+random
std::vector< int > ixy2is_
 used by stick_to_pool function
std::string method_ = "none"
 method name
int nbands_complem_ = 0
 complement number of bands, which is nbands_start_ - ucell.natomwfc
double mixing_coef_ = 0
 mixing coefficient for atomic+random and nao+random
int nbands_start_ = 0
 starting nbands, which is no less than PARAM.inp.nbands
int npol_ = 1
 number of polarizations

Private Types

using Real = typename GetTypeReal<T>::type

Member Typedef Documentation

◆ Real

template<typename T>
using psi_base< T >::Real = typename GetTypeReal<T>::type
private

Constructor & Destructor Documentation

◆ psi_base()

template<typename T>
psi_base< T >::psi_base ( )
inline

◆ ~psi_base()

template<typename T>
virtual psi_base< T >::~psi_base ( )
inlinevirtual

Member Function Documentation

◆ cast_to_T() [1/4]

template<typename T>
template<typename U>
std::enable_if< std::is_same< U, std::complex< double > >::value, U >::type psi_base< T >::cast_to_T ( const std::complex< double > in)
inline

◆ cast_to_T() [2/4]

template<typename T>
template<typename U>
std::enable_if< std::is_same< U, std::complex< float > >::value, U >::type psi_base< T >::cast_to_T ( const std::complex< double > in)
inline

◆ cast_to_T() [3/4]

template<typename T>
template<typename U>
std::enable_if< std::is_same< U, double >::value, U >::type psi_base< T >::cast_to_T ( const std::complex< double > in)
inline

◆ cast_to_T() [4/4]

template<typename T>
template<typename U>
std::enable_if< std::is_same< U, float >::value, U >::type psi_base< T >::cast_to_T ( const std::complex< double > in)
inline
Here is the caller graph for this function:

◆ init_psig()

template<typename T>
virtual void psi_base< T >::init_psig ( T * psig,
const int & ik )
pure virtual

◆ initialize()

template<typename T>
void psi_base< T >::initialize ( const Structure_Factor * sf,
const ModulePW::PW_Basis_K * pw_wfc,
const UnitCell * p_ucell,
const std::vector< int > & ik2iktot,
const int & random_seed,
const int & rank,
const int & npol,
const int & nbands )
virtual

initialize the psi_base with external data and methods

Reimplemented in psi_init_atomic< T >, psi_init_atomic_random< T >, psi_init_file< T >, psi_init_nao< T >, and psi_init_random< T >.

Here is the caller graph for this function:

◆ method()

template<typename T>
std::string psi_base< T >::method ( ) const
inline

◆ nbands_complem()

template<typename T>
int psi_base< T >::nbands_complem ( ) const
inline
Here is the caller graph for this function:

◆ nbands_start()

template<typename T>
int psi_base< T >::nbands_start ( ) const
inline

◆ random_t()

template<typename T>
void psi_base< T >::random_t ( T * psi,
const int iw_start,
const int iw_end,
const int ik,
const int mode = 1 )
protected

mode, 0 for rr*exp(i*arg), 1 for rr/(1+gk2)*exp(i*arg)

Parameters
[out]psipsi
iw_startiw_start, starting band index
iw_endiw_end, ending band index
ikik, kpoint index
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stick_to_pool()

template<typename T>
void psi_base< T >::stick_to_pool ( Real * stick,
const int & ir,
Real * out ) const
protected

mapping from (ix, iy) to is

Here is the call graph for this function:

◆ tabulate()

template<typename T>
virtual void psi_base< T >::tabulate ( )
inlinevirtual

CENTRAL FUNCTION: calculate the interpolate table if needed.

Reimplemented in psi_init_atomic< T >, and psi_init_nao< T >.

Member Data Documentation

◆ ik2iktot_

template<typename T>
std::vector<int> psi_base< T >::ik2iktot_
protected

local->global k-point mapping

◆ ixy2is_

template<typename T>
std::vector<int> psi_base< T >::ixy2is_
protected

used by stick_to_pool function

◆ method_

template<typename T>
std::string psi_base< T >::method_ = "none"
protected

method name

◆ mixing_coef_

template<typename T>
double psi_base< T >::mixing_coef_ = 0
protected

mixing coefficient for atomic+random and nao+random

◆ nbands_complem_

template<typename T>
int psi_base< T >::nbands_complem_ = 0
protected

complement number of bands, which is nbands_start_ - ucell.natomwfc

◆ nbands_start_

template<typename T>
int psi_base< T >::nbands_start_ = 0
protected

starting nbands, which is no less than PARAM.inp.nbands

◆ npol_

template<typename T>
int psi_base< T >::npol_ = 1
protected

number of polarizations

◆ p_ucell_

template<typename T>
const UnitCell* psi_base< T >::p_ucell_ = nullptr
protected

◆ pw_wfc_

template<typename T>
const ModulePW::PW_Basis_K* psi_base< T >::pw_wfc_ = nullptr
protected

use |k+G>, |G>, getgpluskcar and so on in PW_Basis_K

◆ random_seed_

template<typename T>
int psi_base< T >::random_seed_ = 1
protected

random seed, shared by random, atomic+random, nao+random

◆ sf_

template<typename T>
const Structure_Factor* psi_base< T >::sf_ = nullptr
protected

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