JDFTx  1.7.0
ExactExchange Class Reference

Exact-exchange calculator. More...

#include <ExactExchange.h>

Public Member Functions

 ExactExchange (const Everything &e)
 
double operator() (double aXX, double omega, const std::vector< diagMatrix > &F, const std::vector< ColumnBundle > &C, std::vector< ColumnBundle > *HC=0, matrix3<> *EXX_RRT=0, bool rpaMode=false, const std::vector< diagMatrix > *Hsub_eigs=0) const
 
void prepareHamiltonian (double omega, const std::vector< diagMatrix > &F, const std::vector< ColumnBundle > &C)
 Initialize the ACE (Adiabatic Compression of Exchange) representation in preparation for applyHamiltonian.
 
double applyHamiltonian (double aXX, double omega, int q, const diagMatrix &Fq, const ColumnBundle &Cq, ColumnBundle &HCq) const
 
void addHamiltonian (double aXX, double omega, int q, matrix &H, const std::vector< int > &iRowsMine, const std::vector< int > &iColsMine) const
 Add Hamiltonian in plane-wave basis (used for dense diagonalization for BGW):
 

Detailed Description

Exact-exchange calculator.

Member Function Documentation

◆ applyHamiltonian()

double ExactExchange::applyHamiltonian ( double  aXX,
double  omega,
int  q,
const diagMatrix Fq,
const ColumnBundle Cq,
ColumnBundle HCq 
) const

Apply Hamiltonian using ACE representation initialized previously, and return the exchange energy contribution from current q. Note that fillings Fq are only used for computing the energy, and do not impact the Hamiltonian which only depends on F used in prepareHamiltonian(). HCq must be allocated (non-null) in order to collect the Hamiltonian contribution, else only energy is returned.

◆ operator()()

double ExactExchange::operator() ( double  aXX,
double  omega,
const std::vector< diagMatrix > &  F,
const std::vector< ColumnBundle > &  C,
std::vector< ColumnBundle > *  HC = 0,
matrix3<> *  EXX_RRT = 0,
bool  rpaMode = false,
const std::vector< diagMatrix > *  Hsub_eigs = 0 
) const

Compute scaled exact exchange energy with scale aXX and range omega (and optionally accumulate gradients) given fillings and wavefunctions. If prepareHamiltonian has been called with the same omega already, then the ACE representation is used to compute the energy and HC instead, except when lattice gradient or RPA-mode are requested which require full computation. RPA mode additionally requires electronic eigenvalues E.


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