DFT quadrature grid. More...
#include <dftgrid.h>
Public Member Functions | |
DFTGrid () | |
Dummy constructor. | |
DFTGrid (const BasisSet *bas, bool verbose=true, bool lobatto=false) | |
Constructor. | |
~DFTGrid () | |
Destructor. | |
void | set_verbose (bool ver) |
Set verbose operation. | |
void | construct (int nrad, int lmax, int x_func, int c_func, bool strict) |
Create fixed size grid. | |
void | construct (int nrad, int lmax, bool gga, bool mgga, bool strict, bool nl) |
Create fixed size grid. | |
void | construct (const arma::mat &P, double ftol, int x_func, int c_func) |
Create grid for restricted calculation. | |
void | construct (const arma::mat &Pa, const arma::mat &Pb, double ftol, int x_func, int c_func) |
Create grid for unrestricted calculation. | |
void | construct (const arma::cx_mat &C, double ftol, int x_func, int c_func) |
Create grid for SIC calculation. | |
void | construct_becke (double stol) |
Create dummy grid for Becke charges (only overlap matrix) | |
void | construct_hirshfeld (const Hirshfeld &hirsh, double stol) |
Create dummy grid for Hirshfeld charges (only overlap matrix) | |
size_t | get_Npoints () const |
Get amount of points. | |
size_t | get_Nfuncs () const |
Get amount of functions. | |
double | compute_Nel (const arma::mat &P) |
Evaluate amount of electrons. | |
double | compute_Nel (const arma::mat &Pa, const arma::mat &Pb) |
Evaluate amount of electrons. | |
arma::vec | compute_atomic_Nel (const arma::mat &P) |
Evaluate amount of electrons in each atomic region. | |
arma::vec | compute_atomic_Nel (const Hirshfeld &hirsh, const arma::mat &P) |
Evaluate amount of electrons in each atomic region. | |
void | eval_Fxc (int x_func, int c_func, const arma::mat &P, arma::mat &H, double &Exc, double &Nel) |
Compute Fock matrix, exchange-correlation energy and integrated electron density, restricted case. | |
void | eval_Fxc (int x_func, int c_func, const arma::mat &Pa, const arma::mat &Pb, arma::mat &Ha, arma::mat &Hb, double &Exc, double &Nel) |
Compute Fock matrix, exchange-correlation energy and integrated electron density, unrestricted case. | |
void | eval_Fxc (int x_func, int c_func, const arma::cx_mat &C, std::vector< arma::mat > &H, std::vector< double > &Exc, std::vector< double > &Nel, bool fock) |
void | eval_VV10 (DFTGrid &nlgrid, double b, double C, const arma::mat &P, arma::mat &H, double &Exc, bool fock=true) |
Compute VV10. | |
arma::mat | eval_overlap () |
Evaluate overlap matrix numerically. | |
arma::mat | eval_overlap (size_t inuc) |
Evaluate overlap matrix numerically in the inuc:th region. | |
std::vector< arma::mat > | eval_overlaps () |
Evaluate overlap matrices numerically. | |
arma::mat | eval_overlap (const arma::cx_mat &Cocc, size_t io, double k, double thr=1e-10) |
Evaluate weighted overlap (for PZ-SIC) | |
arma::mat | eval_overlap (const arma::cx_mat &Cocc, const arma::vec &Esi, double k, double thr=1e-10) |
Evaluate weighted overlap derivative terms (for PZ-SIC) | |
arma::mat | eval_tau_overlap (const arma::cx_mat &Cocc, double k, double thr=1e-10) |
Evaluate weighted overlap (for PZ-SIC) | |
arma::mat | eval_tau_overlap_deriv (const arma::cx_mat &Cocc, const arma::vec &Esi, double k, double thr=1e-10) |
Evaluate weighted overlap derivative terms (for PZ-SIC) | |
arma::mat | eval_hirshfeld_overlap (const Hirshfeld &hirsh, size_t inuc) |
Evaluate overlap matrices numerically. | |
std::vector< arma::mat > | eval_hirshfeld_overlaps (const Hirshfeld &hirsh) |
Evaluate overlap matrices numerically. | |
std::vector< dens_list_t > | eval_dens_list (const arma::mat &P) |
Evaluate density. | |
arma::vec | eval_force (int x_func, int c_func, const arma::mat &P) |
Evaluate force. | |
arma::vec | eval_force (int x_func, int c_func, const arma::mat &Pa, const arma::mat &Pb) |
Evaluate force. | |
arma::vec | eval_VV10_force (DFTGrid &nlgrid, double b, double C, const arma::mat &P) |
Evaluate NL force. | |
void | print_grid (std::string met="XC") const |
Print out grid information. | |
void | print_density (const arma::mat &P, std::string densname="density.dat") |
Print out density data. | |
void | print_potential (int func_id, const arma::mat &Pa, const arma::mat &Pb, std::string potname="potential.dat") |
Print out potential data. | |
Private Member Functions | |
void | prune_shells () |
Prune shells with no points. | |
Private Attributes | |
std::vector< AngularGrid > | wrk |
Work grids. | |
std::vector< angshell_t > | grids |
Radial grids. | |
const BasisSet * | basp |
Basis set. | |
bool | verbose |
Verbose operation? | |
DFT quadrature grid.
This class contains routines for computing the matrix elements of the used exchange-correlation functional for density-functional theory calculations.
The space integral is decomposed into atom-centered volume integrals, as was proposed in
A. D. Becke, "A multicenter numerical integration scheme for polyatomic molecules", J. Chem. Phys. 88, p. 2547 - 2553 (1988).
The actual work is done in the AtomGrid class.
void DFTGrid::eval_Fxc | ( | int | x_func, |
int | c_func, | ||
const arma::cx_mat & | C, | ||
std::vector< arma::mat > & | H, | ||
std::vector< double > & | Exc, | ||
std::vector< double > & | Nel, | ||
bool | fock | ||
) |
Compute Fock matrix, exchange-correlation energy and integrated electron density, SIC calculation.