ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
pseudopot_cell_vnl Class Reference

#include <VNL_in_pw.h>

Collaboration diagram for pseudopot_cell_vnl:

Public Member Functions

 pseudopot_cell_vnl ()
 
 ~pseudopot_cell_vnl ()
 
void init (const UnitCell &cell, Structure_Factor *psf_in, const ModulePW::PW_Basis_K *wfc_basis=nullptr, const bool allocate_vkb=true)
 
void init_vnl (UnitCell &cell, const ModulePW::PW_Basis *rho_basis)
 
void rescale_vnl (const double &omega_in)
 
template<typename FPTYPE , typename Device >
void getvnl (Device *ctx, const UnitCell &ucell, const int &ik, std::complex< FPTYPE > *vkb_in) const
 
void init_vnl_alpha (const UnitCell &cell)
 
void initgradq_vnl (const UnitCell &cell)
 
void getgradq_vnl (const UnitCell &ucell, const int ik)
 
std::complex< double > Cal_C (int alpha, int lu, int mu, int L, int M)
 
double CG (int l1, int m1, int l2, int m2, int L, int M)
 
void print_vnl (std::ofstream &ofs)
 
void radial_fft_q (const int ng, const int ih, const int jh, const int itype, const double *qnorm, const ModuleBase::matrix ylm, std::complex< double > *qg) const
 Compute the radial Fourier transform of the Q functions.
 
template<typename FPTYPE , typename Device >
void radial_fft_q (Device *ctx, const int ng, const int ih, const int jh, const int itype, const FPTYPE *qnorm, const FPTYPE *ylm, std::complex< FPTYPE > *qg) const
 
void cal_effective_D (const ModuleBase::matrix &veff, const ModulePW::PW_Basis *rho_basis, UnitCell &cell)
 calculate the effective coefficient matrix for non-local pseudopotential projectors
 
template<typename FPTYPE >
FPTYPE * get_nhtol_data () const
 
template<typename FPTYPE >
FPTYPE * get_nhtolm_data () const
 
template<typename FPTYPE >
FPTYPE * get_indv_data () const
 
template<typename FPTYPE >
FPTYPE * get_tab_data () const
 
template<typename FPTYPE >
FPTYPE * get_deeq_data () const
 
template<typename FPTYPE >
FPTYPE * get_qq_nt_data () const
 
template<typename FPTYPE >
std::complex< FPTYPE > * get_qq_so_data () const
 
template<typename FPTYPE >
std::complex< FPTYPE > * get_vkb_data () const
 
template<typename FPTYPE >
std::complex< FPTYPE > * get_deeq_nc_data () const
 
void release_memory ()
 
template<>
std::complex< float > * get_vkb_data () const
 
template<>
std::complex< double > * get_vkb_data () const
 
template<>
float * get_nhtol_data () const
 
template<>
double * get_nhtol_data () const
 
template<>
float * get_nhtolm_data () const
 
template<>
double * get_nhtolm_data () const
 
template<>
float * get_indv_data () const
 
template<>
double * get_indv_data () const
 
template<>
float * get_tab_data () const
 
template<>
double * get_tab_data () const
 
template<>
float * get_deeq_data () const
 
template<>
double * get_deeq_data () const
 
template<>
float * get_qq_nt_data () const
 
template<>
double * get_qq_nt_data () const
 
template<>
std::complex< float > * get_vkb_data () const
 
template<>
std::complex< double > * get_vkb_data () const
 
template<>
std::complex< float > * get_deeq_nc_data () const
 
template<>
std::complex< double > * get_deeq_nc_data () const
 
template<>
std::complex< float > * get_qq_so_data () const
 
template<>
std::complex< double > * get_qq_so_data () const
 

Public Attributes

double cell_factor = 0.0
 
int nkb = 0
 
int lmaxkb = 0
 
int nhm = 0
 
int nbetam = 0
 
int lmaxq = 0
 
ModuleBase::matrix indv
 
ModuleBase::matrix nhtol
 
ModuleBase::matrix nhtolm
 
ModuleBase::matrix nhtoj
 
ModuleBase::realArray dvan
 
ModuleBase::ComplexArray dvan_so
 
ModuleBase::realArray tab
 
ModuleBase::realArray tab_alpha
 
