ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
rdmft Namespace Reference

Reduced Density Matrix Functional Theory (RDMFT). More...

Classes

class  RDMFT
class  Veff_rdmft
 this part of the code is copying from class Veff and do some modifications. More...

Functions

template<>
void HkPsi< double > (const Parallel_Orbitals *ParaV, const double &HK, const double &wfc, double &H_wfc)
template<>
void cal_bra_op_ket< double > (const Parallel_Orbitals *ParaV, const Parallel_Blkcyclic &para_Eij_in, const double &wfc, const double &H_wfc, std::vector< double > &Dmn)
void occNum_Mul_wfcHwfc (const ModuleBase::matrix &occ_number, const ModuleBase::matrix &wfcHwfc, ModuleBase::matrix &occNum_wfcHwfc, int symbol=0, const std::string XC_func_rdmft="hf", const double alpha=1.0)
 occNum_wfcHwfc = occNum*wfcHwfc + occNum_wfcHwfc
void add_occNum (const K_Vectors &kv, const ModuleBase::matrix &occ_number, const ModuleBase::matrix &wfcHwfc_TV_in, const ModuleBase::matrix &wfcHwfc_hartree_in, const ModuleBase::matrix &wfcHwfc_dft_XC_in, const ModuleBase::matrix &wfcHwfc_exx_XC_in, ModuleBase::matrix &occNum_wfcHwfc, const std::string XC_func_rdmft="hf", const double alpha=1.0)
 Default symbol = 0 for the gradient of Etotal with respect to occupancy, symbol = 1 for the relevant calculation of Etotal.
void add_wfcHwfc (const ModuleBase::matrix &wg, const ModuleBase::matrix &wk_fun_occNum, const ModuleBase::matrix &wfcHwfc_TV_in, const ModuleBase::matrix &wfcHwfc_hartree_in, const ModuleBase::matrix &wfcHwfc_XC_in, ModuleBase::matrix &occNum_wfcHwfc, const std::string XC_func_rdmft, const double alpha)
 do wk*g(occNum)*wfcHwfc and add for TV, hartree, XC. This function just use once, so it can be replace and delete
double getEnergy (const ModuleBase::matrix &occNum_wfcHwfc)
 give certain occNum_wfcHwfc, get the corresponding energy
double occNum_func (double eta, int symbol=0, const std::string XC_func_rdmft="hf", const double alpha_power=1.0)
 now support XC_func_rdmft = "hf", "muller", "power", "pbe", "pbe0". "wp22" and "cwp22" is realizing.
template<typename TK>
void HkPsi (const Parallel_Orbitals *ParaV, const TK &HK, const TK &wfc, TK &H_wfc)
 implement matrix multiplication of Hk^dagger and psi
template<>
void HkPsi< double > (const Parallel_Orbitals *ParaV, const double &HK, const double &wfc, double &H_wfc)
template<typename TK>
void cal_bra_op_ket (const Parallel_Orbitals *ParaV, const Parallel_Blkcyclic &para_Eij_in, const TK &wfc, const TK &H_wfc, std::vector< TK > &Dmn)
 implement matrix multiplication of sum_mu conj(wfc(ik, m ,mu)) * op_wfc(ik, n, mu)
template<>
void cal_bra_op_ket< double > (const Parallel_Orbitals *ParaV, const Parallel_Blkcyclic &para_Eij_in, const double &wfc, const double &H_wfc, std::vector< double > &Dmn)
template<typename TK>
void _diagonal_in_serial (const Parallel_Blkcyclic &para_Eij_in, const std::vector< TK > &Dmn, double *wfcHwfc)
 for Dmn that conforms to the 2d-block rule, get its diagonal elements
template<typename TK>
void occNum_MulPsi (const Parallel_Orbitals *ParaV, const ModuleBase::matrix &occ_number, psi::Psi< TK > &wfc, int symbol=0, const std::string XC_func_rdmft="hf", const double alpha=1.0)
 realize occNum_wfc = occNum * wfc. Calling this function and we can get wfc = occNum*wfc.
template<typename TK>
void add_psi (const Parallel_Orbitals *ParaV, const K_Vectors *kv, const ModuleBase::matrix &occ_number, psi::Psi< TK > &psi_TV, psi::Psi< TK > &psi_hartree, psi::Psi< TK > &psi_dft_XC, psi::Psi< TK > &psi_exx_XC, psi::Psi< TK > &occNum_Hpsi, const std::string XC_func_rdmft="hf", const double alpha=1.0)
 add psi with eta and g(eta)

Detailed Description

Reduced Density Matrix Functional Theory (RDMFT).

Function Documentation

◆ _diagonal_in_serial()

template<typename TK>
void rdmft::_diagonal_in_serial ( const Parallel_Blkcyclic & para_Eij_in,
const std::vector< TK > & Dmn,
double * wfcHwfc )

for Dmn that conforms to the 2d-block rule, get its diagonal elements

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

◆ add_occNum()

void rdmft::add_occNum ( const K_Vectors & kv,
const ModuleBase::matrix & occ_number,
const ModuleBase::matrix & wfcHwfc_TV_in,
const ModuleBase::matrix & wfcHwfc_hartree_in,
const ModuleBase::matrix & wfcHwfc_dft_XC_in,
const ModuleBase::matrix & wfcHwfc_exx_XC_in,
ModuleBase::matrix & occNum_wfcHwfc,
const std::string XC_func_rdmft,
const double alpha )

