Fast saddle-point analysis on dense N-D PES grids
Project description
pes_analyzer
Fast saddle-point and minimum analysis on dense N-D potential energy surface grids.
Python ≥ 3.10 · Rust 2024 edition · N-D grids for N ∈ [2, 7] · MIT
Why
Quantum-chemistry calculations produce potential energy surfaces (PES) as dense tables of energies on a multidimensional grid of geometric coordinates. Once that grid exists, the interesting analysis questions are topological: where are the minima, where are the saddle points, which basins are connected to which? pes_analyzer answers those questions on grids that may be too large for pure-Python approaches by pushing the inner loops into Rust.
What it does
pes_analyzer.saddle.find_iwf_grid— imaginary water flow (watershed) saddle search between two grid points.pes_analyzer.extrema.find_minima_grid— local minima on the Chebyshev king-move stencil (default 3ᴺ−1; widen viaconfirm_rangefor a fast two-pass check, or vianeighborhood_rangefor a direct wider check).pes_analyzer.extrema.find_maxima_grid— strict dual offind_minima_grid. Same stencil and sameneighborhood_range/confirm_rangesemantics; output sorted descending by energy.pes_analyzer.extrema.find_extrema_grid— combined single-sweep search. Returns(minima, maxima)byte-identical to calling the two single-polarity functions separately, at the cost of one extra-list allocation but one fewer stencil walk per cell.pes_analyzer.grid.build_dense— scatter helper that turns sparse(coords, value)rows into a densenumpyarray indexed in axis order.
Installation
The package builds from source via maturin. From a checkout:
pip install maturin
maturin develop --release
For day-to-day development (editable installs, running tests, rebuilding after Rust changes) see DEVELOPMENT.md.
Quickstart
import numpy as np
from pes_analyzer.saddle import find_iwf_grid
from pes_analyzer.extrema import find_minima_grid
# A toy 2x5 PES: two basins at (0, 0) and (0, 4) along the top row,
# separated by a hump that peaks at (0, 2). The bottom row is a high
# wall, so any path between the basins must cross the hump.
energies = np.array([
[0.0, 1.0, 2.0, 1.0, 0.0],
[3.0, 3.0, 3.0, 3.0, 3.0],
])
print(find_minima_grid(energies))
# [((0, 0), 0.0), ((0, 4), 0.0)]
print(find_iwf_grid(energies, start=(0, 0), end=(0, 4)))
# ((0, 2), 2.0)
API at a glance
| Function | Purpose | Reference |
|---|---|---|
grid.build_dense(coords, values) |
sparse rows → dense N-D array | API.md |
saddle.find_iwf_grid(energies, start, end) |
watershed saddle search | API.md |
extrema.find_minima_grid(energies, *, neighborhood_range=1, confirm_range=None) |
local minima (Chebyshev stencil) | API.md |
extrema.find_maxima_grid(energies, *, neighborhood_range=1, confirm_range=None) |
local maxima (dual of find_minima_grid) |
API.md |
extrema.find_extrema_grid(energies, *, neighborhood_range=1, confirm_range=None) |
combined single-sweep search | API.md |
Documentation
API.md— full API reference with examples.ARCHITECTURE.md— repo layout, Python/Rust seam, GIL handling.ALGORITHMS.md— how the watershed and minima algorithms work.DEVELOPMENT.md— building, testing, common workflows.
License
MIT — see Cargo.toml.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pes_analyzer-0.6.0.tar.gz.
File metadata
- Download URL: pes_analyzer-0.6.0.tar.gz
- Upload date:
- Size: 66.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9417d0ddc4b9989e559e0bb37fab931f6bd6c175ac194a40cde88ddd4aee47fa
|
|
| MD5 |
b37b0c671c90888049e74bff2a62ab3e
|
|
| BLAKE2b-256 |
e1c2fcdef539cb1407f305ad0c0276e28b011600e61cb3e8fc944766ee7c18dd
|
File details
Details for the file pes_analyzer-0.6.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pes_analyzer-0.6.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 272.8 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c749eef5a25cf88f94e1a02d6c1b79419f56ce1417f3f3cd830ddcbd62bd880
|
|
| MD5 |
dfadd240724210da4110921bee6b09a3
|
|
| BLAKE2b-256 |
6b95857afaf5399cc8f7ee35ac564a5679a3250811bee3c33e9006f310a33f75
|