# 3.4.11. horton/gbasis/gbw.h – A four-center integral wrapper for the Cholesky code¶

class GB4IntegralWrapper
#include <gbw.h>

A wrapper around a four-center integral implementation that is suitable for a Cholesky algorithm.

Public Functions

GB4IntegralWrapper(GOBasis *gobasis, GB4Integral *gb4int)

Construct the wrapper.

Parameters
• gobasis -

A Gaussian basis set for which the four-center integrals are to be computed.

• gb4int -

A definition/implementation of a four-center integral.

~GB4IntegralWrapper()
long get_nbasis()

The number of basis functions.

void select_2index(long index0, long index2, long *pbegin0, long *pend0, long *pbegin2, long *pend2)

Select a pair of shells to which a pair of basis indexes belong.

The output of this function is also stored internally for the next call to the compute method.

Parameters
• index0 -

The first basis index.

• index2 -

The third basis index. (Physicist notation!)

• pbegin0 -

Output argument. The begin of the range for the first shell.

• pend0 -

Output argument. The end (non-inclusive) of the range for the first shell.

• pbegin2 -

Output argument. The begin of the range for the third shell. (Physicist notation!)

• pend2 -

Output argument. The end (non-inclusive) of the range for the third shell. (Physicist notation!)

void compute()

Compute four-center integrals for the slices selected with the select_2index method.

void compute_diagonal(double *diagonal)

Compute the (double) diagonal of the four-index object. This is usually needed in the initialization of a Cholesky algorithm.

Parameters
• diagonal -

The output array to which the result is written (size=nbasis*basis).

double *get_2index_slice(long index0, long index2)

Get a slice from the four-center integral computed with the last call to the compute method.

Parameters
• index0 -

The first index of the slice. (Absolute indexes, not relative within the currently selected shell.)

• index2 -

The third index of the slice. (Physicist notation!) (Absolute indexes, not relative within the currently selected shell.)

Private Functions

void compute_shell(long ishell1, long ishell3)

Compute four-center integrals for a quadruplet of shells (defined by ishell0, ishell1, ishell2 and ishell3).

Private Members

GOBasis *gobasis
GB4Integral *gb4int
long max_shell_size
long slice_size
double *integrals
long ishell0
long ishell2
long begin0
long begin2