votca 2026-dev
Loading...
Searching...
No Matches
votca::xtp::Vxc_Potential< Grid > Class Template Reference

#include <vxc_potential.h>

Collaboration diagram for votca::xtp::Vxc_Potential< Grid >:

Classes

struct  SpinResult
struct  FXCKernel
struct  XC_entry
struct  XC_entry_spin

Public Member Functions

 Vxc_Potential (const Grid &grid)
 ~Vxc_Potential ()
void setXCfunctional (const std::string &functional)
Mat_p_Energy IntegrateVXC (const Eigen::MatrixXd &density_matrix) const
std::vector< Eigen::MatrixXd > IntegrateFXC (const Eigen::MatrixXd &density_matrix, const std::vector< Eigen::MatrixXd > &response_matrices) const
FXCKernel PrepareFXC (const Eigen::MatrixXd &density_matrix) const
std::vector< Eigen::MatrixXd > ApplyFXC (const FXCKernel &kernel, const std::vector< Eigen::MatrixXd > &response_matrices) const
 IntegrateFXC with a prepared kernel (the same results).
SpinResult IntegrateVXCSpin (const Eigen::MatrixXd &dmat_alpha, const Eigen::MatrixXd &dmat_beta) const
std::vector< std::array< Eigen::MatrixXd, 2 > > IntegrateFXCSpin (const Eigen::MatrixXd &dmat_alpha, const Eigen::MatrixXd &dmat_beta, const std::vector< std::array< Eigen::MatrixXd, 2 > > &response) const
Eigen::MatrixXd PulayGradient (const Eigen::MatrixXd &density_matrix, const AOBasis &dftbasis) const
Eigen::MatrixXd GridWeightGradient (const Eigen::MatrixXd &density_matrix, const QMMolecule &atoms) const
Eigen::MatrixXd GradientResponse (const Eigen::MatrixXd &density_matrix, const Eigen::MatrixXd &direction, const QMMolecule &atoms) const
Eigen::MatrixXd PulayGradientUKS (const Eigen::MatrixXd &dmat_alpha, const Eigen::MatrixXd &dmat_beta, const AOBasis &dftbasis) const
Eigen::MatrixXd GridWeightGradientUKS (const Eigen::MatrixXd &dmat_alpha, const Eigen::MatrixXd &dmat_beta, const QMMolecule &atoms) const

Static Public Member Functions

static double getExactExchange (const std::string &functional)

Private Member Functions

XC_entry EvaluateXC (double rho, double sigma) const
XC_entry_spin EvaluateXCSpin (double rho_a, double rho_b, double sigma_aa, double sigma_ab, double sigma_bb) const
void EvaluateXCBatch (Index n, const double *rho, const double *sigma, double *exc, double *vrho, double *vsigma) const
void EvaluateXCSpinBatch (Index n, const double *rho, const double *sigma, double *exc, double *vrho, double *vsigma) const
void EvaluateFXCBatch (Index n, const double *rho, const double *sigma, double *vsigma, double *v2rho2, double *v2rhosigma, double *v2sigma2) const
void EvaluateVXCFXCBatch (Index n, const double *rho, const double *sigma, double *vrho, double *vsigma, double *v2rho2, double *v2rhosigma, double *v2sigma2) const
void EvaluateFXCSpinBatch (Index n, const double *rho, const double *sigma, double *vsigma, double *v2rho2, double *v2rhosigma, double *v2sigma2) const

Private Attributes

const Grid grid_
int xfunc_id
bool setXC_ = false
bool use_separate_
int cfunc_id
xc_func_type xfunc
xc_func_type cfunc
xc_func_type xfunc_pol_
xc_func_type cfunc_pol_
bool is_gga_ = false

Static Private Attributes

static constexpr Index kPointBlock = 128

Detailed Description

template<class Grid>
class votca::xtp::Vxc_Potential< Grid >

Definition at line 41 of file vxc_potential.h.

Constructor & Destructor Documentation

◆ Vxc_Potential()

template<class Grid>
votca::xtp::Vxc_Potential< Grid >::Vxc_Potential ( const Grid & grid)
inlineexplicit

Definition at line 49 of file vxc_potential.h.

◆ ~Vxc_Potential()

Definition at line 61 of file vxc_potential.cc.

Member Function Documentation

◆ ApplyFXC()

template<class Grid>
std::vector< Eigen::MatrixXd > votca::xtp::Vxc_Potential< Grid >::ApplyFXC ( const FXCKernel & kernel,
const std::vector< Eigen::MatrixXd > & response_matrices ) const

