From fb4be6da811cbe214793e3978f5c81ccc00fbbfb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 20:24:56 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/notes.tex | 2 +- gbasis/parsers.py | 3 ++- tests/test_overlap.py | 21 +++++++++++++++------ 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/docs/notes.tex b/docs/notes.tex index e9c75572..0356d389 100644 --- a/docs/notes.tex +++ b/docs/notes.tex @@ -811,7 +811,7 @@ \subsubsection{Gradient of density} with respect to atomic orbitals, \begin{lstlisting}[xleftmargin=-25pt] from gbasis.evals.density import evaluate_density_gradient - + output = evaluate_density_gradient(one_dm, basis, grid_3d, deriv_type="direct") \end{lstlisting} \item To evaluate the gradient of the density using density matrix expressed diff --git a/gbasis/parsers.py b/gbasis/parsers.py index b0f42853..a7f486ec 100644 --- a/gbasis/parsers.py +++ b/gbasis/parsers.py @@ -242,6 +242,7 @@ def make_contractions(basis_dict, atoms, coords, coord_types, tol=1e-20, overlap for angmom, exps, coeffs in basis_dict[atom]: basis.append( GeneralizedContractionShell( - angmom, coord, coeffs, exps, coord_types.pop(0), tol=tol, ovr_screen=overlap) + angmom, coord, coeffs, exps, coord_types.pop(0), tol=tol, ovr_screen=overlap + ) ) return tuple(basis) diff --git a/tests/test_overlap.py b/tests/test_overlap.py index 76ef9a6b..5d25989b 100644 --- a/tests/test_overlap.py +++ b/tests/test_overlap.py @@ -222,12 +222,18 @@ def test_overlap_screening_vs_without_screening(): # Test 1 uses default overlap tolerance of 1e-20 contraction = make_contractions( - basis_dict, ["H", "C", "Kr"], - np.array([[0, 0, 0], [1, 1, 1], [2, 2, 2]]), "spherical", overlap=True + basis_dict, + ["H", "C", "Kr"], + np.array([[0, 0, 0], [1, 1, 1], [2, 2, 2]]), + "spherical", + overlap=True, ) contraction_without_screen = make_contractions( - basis_dict, ["H", "C", "Kr"], - np.array([[0, 0, 0], [1, 1, 1], [2, 2, 2]]), "spherical", overlap=False + basis_dict, + ["H", "C", "Kr"], + np.array([[0, 0, 0], [1, 1, 1], [2, 2, 2]]), + "spherical", + overlap=False, ) overlaps = overlap_integral(contraction) @@ -254,8 +260,11 @@ def test_overlap_screening_with_fail(): overlap=True, ) contraction_without_screen = make_contractions( - basis_dict, ["H", "C", "Kr"], - np.array([[0, 0, 0], [1, 1, 1], [2, 2, 2]]), "cartesian", overlap=False + basis_dict, + ["H", "C", "Kr"], + np.array([[0, 0, 0], [1, 1, 1], [2, 2, 2]]), + "cartesian", + overlap=False, ) overlaps = overlap_integral(contraction)