ModuleBase::realArray tab_at
 
ModuleBase::realArray tab_dq
 
ModuleBase::realArray deeq
 
bool multi_proj = false
 
float * s_deeq = nullptr
 
double * d_deeq = nullptr
 
ModuleBase::ComplexArray deeq_nc
 
std::complex< float > * c_deeq_nc = nullptr
 
std::complex< double > * z_deeq_nc = nullptr
 
int * indv_ijkb0 = nullptr
 
ModuleBase::IntArray ijtoh
 
ModuleBase::realArray qq_at
 
ModuleBase::realArray qq_nt
 
ModuleBase::ComplexArray qq_so
 
ModuleBase::realArray ap
 
ModuleBase::IntArray lpx
 
ModuleBase::IntArray lpl
 
ModuleBase::realArray qrad
 
float * s_qq_nt = nullptr
 
double * d_qq_nt = nullptr
 
std::complex< float > * c_qq_so = nullptr
 
std::complex< double > * z_qq_so = nullptr
 
ModuleBase::ComplexMatrix vkb
 
ModuleBase::ComplexArray gradvkb
 
std::complex< double > *** vkb1_alpha
 
std::complex< double > *** vkb_alpha
 
Structure_Factorpsf = nullptr
 

Private Member Functions

void compute_qrad (UnitCell &cell)
 Compute interpolation table qrad.
 
void newq (const ModuleBase::matrix &veff, const ModulePW::PW_Basis *rho_basis, UnitCell &cell)
 computes the integral of the effective potential with the Q function
 
void newd_so (const int &iat, UnitCell &cell)
 calculate D functions in the soc case when tvanp is true
 
void newd_nc (const int &iat, UnitCell &cell)
 calculate D functions in the noncolin case when tvanp is true
 

Private Attributes

bool memory_released = false
 
float * s_nhtol = nullptr
 
float * s_nhtolm = nullptr
 
float * s_indv = nullptr
 
float * s_tab = nullptr
 
std::complex< float > * c_vkb = nullptr
 
double * d_nhtol = nullptr
 
double * d_nhtolm = nullptr
 
double * d_indv = nullptr
 
double * d_tab = nullptr
 
std::complex< double > * z_vkb = nullptr
 
const ModulePW::PW_Basis_Kwfcpw = nullptr
 
Soc soc
 
double omega_old = 0
 
bool use_gpu_ = false
 

Constructor & Destructor Documentation

◆ pseudopot_cell_vnl()

pseudopot_cell_vnl::pseudopot_cell_vnl ( )

◆ ~pseudopot_cell_vnl()

pseudopot_cell_vnl::~pseudopot_cell_vnl ( )

Member Function Documentation

◆ Cal_C()

std::complex< double > pseudopot_cell_vnl::Cal_C ( int  alpha,
int  lu,
int  mu,
int  L,
int  M 
)

◆ cal_effective_D()

void pseudopot_cell_vnl::cal_effective_D ( const ModuleBase::matrix veff,
const ModulePW::PW_Basis rho_basis,
UnitCell cell 
)

calculate the effective coefficient matrix for non-local pseudopotential projectors

Parameters
veffeffective potential
rho_basispotential FFT grids
cellUnitCell
Here is the call graph for this function:

◆ CG()

double pseudopot_cell_vnl::CG ( int  l1,
int  m1,
int  l2,
int  m2,
int  L,
int  M 
)

◆ compute_qrad()

void pseudopot_cell_vnl::compute_qrad ( UnitCell cell)
private

Compute interpolation table qrad.

Compute interpolation table qrad(i,nm,l,nt) = Q^{(L)}_{nm,nt}(q_i) of angular momentum L, for atom of type nt, on grid q_i, where nm = combined index for n,m=1,nh(nt)

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

◆ get_deeq_data() [1/3]

template<>
float * pseudopot_cell_vnl::get_deeq_data ( ) const

◆ get_deeq_data() [2/3]

template<>
double * pseudopot_cell_vnl::get_deeq_data ( ) const

◆ get_deeq_data() [3/3]

template<typename FPTYPE >
FPTYPE * pseudopot_cell_vnl::get_deeq_data ( ) const

◆ get_deeq_nc_data() [1/3]

