# Integrals

`ElemCo.Integrals`

— ModuleElectron-repulsion (and other) integrals

## Exported functions

`ElemCo.Integrals.n_ao4cartshell`

— Method`n_ao4cartshell(id::Integer, info::ILibcint5)`

Return the number of AOs for a given cartesian shell id.

`ElemCo.Integrals.n_ao4sphshell`

— Method`n_ao4sphshell(id::Integer, info::ILibcint5)`

Return the number of AOs for a given spherical shell id.

### Two-index integrals

`ElemCo.Integrals.eri_2e2idx!`

— Method`eri_2e2idx!(out, basis::BasisSet)`

Compute the two-electron 2-index electron-repulsion integral matrix. The result is stored in `out`

.

`ElemCo.Integrals.eri_2e2idx!`

— Method`eri_2e2idx!(out, ash1::ElemCo.BasisSets.CartesianAngularShell, ash2::ElemCo.BasisSets.CartesianAngularShell, basis::BasisSet)`

Compute the two-electron 2-index electron-repulsion integral between two angular shells. The result is stored in `out`

.

`ElemCo.Integrals.eri_2e2idx!`

— Method`eri_2e2idx!(out, ash1::ElemCo.BasisSets.SphericalAngularShell, ash2::ElemCo.BasisSets.SphericalAngularShell, basis::BasisSet)`

Compute the two-electron 2-index electron-repulsion integral between two angular shells. The result is stored in `out`

.

`ElemCo.Integrals.eri_2e2idx`

— Method`eri_2e2idx(basis::BasisSet)`

Compute the two-electron 2-index electron-repulsion integral matrix.

`ElemCo.Integrals.eri_2e2idx`

— Method`eri_2e2idx(ash1::ElemCo.BasisSets.CartesianAngularShell, ash2::ElemCo.BasisSets.CartesianAngularShell, basis::BasisSet)`

Compute the two-electron 2-index electron-repulsion integral between two angular shells.

`ElemCo.Integrals.eri_2e2idx`

— Method`eri_2e2idx(ash1::ElemCo.BasisSets.SphericalAngularShell, ash2::ElemCo.BasisSets.SphericalAngularShell, basis::BasisSet)`

Compute the two-electron 2-index electron-repulsion integral between two angular shells.

`ElemCo.Integrals.kinetic!`

— Method`kinetic!(out, basis::BasisSet)`

Compute the kinetic integral matrix. The result is stored in `out`

.

`ElemCo.Integrals.kinetic!`

— Method`kinetic!(out, ash1::ElemCo.BasisSets.CartesianAngularShell, ash2::ElemCo.BasisSets.CartesianAngularShell, basis::BasisSet)`

Compute the kinetic integral between two angular shells. The result is stored in `out`

.

`ElemCo.Integrals.kinetic!`

— Method`kinetic!(out, ash1::ElemCo.BasisSets.SphericalAngularShell, ash2::ElemCo.BasisSets.SphericalAngularShell, basis::BasisSet)`

Compute the kinetic integral between two angular shells. The result is stored in `out`

.

`ElemCo.Integrals.kinetic`

— Method`kinetic(basis::BasisSet)`

Compute the kinetic integral matrix.

`ElemCo.Integrals.kinetic`

— Method`kinetic(ash1::ElemCo.BasisSets.CartesianAngularShell, ash2::ElemCo.BasisSets.CartesianAngularShell, basis::BasisSet)`

Compute the kinetic integral between two angular shells.

`ElemCo.Integrals.kinetic`

— Method`kinetic(ash1::ElemCo.BasisSets.SphericalAngularShell, ash2::ElemCo.BasisSets.SphericalAngularShell, basis::BasisSet)`

Compute the kinetic integral between two angular shells.

`ElemCo.Integrals.nuclear!`

— Method`nuclear!(out, basis::BasisSet)`

Compute the nuclear integral matrix. The result is stored in `out`

.