IntegrateFXC with a prepared kernel (the same results).

Definition at line 751 of file vxc_potential.cc.

◆ EvaluateFXCBatch()

template<class Grid>
void votca::xtp::Vxc_Potential< Grid >::EvaluateFXCBatch ( Index n,
const double * rho,
const double * sigma,
double * vsigma,
double * v2rho2,
double * v2rhosigma,
double * v2sigma2 ) const
private

Definition at line 421 of file vxc_potential.cc.

◆ EvaluateFXCSpinBatch()

template<class Grid>
void votca::xtp::Vxc_Potential< Grid >::EvaluateFXCSpinBatch ( Index n,
const double * rho,
const double * sigma,
double * vsigma,
double * v2rho2,
double * v2rhosigma,
double * v2sigma2 ) const
private

Definition at line 456 of file vxc_potential.cc.

◆ EvaluateVXCFXCBatch()

template<class Grid>
void votca::xtp::Vxc_Potential< Grid >::EvaluateVXCFXCBatch ( Index n,
const double * rho,
const double * sigma,
double * vrho,
double * vsigma,
double * v2rho2,
double * v2rhosigma,
double * v2sigma2 ) const
private

Definition at line 431 of file vxc_potential.cc.

◆ EvaluateXC()

template<class Grid>
Vxc_Potential< Grid >::XC_entry votca::xtp::Vxc_Potential< Grid >::EvaluateXC ( double rho,
double sigma ) const
private

Definition at line 266 of file vxc_potential.cc.

◆ EvaluateXCBatch()

template<class Grid>
void votca::xtp::Vxc_Potential< Grid >::EvaluateXCBatch ( Index n,
const double * rho,
const double * sigma,
double * exc,
double * vrho,
double * vsigma ) const
private

Definition at line 227 of file vxc_potential.cc.

◆ EvaluateXCSpin()

template<class Grid>
Vxc_Potential< Grid >::XC_entry_spin votca::xtp::Vxc_Potential< Grid >::EvaluateXCSpin ( double rho_a,
double rho_b,
double sigma_aa,
double sigma_ab,
double sigma_bb ) const
private

Definition at line 275 of file vxc_potential.cc.

◆ EvaluateXCSpinBatch()

template<class Grid>
void votca::xtp::Vxc_Potential< Grid >::EvaluateXCSpinBatch ( Index n,
const double * rho,
const double * sigma,
double * exc,
double * vrho,
double * vsigma ) const
private

Definition at line 244 of file vxc_potential.cc.

◆ getExactExchange()

template<class Grid>
double votca::xtp::Vxc_Potential< Grid >::getExactExchange ( const std::string & functional)
static

Definition at line 73 of file vxc_potential.cc.

◆ GradientResponse()

template<class Grid>
Eigen::MatrixXd votca::xtp::Vxc_Potential< Grid >::GradientResponse ( const Eigen::MatrixXd & density_matrix,
const Eigen::MatrixXd & direction,
const QMMolecule & atoms ) const

Definition at line 1405 of file vxc_potential.cc.

◆ GridWeightGradient()

template<class Grid>
Eigen::MatrixXd votca::xtp::Vxc_Potential< Grid >::GridWeightGradient ( const Eigen::MatrixXd & density_matrix,
const QMMolecule & atoms ) const

Definition at line 1310 of file vxc_potential.cc.

◆ GridWeightGradientUKS()

template<class Grid>
Eigen::MatrixXd votca::xtp::Vxc_Potential< Grid >::GridWeightGradientUKS ( const Eigen::MatrixXd & dmat_alpha,
const Eigen::MatrixXd & dmat_beta,
const QMMolecule & atoms ) const

Definition at line 1686 of file vxc_potential.cc.

◆ IntegrateFXC()

template<class Grid>
std::vector< Eigen::MatrixXd > votca::xtp::Vxc_Potential< Grid >::IntegrateFXC ( const Eigen::MatrixXd & density_matrix,
const std::vector< Eigen::MatrixXd > & response_matrices ) const

The xc kernel of the closed-shell density P (density_matrix, total) applied to symmetric first-order density matrices dP_k (total): the first-order change of IntegrateVXC, int f_xc[rho] drho_k chi chi, with the gradient terms for GGAs. The AO values are evaluated once for all k. Throws if the functional has no second derivatives in libxc.

Definition at line 843 of file vxc_potential.cc.

◆ IntegrateFXCSpin()

