Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Commit

Permalink
doc string module summary
Browse files Browse the repository at this point in the history
  • Loading branch information
hatemhelal committed May 3, 2024
1 parent 9f20428 commit daa1d1d
Show file tree
Hide file tree
Showing 17 changed files with 61 additions and 20 deletions.
2 changes: 2 additions & 0 deletions mess/autograd_integrals.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""automatic differentiation of atomic orbital integrals"""

from functools import partial
from typing import Callable

Expand Down
2 changes: 2 additions & 0 deletions mess/basis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""basis sets of Gaussian type orbitals"""

from typing import Tuple

import equinox as eqx
Expand Down
2 changes: 2 additions & 0 deletions mess/hamiltonian.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""Many electron Hamiltonian with Density Functional Theory or Hartree-Fock."""

from typing import Literal, Optional, Tuple, get_args

import equinox as eqx
Expand Down
41 changes: 21 additions & 20 deletions mess/integrals.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""
JAX implementation for integrals over Gaussian basis functions.
Based upon the closed-form expressions derived in
Taketa, H., Huzinaga, S., & O-ohata, K. (1966). Gaussian-expansion methods for
molecular integrals. Journal of the physical society of Japan, 21(11), 2313-2324.
<https://doi.org/10.1143/JPSJ.21.2313>
Hereafter referred to as the "THO paper"
Related work:
[1] Augspurger JD, Dykstra CE. General quantum mechanical operators. An
open-ended approach for one-electron integrals with Gaussian bases. Journal of
computational chemistry. 1990 Jan;11(1):105-11.
<https://doi.org/10.1002/jcc.540110113>
[2] PyQuante: <https://github.com/rpmuller/pyquante2/>
"""

from dataclasses import asdict
from functools import partial
from itertools import product as cartesian_product
Expand All @@ -23,26 +44,6 @@
from mess.types import Float3, FloatNxN
from mess.units import LMAX

"""
JAX implementation for integrals over Gaussian basis functions. Based upon the
closed-form expressions derived in
Taketa, H., Huzinaga, S., & O-ohata, K. (1966). Gaussian-expansion methods for
molecular integrals. Journal of the physical society of Japan, 21(11), 2313-2324.
<https://doi.org/10.1143/JPSJ.21.2313>
Hereafter referred to as the "THO paper"
Related work:
[1] Augspurger JD, Dykstra CE. General quantum mechanical operators. An
open-ended approach for one-electron integrals with Gaussian bases. Journal of
computational chemistry. 1990 Jan;11(1):105-11.
<https://doi.org/10.1002/jcc.540110113>
[2] PyQuante: <https://github.com/rpmuller/pyquante2/>
"""

BinaryPrimitiveOp = Callable[[Primitive, Primitive], float]


Expand Down
2 changes: 2 additions & 0 deletions mess/interop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""Interoperation tools for working across MESS, PySCF, and PyQuante."""

from typing import Tuple

import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions mess/mesh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""Discretised sampling of orbitals and charge density."""

from typing import Optional, Tuple, Union

import equinox as eqx
Expand Down
2 changes: 2 additions & 0 deletions mess/numerics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""Function decorators to automate converting between numeric formats."""

from functools import wraps
from typing import Callable

Expand Down
1 change: 1 addition & 0 deletions mess/orbital.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""Container for a linear combination of Gaussian Primitives (aka contraction)."""

from functools import partial
from typing import Tuple
Expand Down
2 changes: 2 additions & 0 deletions mess/plot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""Visualisations of molecular structures and volumetric data."""

import numpy as np
import py3Dmol
from more_itertools import chunked
Expand Down
2 changes: 2 additions & 0 deletions mess/primitive.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""Primitive Gaussian type orbitals"""

from typing import Optional

import equinox as eqx
Expand Down
2 changes: 2 additions & 0 deletions mess/scf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""Vanilla self-consistent field solver implementation."""

import jax.numpy as jnp
import jax.numpy.linalg as jnl
from jax.lax import while_loop
Expand Down
2 changes: 2 additions & 0 deletions mess/special.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""Special mathematical functions not readily available in JAX."""

from functools import partial
from itertools import combinations_with_replacement

Expand Down
2 changes: 2 additions & 0 deletions mess/structure.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""Container for molecular structures"""

from typing import List

import equinox as eqx
Expand Down
6 changes: 6 additions & 0 deletions mess/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""Types used throughout MESS
Note:
``N`` represents the number of atomic orbitals.
"""

from functools import partial
from typing import Tuple, Callable

Expand Down
7 changes: 7 additions & 0 deletions mess/units.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""Conversion between Bohr and Angstrom units
Note:
MESS uses atomic units internally so these conversions are only necessary when
working with external packages.
"""

from jaxtyping import Array

# Maximum value an individual component of the angular momentum lmn can take
Expand Down
2 changes: 2 additions & 0 deletions mess/xcfunctional.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""Core functions for common approximations to the exchange-correlation functional"""

import jax
import numpy as np
import jax.numpy as jnp
Expand Down
2 changes: 2 additions & 0 deletions mess/zeropad_integrals.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) 2024 Graphcore Ltd. All rights reserved.
"""(experimental) Gaussian orbital integrals without array padding."""

from functools import partial

import jax.numpy as jnp
Expand Down

0 comments on commit daa1d1d

Please sign in to comment.