Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #161

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ files: "gbasis/"
exclude: "notebooks/|tests/"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files # prevents giant files from being commit
- id: check-ast # Check whether files parse as valid python.
Expand All @@ -23,18 +23,18 @@ repos:
args: ["--autofix", "--no-sort-keys"]
- id: trailing-whitespace # Trims trailing whitespace.
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
rev: v1.5.5
hooks:
- id: remove-crlf
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.1.9'
rev: 'v0.4.3'
hooks:
- id: ruff
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.3
rev: 0.28.2
hooks:
- id: check-github-workflows
1 change: 1 addition & 0 deletions gbasis/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Base class for arrays that depend on one or more contracted Gaussians."""

import abc

from gbasis.contractions import GeneralizedContractionShell
Expand Down
1 change: 1 addition & 0 deletions gbasis/base_four_symm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Base class for arrays that depend on four contracted Gaussians."""

import abc
import itertools as it

Expand Down
1 change: 1 addition & 0 deletions gbasis/base_one.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Base class for arrays that depend on one contracted Gaussian."""

import abc

from gbasis.base import BaseGaussianRelatedArray
Expand Down
1 change: 1 addition & 0 deletions gbasis/base_two_asymm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Base class for arrays that depend on two contracted Gaussians."""

import abc

from gbasis.base import BaseGaussianRelatedArray
Expand Down
1 change: 1 addition & 0 deletions gbasis/base_two_symm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Base class for arrays that depend on two contracted Gaussians."""

import abc

from gbasis.base import BaseGaussianRelatedArray
Expand Down
1 change: 1 addition & 0 deletions gbasis/contractions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Data class for contractions of Gaussian-type primitives."""

from numbers import Integral
import numpy as np
from gbasis.utils import factorial2
Expand Down
5 changes: 2 additions & 3 deletions gbasis/evals/_deriv.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Derivative of a Gaussian Contraction."""

import numpy as np
from scipy.special import comb, eval_hermite, perm

Expand Down Expand Up @@ -129,9 +130,7 @@ def _eval_deriv_contractions(coords, orders, center, angmom_comps, alphas, prim_
# to evaluate multiple orders at the same time. Creating/finding a better function for
# evaluating the hermite polynomial at different orders (in sequence) may be nice in the
# future.
hermite = np.sum(
coeffs * eval_hermite(indices_herm, alphas**0.5 * nonzero_coords), axis=0
)
hermite = np.sum(coeffs * eval_hermite(indices_herm, alphas**0.5 * nonzero_coords), axis=0)
hermite = np.prod(hermite, axis=1)

# NOTE: `hermite` now has axis 0 for primitives, 1 for angular momentum vector, and axis 2
Expand Down
1 change: 1 addition & 0 deletions gbasis/evals/density.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Density Evaluation."""

from gbasis.evals.eval import evaluate_basis
from gbasis.evals.eval_deriv import evaluate_deriv_basis
import numpy as np
Expand Down
9 changes: 6 additions & 3 deletions gbasis/evals/electrostatic_potential.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for computing electrostatic potential integrals."""

from gbasis.integrals.point_charge import point_charge_integral
import numpy as np

Expand Down Expand Up @@ -110,9 +111,11 @@ def electrostatic_potential(
elif isinstance(coord_type, (list, tuple)):
if (
sum(
cont.num_sph * cont.num_seg_cont
if j == "spherical"
else cont.num_cart * cont.num_seg_cont
(
cont.num_sph * cont.num_seg_cont
if j == "spherical"
else cont.num_cart * cont.num_seg_cont
)
for cont, j in zip(basis, coord_type)
)
!= one_density_matrix.shape[0]
Expand Down
1 change: 1 addition & 0 deletions gbasis/evals/eval.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions for evaluating Gaussian contractions."""

from gbasis.base_one import BaseOneIndex
from gbasis.contractions import GeneralizedContractionShell
from gbasis.evals._deriv import _eval_deriv_contractions
Expand Down
1 change: 1 addition & 0 deletions gbasis/evals/eval_deriv.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions for evaluating Gaussian primitives."""

from gbasis.base_one import BaseOneIndex
from gbasis.contractions import GeneralizedContractionShell
from gbasis.evals._deriv import _eval_deriv_contractions
Expand Down
1 change: 1 addition & 0 deletions gbasis/evals/stress_tensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for computing properties related to the stress tensor."""

