Skip to main content

FLODI

GitHub Actions Version Python License: MIT

Fields and Linear Operators for Differentiation and Integration

FLODI is a Python library for numerical fields on radial, spherical, and prolate spheroidal grids. Sample a function, integrate products, apply a Laplacian, solve Poisson's equation, or find low-energy orbitals while the grid handles geometry and physical cell volumes. Quantum-chemistry examples use atomic units.

Install

Requires Python 3.10 or newer. Install the release from PyPI:

python -m pip install flodi
python -m pip install 'flodi[visualization]'

To work from a repository checkout, use python -m pip install . or python -m pip install '.[visualization]' instead.

NumPy and SciPy are required. Matplotlib and PyTessel are optional; importing the core library does not require either visualization package. Blender is an optional external renderer, not a Python dependency.

A first calculation

import numpy as np
from flodi import RadialGrid

grid = RadialGrid.uniform(n_r=160, r_max=5.0)
source = grid.sample(lambda c: np.exp(-c.r**2) / np.pi**1.5)
potential = grid.poisson(source)
residual = grid.laplacian(potential) + 4 * np.pi * source
print(f"Integrated Gaussian: {grid.integrate(source):.8f}")
print(f"Poisson residual norm: {np.sqrt(grid.integrate(abs(residual)**2)):.3e}")

grid.integrate includes physical cell volumes; supply complex conjugation explicitly for inner products. Orbital fields store physical amplitudes, not reduced radial functions. Eigenstates have unit physical norm and zero outer values. Poisson potentials instead match a source-free exterior that decays at infinity. Finite grid spacing and finite domains still require convergence checks.

lowest_orbitals(potential, k=N) returns ascending energies and N fields. Radial local-potential problems use a tridiagonal solver; angular grids and custom operator actions use a general eigensolver. Prolate angular sectors are selected with m=. grid.closed_shell(...) retains the occupied state for Hartree, exchange, Fock actions, and total-energy calculations.

Develop and test

python -m venv .venv
. .venv/bin/activate
python -m pip install -e '.[dev]'
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 python -m unittest discover -s tests -t . -v
python website/source/examples/first_fields.py

A single BLAS thread often avoids thread overhead for these small problems. The library leaves thread settings under the caller's control. All tests run against the installed package; no assignment repository is needed. Tests of PyTessel meshes are skipped when the optional package is unavailable.

Repository contents

  • src/flodi/: installable library, including private implementation modules.
  • tests/: library and example regression tests.
  • examples/: atomic and molecular worked calculations (N, E, and X series).
  • docs/field-guide.md: representations, normalization, and grid conventions.
  • scripts/: orbital rendering and numerical-investigation utilities.
  • docs/: investigation notes and an archived obsolete example test.
  • website/: Sphinx documentation sources, figures, and generation scripts.

Historical study notes retain references to the original authoring repository and its build artifacts; those artifacts are not needed to use or test FLODI.

Read the documentation, or build and preview it locally:

python -m pip install -e '.[docs]'
python -m sphinx -b html -W --keep-going -n website/source website/build/html
python -m http.server 8080 --directory website/build/html

The student guides explain operation contracts, representation conventions, and validation through independent Gaussian and finite-ball examples. They support implementing an investigation without providing exercise solutions. The documentation uses Sphinx with the Read the Docs theme. GitHub Actions checks documentation builds on pull requests and deploys successful builds from main to GitHub Pages. See website/README.md for authoring and deployment details.

Build and release

See RELEASING.md for validation and publication. Pushing a version tag such as v0.1.0 runs the release checks and publishes to PyPI through the pypi environment. The tag must match pyproject.toml. Branch pushes and pull requests do not publish packages.

License

MIT; see LICENSE.

Metadata

Release files for flodi 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flodi 0.1.0
File Size Uploaded Provenance Actions
flodi-0.1.0.tar.gz 1.3 MB With provenance Details for flodi-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flodi 0.1.0
File Interpreter ABI Platform Actions
flodi-0.1.0-py3-none-any.whl Python 3 none any Details for flodi-0.1.0-py3-none-any.whl

Total release size: 1.3 MB

Release files / flodi-0.1.0.tar.gz

Download URL flodi-0.1.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
8227e6a4bbc13a6435eb1cf7700bd1c8e3af68abda0d92e108cefda44bc6ca22
BLAKE2b-256 checksum
How to use checksums
0cb378f44270c9aad50a14953165bea8c775f9ccd4d2808ca5e1af1701c1bcb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / flodi-0.1.0-py3-none-any.whl

Download URL flodi-0.1.0-py3-none-any.whl
Size 26.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3cefa2c4b03417c0262941020eab2cfd2a7b9ce96fad499da5d010684c4cfc6
BLAKE2b-256 checksum
How to use checksums
e5133512e99c9cdad27ccb5ede63b29709079dfaeb4501f207b28b0485ebcc5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Security for flodi 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for flodi-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page