Skip to main content

Quick and easy analysis of the data from the flat histogram simulations

Tests Ruff Docs Codecov PyPI Python versions License Paper DOI

ASAF (Adsorption Simulation Analysis Facilitator) is a python library created to facilitate the processing and analysis of data from grand canonical transition matrix Monte Carlo adsorption simulations.

Features:

  • calculation of the macrostate probability distribution (MPC) from the transition probabilities
  • interpolation of the transition probabilities
  • calculation of the adsorption isotherm from the MPD
  • calculation of the free energy from the MPD
  • temperature extrapolation of the macrostate probability distribution
  • saving the isotherms to an AIF file

Installation

For the latest PyPI release:

pip install asaf

For the development version:

pip install "asaf @ git+https://github.com/bartoszmazurwro/asaf.git"

Development

ASAF uses uv for local development. To set up the repository:

git clone https://github.com/bartoszmazurwro/asaf.git
cd asaf
uv sync --locked --all-extras --dev
uv run pytest

See CONTRIBUTING.md for the full development, testing, and release workflow.

Citing

If you use ASAF in your work, please consider citing the following paper:

Efficient Modeling of Water Adsorption in MOFs Using Interpolated Transition Matrix Monte Carlo, B. Mazur, L. Firlej, and B. Kuchta, 2024, ACS Appl. Mater. Interfaces, DOI: 10.1021/acsami.4c02616.

FAQ

In my prob files I see current_cycle column instead of macrostate.

That's because you're looking at a prob file for a simulation in a particular macrostate. To calculate the macrostate probability distribution you need at least several simulations in different macrostates. The diagram below explains the scheme for creating the prob file used by ASAF from prob files generated by RASPA.

I don't have .metadata.json file.

Currently, the only options are to create this file manually (for example, by copying one of the example files and modifying it) or to add a function to your workflow that generates such a file based on RASPA input files. In the future, ASAF will be able to do this.

Prob files are not generated.

Make sure that you are using modified version of RASPA.

My prob files are huge

In general, you can play with PrintGhostProbabilitesEvery parameter. A more frequent print will be useful when you want to use energy fluctuations to extrapolate MPD, otherwise a value similar to that used in PrintEvery will be sufficient to monitor the simulation.

Metadata

Release files for asaf 0.0.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 asaf 0.0.1
File Size Uploaded Provenance
asaf-0.0.1.tar.gz 836.4 kB With provenance Details

Built distribution (wheel)

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

Total release size: 869.0 kB

Release files / asaf-0.0.1.tar.gz

Download URL asaf-0.0.1.tar.gz
Size 836.4 kB
Tags Source
SHA-256 checksum
How to use checksums
013dc3135e575412c8320abb57d4a966c327e95ab9479099c49f44894212c908
BLAKE2b-256 checksum
How to use checksums
d9c082b4fb8c2f89c9b1371ac8387a0bae582ecac0505cf844b18c0c81d859bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 9, 2026.

Transparency log

Release files / asaf-0.0.1-py3-none-any.whl

Download URL asaf-0.0.1-py3-none-any.whl
Size 32.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99b4ce2f6cbd6b4bad9749f6f74119fb052112150fae98fa46ecfecc5e834fb4
BLAKE2b-256 checksum
How to use checksums
904fe88f6afa91e4c19ff9da1bbe20d9316f02f7304272e86d355f31e42a7082
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 9, 2026.

Transparency log

Security for asaf 0.0.1

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for asaf-0.0.1.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 Jun 9, 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.

Release history Release notifications | RSS feed

This release

0.0.1 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