template<class Grid>
std::vector< std::array< Eigen::MatrixXd, 2 > > votca::xtp::Vxc_Potential< Grid >::IntegrateFXCSpin ( const Eigen::MatrixXd & dmat_alpha,
const Eigen::MatrixXd & dmat_beta,
const std::vector< std::array< Eigen::MatrixXd, 2 > > & response ) const

Spin-polarized analogue of IntegrateFXC: the first-order changes {dV_alpha, dV_beta} of IntegrateVXCSpin at the spin densities (dmat_alpha, dmat_beta) for symmetric first-order spin densities response[k] = {dP_alpha, dP_beta}, from the polarized second derivatives of libxc (LDA/GGA). The AO values are evaluated once for all k. Throws if the functional has no second derivatives in libxc.

Definition at line 494 of file vxc_potential.cc.

◆ IntegrateVXC()

template<class Grid>
Mat_p_Energy votca::xtp::Vxc_Potential< Grid >::IntegrateVXC ( const Eigen::MatrixXd & density_matrix) const

Definition at line 300 of file vxc_potential.cc.

◆ IntegrateVXCSpin()

template<class Grid>
Vxc_Potential< Grid >::SpinResult votca::xtp::Vxc_Potential< Grid >::IntegrateVXCSpin ( const Eigen::MatrixXd & dmat_alpha,
const Eigen::MatrixXd & dmat_beta ) const

Definition at line 1022 of file vxc_potential.cc.

◆ PrepareFXC()

template<class Grid>
Vxc_Potential< Grid >::FXCKernel votca::xtp::Vxc_Potential< Grid >::PrepareFXC ( const Eigen::MatrixXd & density_matrix) const

Definition at line 682 of file vxc_potential.cc.

◆ PulayGradient()

template<class Grid>
Eigen::MatrixXd votca::xtp::Vxc_Potential< Grid >::PulayGradient ( const Eigen::MatrixXd & density_matrix,
const AOBasis & dftbasis ) const

Definition at line 878 of file vxc_potential.cc.

◆ PulayGradientUKS()

template<class Grid>
Eigen::MatrixXd votca::xtp::Vxc_Potential< Grid >::PulayGradientUKS ( const Eigen::MatrixXd & dmat_alpha,
const Eigen::MatrixXd & dmat_beta,
const AOBasis & dftbasis ) const

Definition at line 1542 of file vxc_potential.cc.

◆ setXCfunctional()

template<class Grid>
void votca::xtp::Vxc_Potential< Grid >::setXCfunctional ( const std::string & functional)

Definition at line 120 of file vxc_potential.cc.

Member Data Documentation

◆ cfunc

template<class Grid>
xc_func_type votca::xtp::Vxc_Potential< Grid >::cfunc
private

Definition at line 221 of file vxc_potential.h.

◆ cfunc_id

template<class Grid>
int votca::xtp::Vxc_Potential< Grid >::cfunc_id
private

Definition at line 219 of file vxc_potential.h.

◆ cfunc_pol_

template<class Grid>
xc_func_type votca::xtp::Vxc_Potential< Grid >::cfunc_pol_
private

Definition at line 225 of file vxc_potential.h.

◆ grid_

template<class Grid>
const Grid votca::xtp::Vxc_Potential< Grid >::grid_
private

Definition at line 215 of file vxc_potential.h.

◆ is_gga_

template<class Grid>
bool votca::xtp::Vxc_Potential< Grid >::is_gga_ = false
private

Definition at line 226 of file vxc_potential.h.

◆ kPointBlock

template<class Grid>
Index votca::xtp::Vxc_Potential< Grid >::kPointBlock = 128
staticconstexprprivate

Definition at line 213 of file vxc_potential.h.

◆ setXC_

template<class Grid>
bool votca::xtp::Vxc_Potential< Grid >::setXC_ = false
private

Definition at line 217 of file vxc_potential.h.

◆ use_separate_

template<class Grid>
bool votca::xtp::Vxc_Potential< Grid >::use_separate_
private

Definition at line 218 of file vxc_potential.h.

◆ xfunc

template<class Grid>
xc_func_type votca::xtp::Vxc_Potential< Grid >::xfunc
private

Definition at line 220 of file vxc_potential.h.

◆ xfunc_id

template<class Grid>
int votca::xtp::Vxc_Potential< Grid >::xfunc_id
private

Definition at line 216 of file vxc_potential.h.

◆ xfunc_pol_

template<class Grid>
xc_func_type votca::xtp::Vxc_Potential< Grid >::xfunc_pol_
private

Definition at line 224 of file vxc_potential.h.


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