Skip to main content

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.minimum.find_minima_grid — local minima on the full 3ᴺ−1 (king-move) neighbourhood (cells with no strictly-lower neighbour).
  • pes_analyzer.grid.build_dense — scatter helper that turns sparse (coords, value) rows into a dense numpy array 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.minimum 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
minimum.find_minima_grid(energies) local minima (3ᴺ−1 stencil) API.md

Documentation

License

MIT — see Cargo.toml.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pes_analyzer-0.2.1.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pes_analyzer-0.2.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (231.0 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

File details

Details for the file pes_analyzer-0.2.1.tar.gz.

File metadata

  • Download URL: pes_analyzer-0.2.1.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pes_analyzer-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f347e10c6924677c0a564a9c9c3f78e3eb8e0a9934b3bf248377f50264021e75
MD5 dd2b79c259ba5d7c7de3e54ad253dcb6
BLAKE2b-256 2c91d3c28f7b6a96b5ba45f448ee9b50f13d9c0ad21463d8b933d7c14424923d

See more details on using hashes here.

File details

Details for the file pes_analyzer-0.2.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pes_analyzer-0.2.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d8e2d8dc9ee049e069f9a15354c6ffbafcb3cd674603b9f59e6d4c7f7d9e30b
MD5 7eb767bb1ca75e6f299655d01170f210
BLAKE2b-256 8a8a14356d6dd606cdb5fc40b611aae47f157c43084127f5bf182dae3869f583

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page