Skip to main content

gpvolve-v2

CI Documentation PyPI Python License Streamlit App

Markov-chain evolutionary dynamics on genotype-phenotype maps. Rust-accelerated.

gpvolve-v2 lifts a gpgraph-v2 GenotypePhenotypeGraph into a Markov state model and analyzes evolutionary dynamics on top of it. Given a fitness function and a fixation model (SSWM, Moran, McCandlish, Bloom DMS, weak-mutation), it builds a row-stochastic transition matrix and computes stationary distributions, relaxation timescales, mean first passage times, transition path theory committors and reactive flux, dominant pathways, stochastic walker trajectories, PCCA+ metastable sets, and fitness peaks.

Stationary distribution of the evolutionary Markov chain drawn on the genotype graph, node size and color set by stationary probability

This is a clean-break rewrite of harmslab/gpvolve (dormant since 2020) with selective architectural inspiration from the harmsm/gpvolve fork (dormant since 2022). The two hot paths that actually scaled badly in pure Python live in Rust via PyO3 + rayon: the stochastic walker sampler (~500x faster at 2^14 states) and the BiCGSTAB committor solver (~1700x faster at 2^14 vs scipy.sparse.linalg.spsolve). Everything else (transition matrix assembly, stationary distributions, TPT setup, PCCA+) stays in vectorized numpy/scipy where it already runs under a second on 2^14 maps. See benchmarks/README.md for the measured numbers and the rationale for what is and is not in Rust.

Try it in the browser

The Streamlit showcase tours every public surface interactively: MSM builder, TPT explorer, stochastic sampler with live ESS / R-hat, PCCA+ clustering, and a live Rust-vs-Python benchmark tab. Source under examples/streamlit/.

Why v2

  • Drops the dormant msmtools dependency. PCCA+ and TPT are reimplemented natively.
  • Fast where it matters. Walker sampling and the committor solver run in Rust with rayon parallelism; the rest stays in vectorized numpy/scipy.
  • Sound convergence. Stochastic path sampling stops on a real criterion (effective sample size + Gelman-Rubin R-hat), not a Euclidean distance heuristic.
  • Typed. Full type hints, mypy --strict in CI.
  • Modern tooling. uv + maturin + pyproject.toml. Releases via python-semantic-release. OIDC-based PyPI publishing.
  • Consumes the v2 family. Hard deps on gpmap-v2 and gpgraph-v2; speaks their locked SCHEMA.md contracts.

Rust versus pure-Python runtime for the walker sampler and committor solver across state-space sizes

Install

pip install gpvolve-v2

Or with uv:

uv add gpvolve-v2

Plotting support is optional. For matplotlib:

pip install "gpvolve-v2[plot]"

Optional simulation backends (SLiM, tskit):

pip install "gpvolve-v2[sim]"

Python 3.11+. Prebuilt wheels ship for Linux (x86_64, aarch64), macOS (x86_64, aarch64), and Windows (x64).

Status

Pre-release. See CHANGELOG.md for progress and docs/migration/from-v1.md for the v1 to v2 API map.

Metadata

Release files for gpvolve-v2 1.2.1

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

Source distribution (sdist)

Source distribution for gpvolve-v2 1.2.1
File Size Uploaded
gpvolve_v2-1.2.1.tar.gz 52.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for gpvolve-v2 1.2.1
File
gpvolve_v2-1.2.1-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
gpvolve_v2-1.2.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details
gpvolve_v2-1.2.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details
gpvolve_v2-1.2.1-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details
gpvolve_v2-1.2.1-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details

Total release size: 1.9 MB

Release files / gpvolve_v2-1.2.1.tar.gz

Download URL gpvolve_v2-1.2.1.tar.gz
Size 52.3 kB
Tags Source
SHA-256 checksum
How to use checksums
470a55eb3867b7d54a588bca8bd1117cbd9deba9f43f20db8bdddaaad09d967e
BLAKE2b-256 checksum
How to use checksums
f2aebd8c7fb6d4e06645fe2725803f1550b1c60817d5698c3e953069fbd25279
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / gpvolve_v2-1.2.1-cp311-abi3-win_amd64.whl

Download URL gpvolve_v2-1.2.1-cp311-abi3-win_amd64.whl
Size 262.1 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
bba5e465bb274bea532a0779c898d6e7eab0d23e1ed041964d1bcef1c580e27d
BLAKE2b-256 checksum
How to use checksums
7d685d78838b479da1f3d940675b0b8cba26c3f004e15399f43c0c26df47fa74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / gpvolve_v2-1.2.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL gpvolve_v2-1.2.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 435.0 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
f933f18a36868f8794c59f49b9a8b92443265d6891ce4cbe3d1aa19e9865aff3
BLAKE2b-256 checksum
How to use checksums
7ea79c43564b7709267cf937a45467c610e6999b82518bdc3008de0d1875166c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / gpvolve_v2-1.2.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL gpvolve_v2-1.2.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 424.2 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
4545c8f1fdd00f07509190e1d7702c77987740ce83425a411f48b1b77302d198
BLAKE2b-256 checksum
How to use checksums
1cfaedeb35af3a775aba2f212c5f2f187e45f07123f2278de9630b88cd60b1e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / gpvolve_v2-1.2.1-cp311-abi3-macosx_11_0_arm64.whl

Download URL gpvolve_v2-1.2.1-cp311-abi3-macosx_11_0_arm64.whl
Size 380.1 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e84ba7a57b1814a5b0a996d16ea1f85f07dbfa262623951617a7d8b582111e4a
BLAKE2b-256 checksum
How to use checksums
fcccec6e7544f81ac5b69ce8db229cb2bfc2628298659cadc7543c79d2a6597d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / gpvolve_v2-1.2.1-cp311-abi3-macosx_10_12_x86_64.whl

Download URL gpvolve_v2-1.2.1-cp311-abi3-macosx_10_12_x86_64.whl
Size 381.6 kB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2cc6550e7ca5d56318c7adb004b876a6fde02cc0300855cd2e3ec4d379910d60
BLAKE2b-256 checksum
How to use checksums
1dec2ce99bd0b3c2ff5141fffe9c3c3c4809627c39939d301db7f0b8d419fcf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

1.2.2

6 release files

This release

1.2.1 This release

6 release files

1.2.0

6 release files

1.1.0

6 release files

1.0.2

6 release files

1.0.1

6 release files

1.0.0

6 release files

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