`ElemCo.Integrals.nuclear!`

— Method`nuclear!(out, ash1::ElemCo.BasisSets.CartesianAngularShell, ash2::ElemCo.BasisSets.CartesianAngularShell, basis::BasisSet)`

Compute the nuclear integral between two angular shells. The result is stored in `out`

.

`ElemCo.Integrals.nuclear!`

— Method`nuclear!(out, ash1::ElemCo.BasisSets.SphericalAngularShell, ash2::ElemCo.BasisSets.SphericalAngularShell, basis::BasisSet)`

Compute the nuclear integral between two angular shells. The result is stored in `out`

.

`ElemCo.Integrals.nuclear`

— Method`nuclear(basis::BasisSet)`

Compute the nuclear integral matrix.

`ElemCo.Integrals.nuclear`

— Method`nuclear(ash1::ElemCo.BasisSets.CartesianAngularShell, ash2::ElemCo.BasisSets.CartesianAngularShell, basis::BasisSet)`

Compute the nuclear integral between two angular shells.

`ElemCo.Integrals.nuclear`

— Method`nuclear(ash1::ElemCo.BasisSets.SphericalAngularShell, ash2::ElemCo.BasisSets.SphericalAngularShell, basis::BasisSet)`

Compute the nuclear integral between two angular shells.

`ElemCo.Integrals.overlap!`

— Method`overlap!(out, basis::BasisSet)`

Compute the overlap integral matrix. The result is stored in `out`

.

`ElemCo.Integrals.overlap!`

— Method`overlap!(out, ash1::ElemCo.BasisSets.CartesianAngularShell, ash2::ElemCo.BasisSets.CartesianAngularShell, basis::BasisSet)`

Compute the overlap integral between two angular shells. The result is stored in `out`

.

`ElemCo.Integrals.overlap!`

— Method`overlap!(out, ash1::ElemCo.BasisSets.SphericalAngularShell, ash2::ElemCo.BasisSets.SphericalAngularShell, basis::BasisSet)`

Compute the overlap integral between two angular shells. The result is stored in `out`

.

`ElemCo.Integrals.overlap`

— Method`overlap(basis::BasisSet)`

Compute the overlap integral matrix.

`ElemCo.Integrals.overlap`

— Method`overlap(ash1::ElemCo.BasisSets.CartesianAngularShell, ash2::ElemCo.BasisSets.CartesianAngularShell, basis::BasisSet)`

Compute the overlap integral between two angular shells.

`ElemCo.Integrals.overlap`

— Method`overlap(ash1::ElemCo.BasisSets.SphericalAngularShell, ash2::ElemCo.BasisSets.SphericalAngularShell, basis::BasisSet)`

Compute the overlap integral between two angular shells.

### Three-index integrals

`ElemCo.Integrals.eri_2e3idx!`

— Method`eri_2e3idx!(out, ao_basis::BasisSet, fit_basis::BasisSet)`

Compute the two-electron three-index electron-repulsion integral. The result is stored in `out`

.

`ElemCo.Integrals.eri_2e3idx!`

— Method`eri_2e3idx!(out, ash1ao::ElemCo.BasisSets.CartesianAngularShell, ash2ao::ElemCo.BasisSets.CartesianAngularShell, ashfit::ElemCo.BasisSets.CartesianAngularShell, basis::BasisSet)`

Compute the two-electron three-index electron-repulsion integral $v_{a_1}^{a_2 P}$ for given angular shells. `basis`

has to contain ao and fit bases. The result is stored in `out`

.

`ElemCo.Integrals.eri_2e3idx!`

— Method`eri_2e3idx!(out, ash1ao::ElemCo.BasisSets.SphericalAngularShell, ash2ao::ElemCo.BasisSets.SphericalAngularShell, ashfit::ElemCo.BasisSets.SphericalAngularShell, basis::BasisSet)`

Compute the two-electron three-index electron-repulsion integral $v_{a_1}^{a_2 P}$ for given angular shells. `basis`

