iodata.test.common module¶
Utilities for unit tests.
-
check_orthonormal
(mo_coeffs, ao_overlap, atol=1e-05)[source]¶ Check that molecular orbitals are orthogonal and normalized.
- Parameters
mo_coeffs (np.ndarray, shape=(nbasis, mo_count)) – Molecular orbital coefficients.
ao_overlap (np.ndarray, shape=(nbasis, nbasis)) – Atomic orbital overlap matrix.
atol (float) – Absolute tolerance in deviation from identity matrix.
-
load_one_warning
(filename, fmt=None, match=None, **kwargs)[source]¶ Call load_one, catching expected FileFormatWarning.
- Parameters
filename (
str
) – The file in the unit test data directory to load.fmt (
Optional
[str
]) – The name of the file format module to use. When not given, it is guessed from the filename.match (
Optional
[str
]) – When given, loading the file is expected to raise a warning whose message string contains match.**kwargs – Keyword arguments are passed on to the format-specific load_one function.
- Returns
The instance of IOData with data loaded from the input files.
- Return type
out