Repository Layout
The repository is organized as a Cargo workspace with two Rust packages:
alchemrs: the core library crate and CLI binaryalchemrs-py: the Python binding crate built as acdylib
The surrounding top-level directories then hold tests, examples, fixtures,
documentation, the python/ package wrapper, and pyproject.toml for the
repo-local Python build workflow.
alchemrs library layout
The alchemrs crate is organized into modules rather than separate library crates:
data: domain types and scientific data-model structures, including ATM schedules and sampleserror: shared crate-level error handlingparse: engine-specific parsers for AMBER outputs and GROMACSdhdl.xvgfilesprep: time-series preparation such as duplicate cleanup, sorting, equilibration detection, and decorrelationestimators: TI, BAR, MBAR, IEXP, DEXP, NES, UWHAM, and ATM implementationsanalysis: overlap diagnostics, schedule advisors, and plot-ready convergence seriesplot: optional SVG rendering helpers behind theplottingfeature
The crate root also re-exports the most common types and functions directly for a flatter API.
alchemrs-py package
alchemrs-py is a separate Rust package in the same workspace. It provides the
native Python extension layer and depends on the core alchemrs crate, but the
dependency does not go the other way.
python/ package wrapper
The python/ directory contains:
- the importable
python/alchemrspackage - OpenMM helper utilities in
python/alchemrs/openmm.py - runnable Python examples
- Python-side tests
pyproject.toml points maturin at alchemrs-py/Cargo.toml and stages the
extension into that package layout.
CLI binary
The alchemrs binary wraps parsing, preprocessing, estimation, and output formatting into a command-line workflow. The scientific logic lives in the library; the CLI is a thin consumer of that API.
Layering
The intended dependency direction inside the library is:
parse -> data + error
prep -> data + error
estimators -> data + error
analysis -> data + error + estimators
The CLI depends on the core library crate, and alchemrs-py depends on the
same core library crate through the workspace.