PAOFLOW.utils.pyints#

pyints — Two-electron Coulomb repulsion integrals over Gaussian-type orbitals.

This module provides a pure-Python implementation of the analytical two-electron electron-repulsion integrals (ERIs) needed by the ACBN0 and eACBN0 Hartree exchange-correlation routines in PAOFLOW. The algorithms follow the Obara–Saika / THO (Taketa–Huzinaga–O-Ohata) recurrence-relation formalism.

Overview#

The central quantity computed is the four-centre two-electron repulsion integral over contracted Gaussian-type orbitals (cGTOs):

\[J_{\mu\nu\lambda\sigma} = \int\!\int \phi_\mu(\mathbf{r}_1)\,\phi_\nu(\mathbf{r}_1)\, \frac{1}{r_{12}}\, \phi_\lambda(\mathbf{r}_2)\,\phi_\sigma(\mathbf{r}_2)\, d\mathbf{r}_1\,d\mathbf{r}_2\]

The evaluation chain is:

  1. Primitive ERIcoulomb_repulsion() computes the integral for a single Gaussian primitive on each of the four centres, using the Boys function Fgamma() and the Cartesian B-array expansion (B_array(), fB(), B0()) from THO eq. 2.22.

  2. Contractioncontr_coulomb() sums the primitive integrals over all contraction coefficients and normalisation factors, yielding the contracted ERI used by ACBN0.

Special functions#

gammln()

Natural logarithm of the Gamma function via the Lanczos approximation (Numerical Recipes sect. 6.1).

gammp()

Incomplete Gamma function \(P(a; x)\) via series expansion (_gser()) for \(x < a+1\) or continued-fraction representation (_gcf()) otherwise (Numerical Recipes sect. 6.2).

gamm_inc()

Unnormalised incomplete Gamma function \(\gamma(a, x)\).

Fgamma()

Boys function \(F_m(x) = \int_0^1 t^{2m} e^{-xt^2}\,dt\), evaluated via the relation \(F_m(x) = \gamma(m+\tfrac{1}{2}, x)/(2x^{m+\tfrac{1}{2}})\).

Combinatorial utilities#

fact(), fact_ratio(), binomial(), binomial_prefactor()

Factorial, double-factorial ratio, and binomial-coefficient helpers used in the Cartesian angular-momentum reduction (Augspurger & Dykstra).

Geometry helpers#

dist()

Squared Euclidean distance \(|A - B|^2\) between two 3D points.

gaussian_product_center()

Gaussian product theorem centre \(P = (\alpha_1 A + \alpha_2 B)/(\alpha_1+\alpha_2)\).

Data structure#

CGBF

Lightweight container for a contracted Gaussian basis function, storing the centre origin, angular-momentum powers, primitive exponents, contraction coefficients, and normalisation factors.

Classes#

CGBF

Class for a contracted Gaussian basis function

Functions#

gammln(x)

Numerical recipes, section 6.1

dist(A, B)

gaussian_product_center(alpha1, A, alpha2, B)

Fgamma(m, x)

Incomplete gamma function

gammp(a, x)

Returns the incomplete gamma function P(a;x). NumRec sect 6.2.

gamm_inc(a, x)

Incomple gamma function; computed from NumRec routine gammp.

fact(i)

Normal factorial

fact_ratio(a, b)

binomial(a, b)

Binomial coefficient

binomial_prefactor(s, ia, ib, xpa, xpb)

From Augspurger and Dykstra

B0(i, r, g)

fB(i, l1, l2, P, A, B, r, g)

B_array(l1, l2, l3, l4, p, a, b, q, c, d, g1, g2, delta)

coulomb_repulsion(axyz, anorm, almn, aalpha, bxyz, ...)

contr_coulomb(aexps, acoefs, anorms, xyza, powa, ...)

Module Contents#

class PAOFLOW.utils.pyints.CGBF(origin, atid=0)[source]#

Class for a contracted Gaussian basis function

origin[source]#
powers = [][source]#
pnorms = [][source]#
prims = [][source]#
pexps = [][source]#
pcoefs = [][source]#
atid = 0[source]#
PAOFLOW.utils.pyints.gammln(x)[source]#

Numerical recipes, section 6.1

PAOFLOW.utils.pyints.dist(A, B)[source]#
PAOFLOW.utils.pyints.gaussian_product_center(alpha1, A, alpha2, B)[source]#
PAOFLOW.utils.pyints.Fgamma(m, x)[source]#

Incomplete gamma function

PAOFLOW.utils.pyints.gammp(a, x)[source]#

Returns the incomplete gamma function P(a;x). NumRec sect 6.2.

PAOFLOW.utils.pyints.gamm_inc(a, x)[source]#

Incomple gamma function; computed from NumRec routine gammp.

PAOFLOW.utils.pyints.fact(i)[source]#

Normal factorial

PAOFLOW.utils.pyints.fact_ratio(a, b)[source]#
PAOFLOW.utils.pyints.binomial(a, b)[source]#

Binomial coefficient

PAOFLOW.utils.pyints.binomial_prefactor(s, ia, ib, xpa, xpb)[source]#

From Augspurger and Dykstra

PAOFLOW.utils.pyints.B0(i, r, g)[source]#
PAOFLOW.utils.pyints.fB(i, l1, l2, P, A, B, r, g)[source]#
PAOFLOW.utils.pyints.B_array(l1, l2, l3, l4, p, a, b, q, c, d, g1, g2, delta)[source]#
PAOFLOW.utils.pyints.coulomb_repulsion(axyz, anorm, almn, aalpha, bxyz, bnorm, blmn, balpha, cxyz, cnorm, clmn, calpha, dxyz, dnorm, dlmn, dalpha)[source]#
PAOFLOW.utils.pyints.contr_coulomb(aexps, acoefs, anorms, xyza, powa, bexps, bcoefs, bnorms, xyzb, powb, cexps, ccoefs, cnorms, xyzc, powc, dexps, dcoefs, dnorms, xyzd, powd)[source]#