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 Apr 29, 2024
1 parent 930c9a4 commit ebd1213
Show file tree
Hide file tree
Showing 28 changed files with 35 additions and 6 deletions.
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

0 comments on commit ebd1213

Please sign in to comment.