template<>
std::complex< float > * pseudopot_cell_vnl::get_deeq_nc_data ( ) const

◆ get_deeq_nc_data() [2/3]

template<>
std::complex< double > * pseudopot_cell_vnl::get_deeq_nc_data ( ) const

◆ get_deeq_nc_data() [3/3]

template<typename FPTYPE >
std::complex< FPTYPE > * pseudopot_cell_vnl::get_deeq_nc_data ( ) const

◆ get_indv_data() [1/3]

template<>
float * pseudopot_cell_vnl::get_indv_data ( ) const

◆ get_indv_data() [2/3]

template<>
double * pseudopot_cell_vnl::get_indv_data ( ) const

◆ get_indv_data() [3/3]

template<typename FPTYPE >
FPTYPE * pseudopot_cell_vnl::get_indv_data ( ) const

◆ get_nhtol_data() [1/3]

template<>
float * pseudopot_cell_vnl::get_nhtol_data ( ) const

◆ get_nhtol_data() [2/3]

template<>
double * pseudopot_cell_vnl::get_nhtol_data ( ) const

◆ get_nhtol_data() [3/3]

template<typename FPTYPE >
FPTYPE * pseudopot_cell_vnl::get_nhtol_data ( ) const

◆ get_nhtolm_data() [1/3]

template<>
float * pseudopot_cell_vnl::get_nhtolm_data ( ) const

◆ get_nhtolm_data() [2/3]

template<>
double * pseudopot_cell_vnl::get_nhtolm_data ( ) const

◆ get_nhtolm_data() [3/3]

template<typename FPTYPE >
FPTYPE * pseudopot_cell_vnl::get_nhtolm_data ( ) const

◆ get_qq_nt_data() [1/3]

template<>
float * pseudopot_cell_vnl::get_qq_nt_data ( ) const

◆ get_qq_nt_data() [2/3]

template<>
double * pseudopot_cell_vnl::get_qq_nt_data ( ) const

◆ get_qq_nt_data() [3/3]

template<typename FPTYPE >
FPTYPE * pseudopot_cell_vnl::get_qq_nt_data ( ) const

◆ get_qq_so_data() [1/3]

template<>
std::complex< float > * pseudopot_cell_vnl::get_qq_so_data ( ) const

◆ get_qq_so_data() [2/3]

template<>
std::complex< double > * pseudopot_cell_vnl::get_qq_so_data ( ) const

◆ get_qq_so_data() [3/3]

template<typename FPTYPE >
std::complex< FPTYPE > * pseudopot_cell_vnl::get_qq_so_data ( ) const

◆ get_tab_data() [1/3]

template<>
float * pseudopot_cell_vnl::get_tab_data ( ) const

◆ get_tab_data() [2/3]

template<>
double * pseudopot_cell_vnl::get_tab_data ( ) const

◆ get_tab_data() [3/3]

template<typename FPTYPE >
FPTYPE * pseudopot_cell_vnl::get_tab_data ( ) const

◆ get_vkb_data() [1/5]

template<>
std::complex< float > * pseudopot_cell_vnl::get_vkb_data ( ) const

◆ get_vkb_data() [2/5]

template<>
std::complex< double > * pseudopot_cell_vnl::get_vkb_data ( ) const

◆ get_vkb_data() [3/5]

template<>
std::complex< float > * pseudopot_cell_vnl::get_vkb_data ( ) const

◆ get_vkb_data() [4/5]

template<>
std::complex< double > * pseudopot_cell_vnl::get_vkb_data ( ) const

◆ get_vkb_data() [5/5]

template<typename FPTYPE >
std::complex< FPTYPE > * pseudopot_cell_vnl::get_vkb_data ( ) const

◆ getgradq_vnl()

void pseudopot_cell_vnl::getgradq_vnl ( const UnitCell ucell,
const int  ik 
)
Here is the call graph for this function:

◆ getvnl()

template<typename FPTYPE , typename Device >
void pseudopot_cell_vnl::getvnl ( Device *  ctx,
const UnitCell ucell,
const int &  ik,
std::complex< FPTYPE > *  vkb_in 
) const
Here is the call graph for this function:

◆ init()