from gbasis.evals.density import (
evaluate_density_laplacian,
evaluate_deriv_density,
Expand Down
1 change: 1 addition & 0 deletions gbasis/integrals/_diff_operator_int.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integrals over differential operator involving contracted Cartesian Gaussians."""

from gbasis.integrals._moment_int import (
_cleanup_intermediate_integrals,
_compute_multipole_moment_integrals_intermediate,
Expand Down
1 change: 1 addition & 0 deletions gbasis/integrals/_moment_int.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Multipole moment integrals involving Contracted Cartesian Gaussians."""

import numpy as np


Expand Down
1 change: 1 addition & 0 deletions gbasis/integrals/_one_elec_int.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""One-electron integrals involving Contracted Cartesian Gaussians."""

import numpy as np
from gbasis.utils import factorial2

Expand Down
1 change: 1 addition & 0 deletions gbasis/integrals/_two_elec_int.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Two-electron integrals involving Contracted Cartesian Gaussians."""

import numpy as np
from gbasis.utils import factorial2

Expand Down
1 change: 1 addition & 0 deletions gbasis/integrals/angular_momentum.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for evaluating the integral over the angular momentum operator."""

from gbasis.base_two_symm import BaseTwoIndexSymmetric
from gbasis.contractions import GeneralizedContractionShell
from gbasis.integrals._diff_operator_int import (
Expand Down
1 change: 1 addition & 0 deletions gbasis/integrals/electron_repulsion.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Electron-electron repulsion integral."""

from gbasis.base_four_symm import BaseFourIndexSymmetric
from gbasis.contractions import GeneralizedContractionShell
from gbasis.integrals._two_elec_int import (
Expand Down
1 change: 1 addition & 0 deletions gbasis/integrals/kinetic_energy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for evaluating the kinetic energy integral."""

from gbasis.base_two_symm import BaseTwoIndexSymmetric
from gbasis.contractions import GeneralizedContractionShell
from gbasis.integrals._diff_operator_int import _compute_differential_operator_integrals
Expand Down
2 changes: 2 additions & 0 deletions gbasis/integrals/libcint.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def from_param(cls, obj):

class PairData(Structure):
r"""``libcint`` ``PairData`` class."""

_fields_ = [
("rij", c_double * 3),
("eij", c_double),
Expand All @@ -202,6 +203,7 @@ class PairData(Structure):

class CINTOpt(Structure):
r"""``libcint`` ``CINTOpt`` class."""

_fields_ = [
("index_xyz_array", POINTER(POINTER(c_int))),
("non0ctr", POINTER(POINTER(c_int))),
Expand Down
1 change: 1 addition & 0 deletions gbasis/integrals/moment.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for computing the moments of a basis set."""

from gbasis.base_two_symm import BaseTwoIndexSymmetric
from gbasis.contractions import GeneralizedContractionShell
from gbasis.integrals._moment_int import _compute_multipole_moment_integrals
Expand Down
1 change: 1 addition & 0 deletions gbasis/integrals/momentum.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for evaluating the integral over the momentum operator."""

from gbasis.base_two_symm import BaseTwoIndexSymmetric
from gbasis.contractions import GeneralizedContractionShell
from gbasis.integrals._diff_operator_int import _compute_differential_operator_integrals
Expand Down
1 change: 1 addition & 0 deletions gbasis/integrals/nuclear_electron_attraction.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for computing the nuclear electron attraction."""

from gbasis.integrals.point_charge import point_charge_integral
import numpy as np

Expand Down
1 change: 1 addition & 0 deletions gbasis/integrals/overlap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions for computing overlap of a basis set."""

from gbasis.base_two_symm import BaseTwoIndexSymmetric
from gbasis.contractions import GeneralizedContractionShell
from gbasis.integrals._moment_int import _compute_multipole_moment_integrals
Expand Down
1 change: 1 addition & 0 deletions gbasis/integrals/overlap_asymm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions for computing overlap between two basis sets."""

from gbasis.base_two_asymm import BaseTwoIndexAsymmetric
from gbasis.integrals.overlap import Overlap

Expand Down
1 change: 1 addition & 0 deletions gbasis/integrals/point_charge.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for computing point charge integrals."""

from gbasis.base_two_symm import BaseTwoIndexSymmetric
from gbasis.contractions import GeneralizedContractionShell
from gbasis.integrals._one_elec_int import _compute_one_elec_integrals
Expand Down
1 change: 1 addition & 0 deletions gbasis/parsers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Parsers for reading basis set files."""

import re

from gbasis.contractions import GeneralizedContractionShell
Expand Down
1 change: 1 addition & 0 deletions gbasis/wrappers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for interfacing to other quantum chemistry packages."""

from gbasis.contractions import GeneralizedContractionShell
import numpy as np

Expand Down
Loading