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 29, 2024
1 parent d5e244c commit 300afc8
Show file tree
Hide file tree
Showing 58 changed files with 65 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
1 change: 1 addition & 0 deletions tests/test_angular_momentum.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.integrals.angular_momentum."""

from gbasis.contractions import GeneralizedContractionShell
from gbasis.integrals._diff_operator_int import (
_compute_differential_operator_integrals_intermediate,
Expand Down
1 change: 1 addition & 0 deletions tests/test_base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.base.BaseGuassianRelatedArray."""

from gbasis.base import BaseGaussianRelatedArray
from gbasis.contractions import GeneralizedContractionShell
import numpy as np
Expand Down
1 change: 1 addition & 0 deletions tests/test_base_four_symm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.base_four_symmetric."""

from gbasis.base_four_symm import BaseFourIndexSymmetric
from gbasis.contractions import GeneralizedContractionShell
from gbasis.spherical import generate_transformation
Expand Down
1 change: 1 addition & 0 deletions tests/test_base_one.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.base_one."""

from gbasis.base_one import BaseOneIndex
from gbasis.contractions import GeneralizedContractionShell
from gbasis.spherical import generate_transformation
Expand Down
1 change: 1 addition & 0 deletions tests/test_base_two_asymm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.base_two_asymm."""

from gbasis.base_two_asymm import BaseTwoIndexAsymmetric
from gbasis.contractions import GeneralizedContractionShell
from gbasis.spherical import generate_transformation
Expand Down
1 change: 1 addition & 0 deletions tests/test_base_two_symm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.base_two_symm."""

from gbasis.base_two_asymm import BaseTwoIndexAsymmetric
from gbasis.base_two_symm import BaseTwoIndexSymmetric
from gbasis.contractions import GeneralizedContractionShell
Expand Down
1 change: 1 addition & 0 deletions tests/test_contractions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.contractions."""

from gbasis.contractions import GeneralizedContractionShell
import numpy as np
import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/test_density.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.evals.density."""

from gbasis.evals.density import (
evaluate_density,
evaluate_density_gradient,
Expand Down
1 change: 1 addition & 0 deletions tests/test_density_direct.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.evals.density."""

from gbasis.evals.density import (
evaluate_density,
evaluate_density_gradient,
Expand Down
1 change: 1 addition & 0 deletions tests/test_deriv.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.evals._deriv."""

import itertools as it

from gbasis.evals._deriv import _eval_deriv_contractions
Expand Down
1 change: 1 addition & 0 deletions tests/test_diff_operator_int.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.integrals._diff_operator_int."""

import itertools as it

from gbasis.integrals._diff_operator_int import _compute_differential_operator_integrals
Expand Down
1 change: 1 addition & 0 deletions tests/test_electron_repulsion.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.integrals.electron_repulsion."""

from gbasis.contractions import GeneralizedContractionShell
from gbasis.integrals._two_elec_int import (
_compute_two_elec_integrals,
Expand Down
1 change: 1 addition & 0 deletions tests/test_electrostatic_potential.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for gbasis.evals.electrostatic_potential."""

from gbasis.evals.electrostatic_potential import electrostatic_potential
from gbasis.parsers import make_contractions, parse_nwchem
import numpy as np
Expand Down
1 change: 1 addition & 0 deletions tests/test_eval.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.evals.eval."""

from gbasis.contractions import GeneralizedContractionShell
from gbasis.evals._deriv import _eval_deriv_contractions
from gbasis.evals.eval import Eval, evaluate_basis
Expand Down
1 change: 1 addition & 0 deletions tests/test_eval_deriv.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.evals.evaluate_deriv."""

import itertools as it

from gbasis.contractions import GeneralizedContractionShell
Expand Down
1 change: 1 addition & 0 deletions tests/test_kinetic_energy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.integrals.kinetic_energy."""

from gbasis.contractions import GeneralizedContractionShell
from gbasis.integrals._diff_operator_int import _compute_differential_operator_integrals
from gbasis.integrals.kinetic_energy import kinetic_energy_integral, KineticEnergyIntegral
Expand Down
1 change: 1 addition & 0 deletions tests/test_moment.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.integrals.moment."""

from gbasis.contractions import GeneralizedContractionShell
from gbasis.integrals._moment_int import _compute_multipole_moment_integrals
from gbasis.integrals.moment import Moment, moment_integral
Expand Down
1 change: 1 addition & 0 deletions tests/test_moment_int.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.integrals._moment_int."""

import itertools as it

from gbasis.integrals._moment_int import _compute_multipole_moment_integrals
Expand Down
1 change: 1 addition & 0 deletions tests/test_momentum.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.integrals.momentum."""

from gbasis.contractions import GeneralizedContractionShell
from gbasis.integrals._diff_operator_int import _compute_differential_operator_integrals
from gbasis.integrals.momentum import momentum_integral, MomentumIntegral
Expand Down
1 change: 1 addition & 0 deletions tests/test_nuclear_electron_attraction.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.integrals.nuclear_electron_attraction."""

from gbasis.integrals.nuclear_electron_attraction import nuclear_electron_attraction_integral
from gbasis.integrals.point_charge import point_charge_integral
from gbasis.parsers import make_contractions, parse_nwchem
Expand Down
1 change: 1 addition & 0 deletions tests/test_one_elec_int.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.integrals._one_elec_int."""

from gbasis.contractions import GeneralizedContractionShell
from gbasis.integrals._one_elec_int import _compute_one_elec_integrals
import numpy as np
Expand Down
1 change: 1 addition & 0 deletions tests/test_overlap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.integrals.overlap."""

from gbasis.contractions import GeneralizedContractionShell
from gbasis.integrals._moment_int import _compute_multipole_moment_integrals
from gbasis.integrals.overlap import Overlap, overlap_integral
Expand Down
1 change: 1 addition & 0 deletions tests/test_overlap_asymm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.integrals.overlap_asymm."""

from gbasis.integrals.overlap import overlap_integral
from gbasis.integrals.overlap_asymm import overlap_integral_asymmetric
from gbasis.parsers import make_contractions, parse_nwchem
Expand Down
1 change: 1 addition & 0 deletions tests/test_parsers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.parsers."""

from gbasis.parsers import make_contractions, parse_gbs, parse_nwchem
import numpy as np
import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/test_point_charge.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.integrals.point_charge."""

from gbasis.contractions import GeneralizedContractionShell
from gbasis.integrals.point_charge import point_charge_integral, PointChargeIntegral
from gbasis.parsers import make_contractions, parse_nwchem
Expand Down
1 change: 1 addition & 0 deletions tests/test_spherical.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.spherical."""

import itertools as it

from gbasis.spherical import (
Expand Down
1 change: 1 addition & 0 deletions tests/test_stress_tensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.evals.stress_tensor."""

from gbasis.evals.density import (
evaluate_density_laplacian,
evaluate_deriv_density,
Expand Down
1 change: 1 addition & 0 deletions tests/test_two_elec_int.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.integrals._two_elec_int."""

from gbasis.integrals._two_elec_int import (
_compute_two_elec_integrals,
_compute_two_elec_integrals_angmom_zero,
Expand Down
1 change: 1 addition & 0 deletions tests/test_wrappers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test gbasis.wrapper."""

from gbasis.contractions import GeneralizedContractionShell
from gbasis.parsers import make_contractions, parse_nwchem
from gbasis.wrappers import from_iodata, from_pyscf
Expand Down
1 change: 1 addition & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility functions for running tests."""

import itertools as it
import os

Expand Down

0 comments on commit 300afc8

Please sign in to comment.