void pseudopot_cell_vnl::init ( const UnitCell cell,
Structure_Factor psf_in,
const ModulePW::PW_Basis_K wfc_basis = nullptr,
const bool  allocate_vkb = true 
)
Here is the call graph for this function:

◆ init_vnl()

void pseudopot_cell_vnl::init_vnl ( UnitCell cell,
const ModulePW::PW_Basis rho_basis 
)
Here is the call graph for this function:

◆ init_vnl_alpha()

void pseudopot_cell_vnl::init_vnl_alpha ( const UnitCell cell)
Here is the call graph for this function:

◆ initgradq_vnl()

void pseudopot_cell_vnl::initgradq_vnl ( const UnitCell cell)
Here is the call graph for this function:

◆ newd_nc()

void pseudopot_cell_vnl::newd_nc ( const int &  iat,
UnitCell cell 
)
private

calculate D functions in the noncolin case when tvanp is true

Parameters
iatthe index of atom
cellUnitCell
Here is the call graph for this function:
Here is the caller graph for this function:

◆ newd_so()

void pseudopot_cell_vnl::newd_so ( const int &  iat,
UnitCell cell 
)
private

calculate D functions in the soc case when tvanp is true

Parameters
iatthe index of atom
cellUnitCell
Here is the call graph for this function:
Here is the caller graph for this function:

◆ newq()

void pseudopot_cell_vnl::newq ( const ModuleBase::matrix veff,
const ModulePW::PW_Basis rho_basis,
UnitCell cell 
)
private

computes the integral of the effective potential with the Q function

Parameters
veffeffective potential
rho_basispotential FFT grids
cellUnitCell
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_vnl()

void pseudopot_cell_vnl::print_vnl ( std::ofstream &  ofs)
Here is the call graph for this function:

◆ radial_fft_q() [1/2]

void pseudopot_cell_vnl::radial_fft_q ( const int  ng,
const int  ih,
const int  jh,
const int  itype,
const double *  qnorm,
const ModuleBase::matrix  ylm,
std::complex< double > *  qg 
) const

Compute the radial Fourier transform of the Q functions.

The interpolation table for the radial Fourier transform is stored in qrad.

The formula implemented here is: [ q(g,i,j) = \sum_\text{lm} (-i)^l \text{ap}(\text{lm},i,j) \text{yr}_\text{lm}(g) \text{qrad}(g,l,i,j) ]

Parameters
ng[in] the number of G vectors
ih[in] the first index of Q
jh[in] the second index of Q
itype[in] the atomic type
qnorm[in] the norm of q+g vectors
ylm[in] the real spherical harmonics
qg[out] the Fourier transform of interest
Here is the call graph for this function:
Here is the caller graph for this function:

◆ radial_fft_q() [2/2]

template<typename FPTYPE , typename Device >
void pseudopot_cell_vnl::radial_fft_q ( Device *  ctx,
const int  ng,
const int  ih,
const int  jh,
const int  itype,
const FPTYPE *  qnorm,
const FPTYPE *  ylm,
std::complex< FPTYPE > *  qg 
) const
Here is the call graph for this function:

◆ release_memory()

void pseudopot_cell_vnl::release_memory ( )

◆ rescale_vnl()

void pseudopot_cell_vnl::rescale_vnl ( const double &  omega_in)
Here is the call graph for this function:

Member Data Documentation

◆ ap

ModuleBase::realArray pseudopot_cell_vnl::ap

◆ c_deeq_nc

std::complex<float>* pseudopot_cell_vnl::c_deeq_nc = nullptr

◆ c_qq_so

std::complex<float>* pseudopot_cell_vnl::c_qq_so = nullptr

◆ c_vkb

std::complex<float>* pseudopot_cell_vnl::c_vkb = nullptr
private

◆ cell_factor

double pseudopot_cell_vnl::cell_factor = 0.0

◆ d_deeq

double* pseudopot_cell_vnl::d_deeq = nullptr

◆ d_indv

double* pseudopot_cell_vnl::d_indv = nullptr
private

◆ d_nhtol

double* pseudopot_cell_vnl::d_nhtol = nullptr
private

◆ d_nhtolm

double* pseudopot_cell_vnl::d_nhtolm = nullptr
private

◆ d_qq_nt

double* pseudopot_cell_vnl::d_qq_nt = nullptr

◆ d_tab

