ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
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 | conj_psi< double > (psi::Psi< double > &wfc) |
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_2D ¶_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 | conj_psi (psi::Psi< TK > &wfc) |
template<> | |
void | conj_psi< double > (psi::Psi< double > &wfc) |
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_2D ¶_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_2D ¶_Eij_in, const double &wfc, const double &H_wfc, std::vector< double > &Dmn) |
template<typename TK > | |
void | _diagonal_in_serial (const Parallel_2D ¶_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) | |
Reduced Density Matrix Functional Theory (RDMFT)
void rdmft::_diagonal_in_serial | ( | const Parallel_2D & | para_Eij_in, |
const std::vector< TK > & | Dmn, | ||
double * | wfcHwfc | ||
) |
for Dmn that conforms to the 2d-block rule, get its diagonal elements
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.
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)
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
void rdmft::cal_bra_op_ket | ( | const Parallel_Orbitals * | ParaV, |
const Parallel_2D & | 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)
void rdmft::cal_bra_op_ket< double > | ( | const Parallel_Orbitals * | ParaV, |
const Parallel_2D & | para_Eij_in, | ||
const double & | wfc, | ||
const double & | H_wfc, | ||
std::vector< double > & | Dmn | ||
) |
void rdmft::cal_bra_op_ket< double > | ( | const Parallel_Orbitals * | ParaV, |
const Parallel_2D & | para_Eij_in, | ||
const double & | wfc, | ||
const double & | H_wfc, | ||
std::vector< double > & | Dmn | ||
) |
void rdmft::conj_psi | ( | psi::Psi< TK > & | wfc | ) |
void rdmft::conj_psi< double > | ( | psi::Psi< double > & | wfc | ) |
void rdmft::conj_psi< double > | ( | psi::Psi< double > & | wfc | ) |
double rdmft::getEnergy | ( | const ModuleBase::matrix & | occNum_wfcHwfc | ) |
give certain occNum_wfcHwfc, get the corresponding energy
void rdmft::HkPsi | ( | const Parallel_Orbitals * | ParaV, |
const TK & | HK, | ||
const TK & | wfc, | ||
TK & | H_wfc | ||
) |
implement matrix multiplication of Hk^dagger and psi
void rdmft::HkPsi< double > | ( | const Parallel_Orbitals * | ParaV, |
const double & | HK, | ||
const double & | wfc, | ||
double & | H_wfc | ||
) |
void rdmft::HkPsi< double > | ( | const Parallel_Orbitals * | ParaV, |
const double & | HK, | ||
const double & | wfc, | ||
double & | H_wfc | ||
) |
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
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
symbol | When 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. |
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.