iodata.overlap module¶
Module for computing overlap of atomic orbital basis functions.
- compute_overlap(obasis0, atcoords0, obasis1=None, atcoords1=None)[source]¶
Compute overlap matrix for the given molecular basis set(s).
\[\braket{\psi_{i}}{\psi_{j}}\]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
(andobasis1.conventions
). Note that only L2 normalized primitives are supported at the moment.- Parameters:
obasis0 (
MolecularBasis
) – The orbital basis set.atcoords0 (
ndarray
[Any
,dtype
[float
]]) – The atomic Cartesian coordinates (including those of ghost atoms).obasis1 (
Optional
[MolecularBasis
]) – An optional second orbital basis set.atcoords1 (
Optional
[ndarray
[Any
,dtype
[float
]]]) – An optional second array with atomic Cartesian coordinates (including those of ghost atoms).
- Return type:
- 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.