Default symbol = 0 for the gradient of Etotal with respect to occupancy, symbol = 1 for the relevant calculation of Etotal.

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

◆ add_psi()

template<typename TK>
void rdmft::add_psi ( const Parallel_Orbitals * ParaV,
const K_Vectors * kv,
const ModuleBase::matrix & occ_number,
psi::Psi< TK > & psi_TV,
psi::Psi< TK > & psi_hartree,
psi::Psi< TK > & psi_dft_XC,
psi::Psi< TK > & psi_exx_XC,
psi::Psi< TK > & occNum_Hpsi,
const std::string XC_func_rdmft = "hf",
const double alpha = 1.0 )

add psi with eta and g(eta)

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

◆ add_wfcHwfc()

void rdmft::add_wfcHwfc ( const ModuleBase::matrix & wg,
const ModuleBase::matrix & wk_fun_occNum,
const ModuleBase::matrix & wfcHwfc_TV_in,
const ModuleBase::matrix & wfcHwfc_hartree_in,
const ModuleBase::matrix & wfcHwfc_XC_in,
ModuleBase::matrix & occNum_wfcHwfc,
const std::string XC_func_rdmft,
const double alpha )

do wk*g(occNum)*wfcHwfc and add for TV, hartree, XC. This function just use once, so it can be replace and delete

do wk*g(occNum)*wfcHwfc and add for TV, hartree, XC. This function just use once, so it can be replace and delete

Here is the call graph for this function:

◆ cal_bra_op_ket()

template<typename TK>
void rdmft::cal_bra_op_ket ( const Parallel_Orbitals * ParaV,
const Parallel_Blkcyclic & para_Eij_in,
const TK & wfc,
const TK & H_wfc,
std::vector< TK > & Dmn )

implement matrix multiplication of sum_mu conj(wfc(ik, m ,mu)) * op_wfc(ik, n, mu)

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

◆ cal_bra_op_ket< double >() [1/2]

template<>
void rdmft::cal_bra_op_ket< double > ( const Parallel_Orbitals * ParaV,
const Parallel_Blkcyclic & para_Eij_in,
const double & wfc,
const double & H_wfc,
std::vector< double > & Dmn )
Here is the call graph for this function:

◆ cal_bra_op_ket< double >() [2/2]

template<>
void rdmft::cal_bra_op_ket< double > ( const Parallel_Orbitals * ParaV,
const Parallel_Blkcyclic & para_Eij_in,
const double & wfc,
const double & H_wfc,
std::vector< double > & Dmn )
Here is the call graph for this function:

◆ getEnergy()

double rdmft::getEnergy ( const ModuleBase::matrix & occNum_wfcHwfc)

give certain occNum_wfcHwfc, get the corresponding energy

Here is the caller graph for this function:

◆ HkPsi()

template<typename TK>
void rdmft::HkPsi ( const Parallel_Orbitals * ParaV,
const TK & HK,
const TK & wfc,
TK & H_wfc )

implement matrix multiplication of Hk^dagger and psi

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

◆ HkPsi< double >() [1/2]

template<>
void rdmft::HkPsi< double > ( const Parallel_Orbitals * ParaV,
const double & HK,
const double & wfc,
double & H_wfc )
Here is the call graph for this function:

◆ HkPsi< double >() [2/2]

template<>
void rdmft::HkPsi< double > ( const Parallel_Orbitals * ParaV,
const double & HK,
const double & wfc,
double & H_wfc )
Here is the call graph for this function:

◆ occNum_func()

double rdmft::occNum_func ( const double eta,
const int symbol,
const std::string XC_func_rdmft,
double alpha )

now support XC_func_rdmft = "hf", "muller", "power", "pbe", "pbe0". "wp22" and "cwp22" is realizing.

for HF, Muller and power functional, g(eta) = eta, eta^0.5, eta^alpha respectively. when symbol = 0, 1, 2, 3, 4, 5, return eta, 0.5*eta, g(eta), 0.5*g(eta), d_g(eta)/d_eta, 1.0 respectively. Default symbol=0, XC_func_rdmft="HF", alpha=0.656

Here is the caller graph for this function:

◆ occNum_Mul_wfcHwfc()

void rdmft::occNum_Mul_wfcHwfc ( const ModuleBase::matrix & occ_number,
const ModuleBase::matrix & wfcHwfc,
ModuleBase::matrix & occNum_wfcHwfc,
int symbol = 0,
const std::string XC_func_rdmft = "hf",
const double alpha = 1.0 )

occNum_wfcHwfc = occNum*wfcHwfc + occNum_wfcHwfc

Parameters
symbolWhen symbol = 0, 1, 2, 3, 4, occNum = occNum, 0.5*occNum, g(occNum), 0.5*g(occNum), d_g(occNum)/d_occNum respectively. Default symbol=0.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ occNum_MulPsi()

template<typename TK>
void rdmft::occNum_MulPsi ( const Parallel_Orbitals * ParaV,
const ModuleBase::matrix & occ_number,
psi::Psi< TK > & wfc,
int symbol = 0,
const std::string XC_func_rdmft = "hf",
const double alpha = 1.0 )

realize occNum_wfc = occNum * wfc. Calling this function and we can get wfc = occNum*wfc.

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