Psi4
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
psi::RadialIntegral Class Reference

Abstracts the calculation of radial integrals for ECP integration. More...

#include <ecpint.h>

Public Member Functions

 RadialIntegral ()
 Default constructor creates an empty object. More...
 
void init (int maxL, double tol=1e-15, int small=256, int large=1024)
 
void buildParameters (const GaussianShell &shellA, const GaussianShell &shellB, ShellPairData &data)
 
void type1 (int maxL, int N, int offset, const GaussianShell &U, const GaussianShell &shellA, const GaussianShell &shellB, ShellPairData &data, TwoIndex< double > &values)
 
void type2 (int lam, int l1start, int l1end, int l2start, int l2end, int N, const GaussianShell &U, const GaussianShell &shellA, const GaussianShell &shellB, ShellPairData &data, TwoIndex< double > &values)
 

Private Member Functions

void buildBessel (std::vector< double > &r, int nr, int maxL, TwoIndex< double > &values, double weight=1.0)
 
double calcKij (double Na, double Nb, double zeta_a, double zeta_b, double R2) const
 
void buildU (const GaussianShell &U, int l, int N, GCQuadrature &grid, double *Utab)
 
void buildF (const GaussianShell &shell, double A, int lstart, int lend, std::vector< double > &r, int nr, int start, int end, TwoIndex< double > &F)
 
int integrate (int maxL, int gridSize, TwoIndex< double > &intValues, GCQuadrature &grid, std::vector< double > &values, int offset=0, int skip=1)
 

Static Private Member Functions

static double integrand (double r, double *p, int ix)
 This integrand simply returns the pretabulated integrand values stored in p given an index ix. More...
 

Private Attributes

GCQuadrature bigGrid
 The larger integration grid for type 1 integrals, and for when the smaller grid fails for type 2 integrals. More...
 
GCQuadrature smallGrid
 The smaller integration grid, default for the type 2 integrals. More...
 
BesselFunction bessie
 Modified spherical Bessel function of the first kind. More...
 
TwoIndex< double > p
 Matrices of parameters needed in both type 1 and 2 integrations. More...
 
TwoIndex< double > P
 
TwoIndex< double > P2
 
TwoIndex< double > K
 
double tolerance
 Tolerance for change below which an integral is considered converged. More...
 

Detailed Description

Abstracts the calculation of radial integrals for ECP integration.

This should not be used directly, and is owned by ECPIntegral. It provides the interface to the adaptive quadrature algorithms used to calculate the type 1 and 2 radial integrals.

Constructor & Destructor Documentation

psi::RadialIntegral::RadialIntegral ( )

Default constructor creates an empty object.

Member Function Documentation

void psi::RadialIntegral::buildBessel ( std::vector< double > &  r,
int  nr,
int  maxL,
TwoIndex< double > &  values,
double  weight = 1.0 
)
private

Builds a matrix of Bessel at the given points up to the given maximum angular momentum.

Parameters
r- vector of points to evaluate at
nr- number of points in r (for convenience)
maxL- the maximum angular momentum needed
values- TwoIndex<double> to store the values in
weight- factor to weight r by (defaults to 1)
void psi::RadialIntegral::buildF ( const GaussianShell shell,
double  A,
int  lstart,
int  lend,
std::vector< double > &  r,
int  nr,
int  start,
int  end,
TwoIndex< double > &  F 
)
private

Tabulate the F function values for the default mode of calculating type 2 integrals.

Parameters
shell- the shell of orbital basis functions to tabulate over
lstart- the lowest angular momentum needed
lend- the maximum angular momentum needed
r- quadrature grid points
nr- the number of grid points in r
start- the grid point to start at
end- the grid point to stop at
F- the matrix to put the values in
void psi::RadialIntegral::buildParameters ( const GaussianShell shellA,
const GaussianShell shellB,
ShellPairData data 
)

Given two GaussianShells, builds the parameters needed by both kind of integral.

Parameters
shellA- the first GaussianShell
shellB- the second GaussianShell
A- position vector (relative to the ECP center) of shell A
B- position vector (relative to the ECP center) of shell B
void psi::RadialIntegral::buildU ( const GaussianShell U,
int  l,
int  N,
GCQuadrature grid,
double *  Utab 
)
private

