iodata.overlap module

Module for computing overlap of atomic orbital basis functions.

class GaussianOverlap(n_max)[source]

Bases: object

Gaussian Overlap Class.

__init__(n_max)[source]

Initialize class.

Parameters:

n_max (int) – Maximum angular momentum.

compute_overlap_gaussian_1d(x1, x2, n1, n2, two_at)[source]

Compute overlap integral of two Gaussian functions in one-dimensions.

compute_overlap(obasis0, atcoords0, obasis1=None, atcoords1=None)[source]

Compute overlap matrix for the given molecular basis set(s).

\[\left\langle \psi_i \mid \psi_j \right\rangle\]

When only one basis set is given, the overlap matrix of that basis (with itself) is computed. If a second basis set (with its atomic coordinates) is provided, the overlap between the two basis sets is computed.

This function takes into account the requested order of the basis functions in obasis0.conventions (and obasis1.conventions). Note that only L2 normalized primitives are supported at the moment.

Parameters:
Return type:

ndarray[Any, dtype[float]]

Returns:

The matrix with overlap integrals, shape=(obasis0.nbasis, obasis1.nbasis).

factorial2(n)[source]

Modifcied scipy.special.factorial2 that returns 1 when the input is -1.

The future implementation of factorial2 in SciPy will not return the correct result for n=-1 (for our purposes). To learn more, see https://github.com/scipy/scipy/issues/18409.

This function only supports integer (array) arguments, because this is the only relevant use case in IOData.

Parameters:

n (Union[int, ndarray[Any, dtype[int]]]) – Values to calculate n!! for. If n==-1, the return value is 1. For n < -1, the return value is 0.

Return type:

Union[int, ndarray[Any, dtype[int]]]

gob_cart_normalization(alpha, n)[source]

Compute normalization of exponent.

Parameters:
Return type:

ndarray[Any, dtype[float]]

Returns:

The normalization constants for the gaussian cartesian basis.