ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
rdmft_tools.h File Reference
#include "source_psi/psi.h"
#include "source_base/matrix.h"
#include "source_cell/module_neighbor/sltk_grid_driver.h"
#include "source_cell/unitcell.h"
#include "source_lcao/module_gint/gint_gamma.h"
#include "source_lcao/module_gint/gint_k.h"
#include "source_estate/module_pot/potential_new.h"
#include "source_base/module_external/blas_connector.h"
#include "source_base/module_external/scalapack_connector.h"
#include "source_base/parallel_2d.h"
#include "source_basis/module_ao/parallel_orbitals.h"
#include "source_base/parallel_reduce.h"
#include "source_pw/module_pwdft/global.h"
#include "source_estate/module_dm/cal_dm_psi.h"
#include "source_estate/module_dm/density_matrix.h"
#include "source_lcao/module_hcontainer/hcontainer.h"
#include "source_lcao/hs_matrix_k.hpp"
#include "source_lcao/module_operator_lcao/operator_lcao.h"
#include <iostream>
#include <type_traits>
#include <complex>
#include <vector>
#include <iomanip>
Include dependency graph for rdmft_tools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  rdmft::Veff_rdmft< TK, TR >
 this part of the code is copying from class Veff and do some modifications. More...
 

Namespaces

namespace  rdmft
 Reduced Density Matrix Functional Theory (RDMFT)
 

Functions

double rdmft::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 rdmft::conj_psi (psi::Psi< TK > &wfc)
 
template<>
void rdmft::conj_psi< double > (psi::Psi< double > &wfc)
 
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
 
template<>
void rdmft::HkPsi< double > (const Parallel_Orbitals *ParaV, const double &HK, const double &wfc, double &H_wfc)
 
template<typename TK >
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)
 
template<>
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)
 
template<typename TK >
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
 
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.
 
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)
 
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
 
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="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 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
 
double rdmft::getEnergy (const ModuleBase::matrix &occNum_wfcHwfc)
 give certain occNum_wfcHwfc, get the corresponding energy