has to contain ao and fit bases. The result is stored in `out`

.

`ElemCo.Integrals.eri_2e3idx`

— Method`eri_2e3idx(ao_basis::BasisSet, fit_basis::BasisSet)`

Compute the two-electron three-index electron-repulsion integral.

`ElemCo.Integrals.eri_2e3idx`

— Method`eri_2e3idx(ash1ao::ElemCo.BasisSets.CartesianAngularShell, ash2ao::ElemCo.BasisSets.CartesianAngularShell, ashfit::ElemCo.BasisSets.CartesianAngularShell, basis::BasisSet)`

Compute the two-electron three-index electron-repulsion integral $v_{a_1}^{a_2 P}$ for given angular shells. `basis`

has to contain ao and fit bases.

`ElemCo.Integrals.eri_2e3idx`

— Method`eri_2e3idx(ash1ao::ElemCo.BasisSets.SphericalAngularShell, ash2ao::ElemCo.BasisSets.SphericalAngularShell, ashfit::ElemCo.BasisSets.SphericalAngularShell, basis::BasisSet)`

Compute the two-electron three-index electron-repulsion integral $v_{a_1}^{a_2 P}$ for given angular shells. `basis`

has to contain ao and fit bases.

## Internal functions

`ElemCo.Integrals.eri_2e2idx_cart!`

— Method`eri_2e2idx_cart!(out, i::Int, j::Int, basis::BasisSet)`

Compute the two-electron 2-index electron-repulsion integral between two angular shells. The result is stored in `out`

.

`ElemCo.Integrals.eri_2e2idx_sph!`

— Method`eri_2e2idx_sph!(out, i::Int, j::Int, basis::BasisSet)`

`out`

.

`ElemCo.Integrals.eri_2e3idx_cart!`

— Method`eri_2e3idx_cart!(out, i::Int, j::Int, P::Int, basis::BasisSet)`

Compute the two-electron three-index electron-repulsion integral $v_i^{j P}$ for given angular shells. `basis`

has to contain ao and fit bases. The result is stored in `out`

.

`ElemCo.Integrals.eri_2e3idx_sph!`

— Method`eri_2e3idx_sph!(out, i::Int, j::Int, P::Int, basis::BasisSet)`

Compute the two-electron three-index electron-repulsion integral $v_i^{j P}$ for given angular shells. `basis`

has to contain ao and fit bases. The result is stored in `out`

.

`ElemCo.Integrals.kinetic_cart!`

— Method`kinetic_cart!(out, i::Int, j::Int, basis::BasisSet)`

Compute the kinetic integral between two angular shells. The result is stored in `out`

.

`ElemCo.Integrals.kinetic_sph!`

— Method`kinetic_sph!(out, i::Int, j::Int, basis::BasisSet)`

Compute the kinetic integral between two angular shells. The result is stored in `out`

.

`ElemCo.Integrals.nuclear_cart!`

— Method`nuclear_cart!(out, i::Int, j::Int, basis::BasisSet)`

Compute the nuclear integral between two angular shells. The result is stored in `out`

.

`ElemCo.Integrals.nuclear_sph!`

— Method`nuclear_sph!(out, i::Int, j::Int, basis::BasisSet)`

Compute the nuclear integral between two angular shells. The result is stored in `out`

.

`ElemCo.Integrals.overlap_cart!`

— Method`overlap_cart!(out, i::Int, j::Int, basis::BasisSet)`

Compute the overlap integral between two angular shells. The result is stored in `out`

.

`ElemCo.Integrals.overlap_sph!`

— Method`overlap_sph!(out, i::Int, j::Int, basis::BasisSet)`

Compute the overlap integral between two angular shells. The result is stored in `out`

.

## Integral libraries

`ElemCo.Libcint5`

— Module`Libcint 5`

Minimal wrap around the integral library libcint. This module exposes libcint functions to the Julia interface.

(adapted from GaussianBasis.jl)