Integrals
ElemCo.Integrals — ModuleElectron-repulsion (and other) integrals
Exported functions
ElemCo.Integrals.n_ao4cartshell — Methodn_ao4cartshell(id::Integer, info::ILibcint)Return the number of AOs for a given cartesian shell id.
ElemCo.Integrals.n_ao4sphshell — Methodn_ao4sphshell(id::Integer, info::ILibcint)Return the number of AOs for a given spherical shell id.
Two-index integrals
ElemCo.Integrals.eri_2e2idx! — Methoderi_2e2idx!(out, basis::BasisSet)Compute the two-electron 2-index electron-repulsion integral matrix. The result is stored in out.
ElemCo.Integrals.eri_2e2idx — Methoderi_2e2idx(basis::BasisSet)Compute the two-electron 2-index electron-repulsion integral matrix.
ElemCo.Integrals.kinetic! — Methodkinetic!(out, basis::BasisSet)Compute the kinetic integral matrix. The result is stored in out.
ElemCo.Integrals.kinetic — Methodkinetic(basis::BasisSet)Compute the kinetic integral matrix.
ElemCo.Integrals.nuclear! — Methodnuclear!(out, basis::BasisSet)Compute the nuclear integral matrix. The result is stored in out.
ElemCo.Integrals.nuclear — Methodnuclear(basis::BasisSet)Compute the nuclear integral matrix.
ElemCo.Integrals.overlap! — Methodoverlap!(out, basis::BasisSet)Compute the overlap integral matrix. The result is stored in out.
ElemCo.Integrals.overlap — Methodoverlap(basis::BasisSet)Compute the overlap integral matrix.
Three-index integrals
ElemCo.Integrals.eri_2e3idx! — Methoderi_2e3idx!(out, buffer, batch::BasisBatch)Compute the two-electron three-index electron-repulsion integral in batch mode (see BasisBatcher). The result is stored in out. buffer is a preallocated buffer [MAlloc]Buffer{Cdouble} of size buffer_size_3idx(batch.bb).
ElemCo.Integrals.eri_2e3idx! — Methoderi_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 — Methoderi_2e3idx(ao_basis::BasisSet, fit_basis::BasisSet)Compute the two-electron three-index electron-repulsion integral.
Calculation in batches
ElemCo.Integrals.BasisBatch — TypeBasisBatchA structure to represent a batch of basis functions. The structure is used to loop over basis functions in a batched manner. The structure is used in conjunction with BasisBatcher.
ElemCo.Integrals.BasisBatcher — TypeBasisBatcherA structure to loop of basis functions in a batched manner. This is useful for computing integrals in batches. The structure is initialized with two basis sets and provides a method to loop over all basis functions of the second basis in a batched manner:
function BasisBatcher(basis1::BasisSet, basis2::BasisSet, target_length::Int=100)The batch length is determined by the target_length parameter. The actual batch length depends on the number of basis functions in the shells of the second basis set and can be smaller or larger than the target_length. One can use the max_batch_length function to determine the maximum batch length.
Example
bbatches = BasisBatcher(basis1, basis2)
for batch in bbatches
range = range(batch) # range of basis functions in the batch
eri_2e3idx!(@view(pqP[:,:,range]), batch)
endElemCo.Integrals.buffer_size_3idx — Methodbuffer_size_3idx(bb::BasisBatcher)Return the buffer size needed in the 3-index integral calculation.
The buffer has to be of type [MAlloc]Buffer{Cdouble}(lenbuf) or [MAlloc]ThreadsBuffer{Cdouble}(lenbuf).
ElemCo.Integrals.max_batch_length — Methodmax_batch_length(bb::BasisBatcher)Return the maximum batch length.
Internal functions
Base.range — Methodrange(bb::BasisBatch)Return the range of basis functions in the batch.
ElemCo.Integrals.eri_2e2idx_cart! — Methoderi_2e2idx!(out, ash1::AngularShell, ash2::AngularShell, 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_cart! — Methoderi_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_cart — Methoderi_2e2idx_cart(ash1::AngularShell, ash2::AngularShell, basis::BasisSet)Compute the two-electron 2-index electron-repulsion integral between two angular shells.
ElemCo.Integrals.eri_2e2idx_sph! — Methoderi_2e2idx!(out, ash1::AngularShell, ash2::AngularShell, 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! — Methoderi_2e2idx_sph!(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 — Methoderi_2e2idx_sph(ash1::AngularShell, ash2::AngularShell, basis::BasisSet)Compute the two-electron 2-index electron-repulsion integral between two angular shells.
ElemCo.Integrals.eri_2e3idx_cart! — Methoderi_2e3idx!(out, ash1ao::AngularShell, ash2ao::AngularShell, ashfit::AngularShell, 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_cart! — Methoderi_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_cart — Methoderi_2e3idx_cart(ash1ao::AngularShell, ash2ao::AngularShell, ashfit::AngularShell, 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_sph! — Methoderi_2e3idx!(out, ash1ao::AngularShell, ash2ao::AngularShell, ashfit::AngularShell, 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_sph! — Methoderi_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.eri_2e3idx_sph — Methoderi_2e3idx_sph(ash1ao::AngularShell, ash2ao::AngularShell, ashfit::AngularShell, 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.kinetic_cart! — Methodkinetic!(out, ash1::AngularShell, ash2::AngularShell, basis::BasisSet)Compute the kinetic integral between two angular shells. The result is stored in out.
ElemCo.Integrals.kinetic_cart! — Methodkinetic_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_cart — Methodkinetic_cart(ash1::AngularShell, ash2::AngularShell, basis::BasisSet)Compute the kinetic integral between two angular shells.
ElemCo.Integrals.kinetic_sph! — Methodkinetic!(out, ash1::AngularShell, ash2::AngularShell, basis::BasisSet)Compute the kinetic integral between two angular shells. The result is stored in out.
ElemCo.Integrals.kinetic_sph! — Methodkinetic_sph!(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 — Methodkinetic_sph(ash1::AngularShell, ash2::AngularShell, basis::BasisSet)Compute the kinetic integral between two angular shells.
ElemCo.Integrals.nuclear_cart! — Methodnuclear!(out, ash1::AngularShell, ash2::AngularShell, basis::BasisSet)Compute the nuclear integral between two angular shells. The result is stored in out.
ElemCo.Integrals.nuclear_cart! — Methodnuclear_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_cart — Methodnuclear_cart(ash1::AngularShell, ash2::AngularShell, basis::BasisSet)Compute the nuclear integral between two angular shells.
ElemCo.Integrals.nuclear_sph! — Methodnuclear!(out, ash1::AngularShell, ash2::AngularShell, basis::BasisSet)Compute the nuclear integral between two angular shells. The result is stored in out.
ElemCo.Integrals.nuclear_sph! — Methodnuclear_sph!(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 — Methodnuclear_sph(ash1::AngularShell, ash2::AngularShell, basis::BasisSet)Compute the nuclear integral between two angular shells.
ElemCo.Integrals.overlap_cart! — Methodoverlap!(out, ash1::AngularShell, ash2::AngularShell, basis::BasisSet)Compute the overlap integral between two angular shells. The result is stored in out.
ElemCo.Integrals.overlap_cart! — Methodoverlap_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_cart — Methodoverlap_cart(ash1::AngularShell, ash2::AngularShell, basis::BasisSet)Compute the overlap integral between two angular shells.
ElemCo.Integrals.overlap_sph! — Methodoverlap!(out, ash1::AngularShell, ash2::AngularShell, basis::BasisSet)Compute the overlap integral between two angular shells. The result is stored in out.
ElemCo.Integrals.overlap_sph! — Methodoverlap_sph!(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 — Methodoverlap_sph(ash1::AngularShell, ash2::AngularShell, basis::BasisSet)Compute the overlap integral between two angular shells.
Integral libraries
ElemCo.Libcint — ModuleLibcintMinimal wrap around the integral library libcint. This module exposes libcint functions to the Julia interface.
(adapted from GaussianBasis.jl)