Tabulate r^{N+2} times the ECP for all quadrature points.

Parameters
U- the ECP to be pretabulated
l- the angular momentum shell of the ECP to be used
N- the power of r to weight the ECP by
grid- the quadrature grid to be used
Utab- the array to put the values into.
double psi::RadialIntegral::calcKij ( double  Na,
double  Nb,
double  zeta_a,
double  zeta_b,
double  R2 
) const
private
void psi::RadialIntegral::init ( int  maxL,
double  tol = 1e-15,
int  small = 256,
int  large = 1024 
)

Initialises the object, in turn initialising the quadrature grids and BesselFunction

Parameters
maxL- the maximum angular momentum of integral needed
tol- the tolerance for convergence of integrals (defaults to 1e-15)
small- the maximum number of quadrature points for the small integration grid (default 256, minimum recommended)
large- the maximum number of quadrature points for the large integration grid (default 1024, minimum recommended)
double psi::RadialIntegral::integrand ( double  r,
double *  p,
int  ix 
)
staticprivate

This integrand simply returns the pretabulated integrand values stored in p given an index ix.

int psi::RadialIntegral::integrate ( int  maxL,
int  gridSize,
TwoIndex< double > &  intValues,
GCQuadrature grid,
std::vector< double > &  values,
int  offset = 0,
int  skip = 1 
)
private

Performs the integration given the pretabulated integrand values.

Parameters
maxL- the maximum angular momentum needed
gridSize- the number of quadrature points
intValues- the TwoIndex<double> of pretabulated integrand values for each angular momentum needed
grid- the quadrature grid
values- the vector to put the resulting integrals into
offset- the angular momentum to start at (defaults to 0)
skip- the steps of angular momentum to go up in (defaults to 1)
void psi::RadialIntegral::type1 ( int  maxL,
int  N,
int  offset,
const GaussianShell U,
const GaussianShell shellA,
const GaussianShell shellB,
ShellPairData data,
TwoIndex< double > &  values 
)

Calculates all type 1 radial integrals over two Gaussian shells up to the given maximum angular momentum.

Parameters
maxL- the maximum angular momentum
N- the power of r that the integrand is weighted by
offset- the starting angular momentum
U- the ECP to be integrated over
shellA- the first GaussianShell
shellB- the second GaussianShell
A- position vector (relative to the ECP center) of shell A
B- position vector (relative to the ECP center) of shell B
values- the matrix to return the integrals in
void psi::RadialIntegral::type2 ( int  lam,
int  l1start,
int  l1end,
int  l2start,
int  l2end,
int  N,
const GaussianShell U,
const GaussianShell shellA,
const GaussianShell shellB,
ShellPairData data,
TwoIndex< double > &  values 
)

Calculates all type 2 radial integrals over two Gaussian shells for the given ECP angular momentum l

Parameters
lam- the ECP shell angular momentum to be calculated over
l1start- the angular momentum to start on for the first shell
l1end- the angular momentum to stop at for the first shell
l2start- the angular momentum to start on for the second shell
l2end- the angular momentum to stop at for the second shell
N- the power of r that the integrand is weighted by
U- the ECP to be integrated over
shellA- the first GaussianShell
shellB- the second GaussianShell
A- position vector (relative to the ECP center) of shell A
B- position vector (relative to the ECP center) of shell B
values- the matrix to return the integrals in

Member Data Documentation

BesselFunction psi::RadialIntegral::bessie
private

Modified spherical Bessel function of the first kind.

GCQuadrature psi::RadialIntegral::bigGrid
private

The larger integration grid for type 1 integrals, and for when the smaller grid fails for type 2 integrals.

TwoIndex<double> psi::RadialIntegral::K
private
TwoIndex<double> psi::RadialIntegral::p
private

Matrices of parameters needed in both type 1 and 2 integrations.

TwoIndex<double> psi::RadialIntegral::P
private
TwoIndex<double> psi::RadialIntegral::P2
private
GCQuadrature psi::RadialIntegral::smallGrid
private

The smaller integration grid, default for the type 2 integrals.

double psi::RadialIntegral::tolerance
private

Tolerance for change below which an integral is considered converged.


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