Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 15, 2024
1 parent 9daa917 commit fb4be6d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/notes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion gbasis/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
21 changes: 15 additions & 6 deletions tests/test_overlap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit fb4be6d

Please sign in to comment.