double* pseudopot_cell_vnl::d_tab = nullptr
private

◆ deeq

ModuleBase::realArray pseudopot_cell_vnl::deeq

◆ deeq_nc

ModuleBase::ComplexArray pseudopot_cell_vnl::deeq_nc

◆ dvan

ModuleBase::realArray pseudopot_cell_vnl::dvan

◆ dvan_so

ModuleBase::ComplexArray pseudopot_cell_vnl::dvan_so

◆ gradvkb

ModuleBase::ComplexArray pseudopot_cell_vnl::gradvkb
mutable

◆ ijtoh

ModuleBase::IntArray pseudopot_cell_vnl::ijtoh

◆ indv

ModuleBase::matrix pseudopot_cell_vnl::indv

◆ indv_ijkb0

int* pseudopot_cell_vnl::indv_ijkb0 = nullptr

◆ lmaxkb

int pseudopot_cell_vnl::lmaxkb = 0

◆ lmaxq

int pseudopot_cell_vnl::lmaxq = 0

◆ lpl

ModuleBase::IntArray pseudopot_cell_vnl::lpl

◆ lpx

ModuleBase::IntArray pseudopot_cell_vnl::lpx

◆ memory_released

bool pseudopot_cell_vnl::memory_released = false
private

◆ multi_proj

bool pseudopot_cell_vnl::multi_proj = false

◆ nbetam

int pseudopot_cell_vnl::nbetam = 0

◆ nhm

int pseudopot_cell_vnl::nhm = 0

◆ nhtoj

ModuleBase::matrix pseudopot_cell_vnl::nhtoj

◆ nhtol

ModuleBase::matrix pseudopot_cell_vnl::nhtol

◆ nhtolm

ModuleBase::matrix pseudopot_cell_vnl::nhtolm

◆ nkb

int pseudopot_cell_vnl::nkb = 0

◆ omega_old

double pseudopot_cell_vnl::omega_old = 0
private

◆ psf

Structure_Factor* pseudopot_cell_vnl::psf = nullptr

◆ qq_at

ModuleBase::realArray pseudopot_cell_vnl::qq_at

◆ qq_nt

ModuleBase::realArray pseudopot_cell_vnl::qq_nt

◆ qq_so

ModuleBase::ComplexArray pseudopot_cell_vnl::qq_so

◆ qrad

ModuleBase::realArray pseudopot_cell_vnl::qrad

◆ s_deeq

float* pseudopot_cell_vnl::s_deeq = nullptr

◆ s_indv

float* pseudopot_cell_vnl::s_indv = nullptr
private

◆ s_nhtol

float* pseudopot_cell_vnl::s_nhtol = nullptr
private

◆ s_nhtolm

float* pseudopot_cell_vnl::s_nhtolm = nullptr
private

◆ s_qq_nt

float* pseudopot_cell_vnl::s_qq_nt = nullptr

◆ s_tab

float* pseudopot_cell_vnl::s_tab = nullptr
private

◆ soc

Soc pseudopot_cell_vnl::soc
private

◆ tab

ModuleBase::realArray pseudopot_cell_vnl::tab

◆ tab_alpha

ModuleBase::realArray pseudopot_cell_vnl::tab_alpha

◆ tab_at

ModuleBase::realArray pseudopot_cell_vnl::tab_at

◆ tab_dq

ModuleBase::realArray pseudopot_cell_vnl::tab_dq

◆ use_gpu_

bool pseudopot_cell_vnl::use_gpu_ = false
private

◆ vkb

ModuleBase::ComplexMatrix pseudopot_cell_vnl::vkb
mutable

◆ vkb1_alpha

std::complex<double>*** pseudopot_cell_vnl::vkb1_alpha

◆ vkb_alpha

std::complex<double>*** pseudopot_cell_vnl::vkb_alpha

◆ wfcpw

const ModulePW::PW_Basis_K* pseudopot_cell_vnl::wfcpw = nullptr
private

◆ z_deeq_nc

std::complex<double>* pseudopot_cell_vnl::z_deeq_nc = nullptr

◆ z_qq_so

std::complex<double>* pseudopot_cell_vnl::z_qq_so = nullptr

◆ z_vkb

std::complex<double>* pseudopot_cell_vnl::z_vkb = nullptr
private

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