MolSSI Integral Reference Project
Macros | Functions
integral4_wrappers.h File Reference

Some useful wrapping of functionality. More...

#include "mirp/typedefs.h"
Include dependency graph for integral4_wrappers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MIRP_WRAP_SINGLE4_STR(name)
 Create a function that computes single cartesian integrals from string arguments (four-center) More...
 
#define MIRP_WRAP_SINGLE4_EXACT(name)
 Create a function that computes single cartesian integrals to exact double precision (four-center) More...
 
#define MIRP_WRAP_SHELL4(name)
 Create a function that computes all cartesian integrals of a contracted shell quartet (four-center, interval arithmetic) More...
 
#define MIRP_WRAP_SHELL4_STR(name)
 Create a function that computes all cartesian integrals of a contracted shell quartet from string arguments (four-center) More...
 
#define MIRP_WRAP_SHELL4_EXACT(name)
 Create a function that computes all cartesian integrals of a contracted shell quartet to exact double precision (four-center) More...
 

Functions

void mirp_integral4_single_str (arb_t integral, const int *lmn1, const char **A, const char *alpha1, const int *lmn2, const char **B, const char *alpha2, const int *lmn3, const char **C, const char *alpha3, const int *lmn4, const char **D, const char *alpha4, slong working_prec, cb_integral4_single cb)
 Compute a single 4-center integral using interval arithmetic (string input) More...
 
void mirp_integral4_single_exact (double *integral, const int *lmn1, const double *A, double alpha1, const int *lmn2, const double *B, double alpha2, const int *lmn3, const double *C, double alpha3, const int *lmn4, const double *D, double alpha4, cb_integral4_single cb)
 Computes a single integral to exact double precision using interval arithmetic (four-center) More...
 
void mirp_integral4 (arb_ptr integrals, int am1, arb_srcptr A, int nprim1, int ngen1, arb_srcptr alpha1, arb_srcptr coeff1, int am2, arb_srcptr B, int nprim2, int ngen2, arb_srcptr alpha2, arb_srcptr coeff2, int am3, arb_srcptr C, int nprim3, int ngen3, arb_srcptr alpha3, arb_srcptr coeff3, int am4, arb_srcptr D, int nprim4, int ngen4, arb_srcptr alpha4, arb_srcptr coeff4, slong working_prec, cb_integral4_single cb)
 Compute all cartesian integrals of a contracted shell quartet for an integral (four-center, interval arithmetic) More...
 
void mirp_integral4_str (arb_ptr integrals, int am1, const char **A, int nprim1, int ngen1, const char **alpha1, const char **coeff1, int am2, const char **B, int nprim2, int ngen2, const char **alpha2, const char **coeff2, int am3, const char **C, int nprim3, int ngen3, const char **alpha3, const char **coeff3, int am4, const char **D, int nprim4, int ngen4, const char **alpha4, const char **coeff4, slong working_prec, cb_integral4 cb)
 Compute a single 4-center integral to a target precision (string input) More...
 
void mirp_integral4_exact (double *integrals, int am1, const double *A, int nprim1, int ngen1, const double *alpha1, const double *coeff1, int am2, const double *B, int nprim2, int ngen2, const double *alpha2, const double *coeff2, int am3, const double *C, int nprim3, int ngen3, const double *alpha3, const double *coeff3, int am4, const double *D, int nprim4, int ngen4, const double *alpha4, const double *coeff4, cb_integral4 cb)
 Compute all cartesian integrals of a contracted shell quartet for an integral to exact double precision (four-center) More...
 

Detailed Description

Some useful wrapping of functionality.

Macro Definition Documentation

◆ MIRP_WRAP_SHELL4

#define MIRP_WRAP_SHELL4 (   name)
Value:
static inline \
void mirp_##name(arb_t integrals, \
int am1, arb_srcptr A, int nprim1, int ngen1, arb_srcptr alpha1, arb_srcptr coeff1, \
int am2, arb_srcptr B, int nprim2, int ngen2, arb_srcptr alpha2, arb_srcptr coeff2, \
int am3, arb_srcptr C, int nprim3, int ngen3, arb_srcptr alpha3, arb_srcptr coeff3, \
int am4, arb_srcptr D, int nprim4, int ngen4, arb_srcptr alpha4, arb_srcptr coeff4, \
slong working_prec) \
{ \
mirp_integral4(integrals, \
am1, A, nprim1, ngen1, alpha1, coeff1, \
am2, B, nprim2, ngen2, alpha2, coeff2, \
am3, C, nprim3, ngen3, alpha3, coeff3, \
am4, D, nprim4, ngen4, alpha4, coeff4, \
working_prec, mirp_##name##_single); \
}

Create a function that computes all cartesian integrals of a contracted shell quartet (four-center, interval arithmetic)

A function computing single cartesian integrals is expected to exist and be named mirp_{name}_single

The created function is named mirp_{name}.

See also
mirp_integral4

◆ MIRP_WRAP_SHELL4_EXACT

#define MIRP_WRAP_SHELL4_EXACT (   name)
Value:
static inline \
void mirp_##name##_exact(double * integrals, \
int am1, const double * A, int nprim1, int ngen1, const double * alpha1, const double * coeff1, \
int am2, const double * B, int nprim2, int ngen2, const double * alpha2, const double * coeff2, \
int am3, const double * C, int nprim3, int ngen3, const double * alpha3, const double * coeff3, \
int am4, const double * D, int nprim4, int ngen4, const double * alpha4, const double * coeff4) \
{ \
mirp_integral4_exact(integrals, \
am1, A, nprim1, ngen1, alpha1, coeff1, \
am2, B, nprim2, ngen2, alpha2, coeff2, \
am3, C, nprim3, ngen3, alpha3, coeff3, \
am4, D, nprim4, ngen4, alpha4, coeff4, \
mirp_##name); \
}

Create a function that computes all cartesian integrals of a contracted shell quartet to exact double precision (four-center)

A function computing all cartesian integrals of a contracted shell quartet is expected to exist and be named mirp_{name}

The created function is named mirp_{name}_exact.

See also
mirp_integral4_exact

◆ MIRP_WRAP_SHELL4_STR

#define MIRP_WRAP_SHELL4_STR (   name)
Value:
static inline \
void mirp_##name##_str(arb_ptr integrals, \
int am1, const char ** A, int nprim1, int ngen1, const char ** alpha1, const char ** coeff1, \
int am2, const char ** B, int nprim2, int ngen2, const char ** alpha2, const char ** coeff2, \
int am3, const char ** C, int nprim3, int ngen3, const char ** alpha3, const char ** coeff3, \
int am4, const char ** D, int nprim4, int ngen4, const char ** alpha4, const char ** coeff4, \
slong working_prec) \
{ \
mirp_integral4_str(integrals, \
am1, A, nprim1, ngen1, alpha1, coeff1, \
am2, B, nprim2, ngen2, alpha2, coeff2, \
am3, C, nprim3, ngen3, alpha3, coeff3, \
am4, D, nprim4, ngen4, alpha4, coeff4, \
working_prec, \
mirp_##name); \
}

Create a function that computes all cartesian integrals of a contracted shell quartet from string arguments (four-center)

A function computing all cartesian integrals of a contracted shell quartet in interval arithmetic is expected to exist and be named mirp_{name}

The created function is named mirp_{name}_str.

See also
mirp_integral4_str

◆ MIRP_WRAP_SINGLE4_EXACT

#define MIRP_WRAP_SINGLE4_EXACT (   name)
Value:
static inline \
void mirp_##name##_single_exact(double * integral, \
const int * lmn1, const double * A, double alpha1, \
const int * lmn2, const double * B, double alpha2, \
const int * lmn3, const double * C, double alpha3, \
const int * lmn4, const double * D, double alpha4) \
{ \
mirp_integral4_single_exact(integral, \
lmn1, A, alpha1, \
lmn2, B, alpha2, \
lmn3, C, alpha3, \
lmn4, D, alpha4, \
mirp_##name##_single); \
}

Create a function that computes single cartesian integrals to exact double precision (four-center)

A function computing single cartesian integrals is expected to exist and be named mirp_{name}_single

The created function is named mirp_{name}_single_exact.

See also
mirp_integral4_single_exact

◆ MIRP_WRAP_SINGLE4_STR

#define MIRP_WRAP_SINGLE4_STR (   name)
Value:
static inline \
void mirp_##name##_single_str(arb_t integral, \
const int * lmn1, const char ** A, const char * alpha1, \
const int * lmn2, const char ** B, const char * alpha2, \
const int * lmn3, const char ** C, const char * alpha3, \
const int * lmn4, const char ** D, const char * alpha4, \
slong working_prec) \
{ \
mirp_integral4_single_str(integral, \
lmn1, A, alpha1, \
lmn2, B, alpha2, \
lmn3, C, alpha3, \
lmn4, D, alpha4, \
working_prec, \
mirp_##name##_single); \
}

Create a function that computes single cartesian integrals from string arguments (four-center)

A function computing single cartesian integrals in interval arithmetic is expected to exist and be named mirp_{name}_single

The created function is named mirp_{name}_single_str.

See also
mirp_integral4_single_str

Function Documentation

◆ mirp_integral4()

void mirp_integral4 ( arb_ptr  integrals,
int  am1,
arb_srcptr  A,
int  nprim1,
int  ngen1,
arb_srcptr  alpha1,
arb_srcptr  coeff1,
int  am2,
arb_srcptr  B,
int  nprim2,
int  ngen2,
arb_srcptr  alpha2,
arb_srcptr  coeff2,
int  am3,
arb_srcptr  C,
int  nprim3,
int  ngen3,
arb_srcptr  alpha3,
arb_srcptr  coeff3,
int  am4,
arb_srcptr  D,
int  nprim4,
int  ngen4,
arb_srcptr  alpha4,
arb_srcptr  coeff4,
slong  working_prec,
cb_integral4_single  cb 
)

Compute all cartesian integrals of a contracted shell quartet for an integral (four-center, interval arithmetic)

This function takes in a pointer to a function that computes single, primitive cartesian integrals, and uses it to compute all the cartesian components for an contracted shell quartet.

Parameters
[out]integralsOutput for the computed integral
[in]am1,am2,am3,am4Angular momentum for the four centers
[in]A,B,C,DXYZ coordinates of the four centers (each of length 3)
[in]nprim1,nprim2,nprim3,nprim4Number of primitive gaussians for each shell
[in]ngen1,ngen2,ngen3,ngen4Number of general contractions for each shell
[in]alpha1,alpha2,alpha3,alpha4Exponents of the primitive gaussians on the four centers (of lengths nprim1, nprim2, nprim3, nprim4 respectively)
[in]coeff1,coeff2,coeff3,coeff4Coefficients for all primitives and for all general contractions for each shell (of lengths nprim1 * ngen1, nprim2 * ngen2, nprim3 * ngen3, nprim4 * ngen4 respectively)
[in]cbFunction that computes a single cartesian four-center integral with interval arithmetic
[in]working_precThe working precision (binary digits/bits) to use in the calculation

◆ mirp_integral4_exact()

void mirp_integral4_exact ( double *  integrals,
int  am1,
const double *  A,
int  nprim1,
int  ngen1,
const double *  alpha1,
const double *  coeff1,
int  am2,
const double *  B,
int  nprim2,
int  ngen2,
const double *  alpha2,
const double *  coeff2,
int  am3,
const double *  C,
int  nprim3,
int  ngen3,
const double *  alpha3,
const double *  coeff3,
int  am4,
const double *  D,
int  nprim4,
int  ngen4,
const double *  alpha4,
const double *  coeff4,
cb_integral4  cb 
)

Compute all cartesian integrals of a contracted shell quartet for an integral to exact double precision (four-center)

This function takes double precision as input and returns double precision as output. Internally, it uses interval arithmetic to ensure that no precision is lost

Parameters
[out]integralsOutput for the computed integrals
[in]am1,am2,am3,am4Angular momentum for the four centers
[in]A,B,C,DXYZ coordinates of the four centers (each of length 3)
[in]nprim1,nprim2,nprim3,nprim4Number of primitive gaussians for each shell
[in]ngen1,ngen2,ngen3,ngen4Number of general contractions for each shell
[in]alpha1,alpha2,alpha3,alpha4Exponents of the primitive gaussians on the four centers (of lengths nprim1, nprim2, nprim3, nprim4 respectively)
[in]coeff1,coeff2,coeff3,coeff4Coefficients for all primitives and for all general contractions for each shell (of lengths nprim1 * ngen1, nprim2 * ngen2, nprim3 * ngen3, nprim4 * ngen4 respectively)
[in]cbFunction that computes a single cartesian four-center integral with interval arithmetic

◆ mirp_integral4_single_exact()

void mirp_integral4_single_exact ( double *  integral,
const int *  lmn1,
const double *  A,
double  alpha1,
const int *  lmn2,
const double *  B,
double  alpha2,
const int *  lmn3,
const double *  C,
double  alpha3,
const int *  lmn4,
const double *  D,
double  alpha4,
cb_integral4_single  cb 
)

Computes a single integral to exact double precision using interval arithmetic (four-center)

This function takes double precision as input and returns double precision as output. Internally, it uses interval arithmetic to ensure that no precision is lost

Parameters
[out]integralOutput for the computed integral
[in]lmn1,lmn2,lmn3,lmn4Exponents of x, y, and z that signify angular momentum. Required to be 3 elements.
[in]A,B,C,DXYZ coordinates of the four centers (each of length 3)
[in]alpha1,alpha2,alpha3,alpha4Exponents of the gaussian on the four centers
[in]cbFunction that computes a single cartesian four-center integral with interval arithmetic

◆ mirp_integral4_single_str()

void mirp_integral4_single_str ( arb_t  integral,
const int *  lmn1,
const char **  A,
const char *  alpha1,
const int *  lmn2,
const char **  B,
const char *  alpha2,
const int *  lmn3,
const char **  C,
const char *  alpha3,
const int *  lmn4,
const char **  D,
const char *  alpha4,
slong  working_prec,
cb_integral4_single  cb 
)

Compute a single 4-center integral using interval arithmetic (string input)

This function converts string inputs into arblib types and runs the callback cb

Parameters
[out]integralOutput for the computed integral
[in]lmn1,lmn2,lmn3,lmn4Exponents of x, y, and z that signify angular momentum. Required to be 3 elements.
[in]A,B,C,DXYZ coordinates of the four centers (each of length 3)
[in]alpha1,alpha2,alpha3,alpha4Exponents of the gaussian on the four centers
[in]working_precInternal working precision
[in]cbFunction that computes a single cartesian four-center integral with interval arithmetic
[in]working_precThe working precision (binary digits/bits) to use in the calculation

◆ mirp_integral4_str()

void mirp_integral4_str ( arb_ptr  integrals,
int  am1,
const char **  A,
int  nprim1,
int  ngen1,
const char **  alpha1,
const char **  coeff1,
int  am2,
const char **  B,
int  nprim2,
int  ngen2,
const char **  alpha2,
const char **  coeff2,
int  am3,
const char **  C,
int  nprim3,
int  ngen3,
const char **  alpha3,
const char **  coeff3,
int  am4,
const char **  D,
int  nprim4,
int  ngen4,
const char **  alpha4,
const char **  coeff4,
slong  working_prec,
cb_integral4  cb 
)

Compute a single 4-center integral to a target precision (string input)

This function converts string inputs into arblib types and runs the callback cb

Parameters
[out]integralsOutput for the computed integral
[in]am1,am2,am3,am4Angular momentum for the four centers
[in]A,B,C,DXYZ coordinates of the four centers (each of length 3)
[in]nprim1,nprim2,nprim3,nprim4Number of primitive gaussians for each shell
[in]ngen1,ngen2,ngen3,ngen4Number of general contractions for each shell
[in]alpha1,alpha2,alpha3,alpha4Exponents of the primitive gaussians on the four centers (of lengths nprim1, nprim2, nprim3, nprim4 respectively)
[in]coeff1,coeff2,coeff3,coeff4Coefficients for all primitives and for all general contractions for each shell (of lengths nprim1 * ngen1, nprim2 * ngen2, nprim3 * ngen3, nprim4 * ngen4 respectively)
[in]working_precThe working precision (binary digits/bits) to use in the calculation
[in]cbFunction that computes a single cartesian four-center integral with interval arithmetic