Skip to main content

Library to facilitate the processing and analysis of data from the grand canonical transition matrix Monte Carlo adsorption simulations.

Project description

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.

[!WARNING] ASAF is under active development. Backward compatibility with older versions is not currently guaranteed.

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.

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

asaf-0.0.1.tar.gz (836.4 kB view details)

Uploaded Source

Built Distribution

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

asaf-0.0.1-py3-none-any.whl (32.6 kB view details)

Uploaded Python 3

File details

Details for the file asaf-0.0.1.tar.gz.

File metadata

  • Download URL: asaf-0.0.1.tar.gz
  • Upload date:
  • Size: 836.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for asaf-0.0.1.tar.gz
Algorithm Hash digest
SHA256 013dc3135e575412c8320abb57d4a966c327e95ab9479099c49f44894212c908
MD5 7dded1f7db30aa0d75cc780bde7d10a7
BLAKE2b-256 d9c082b4fb8c2f89c9b1371ac8387a0bae582ecac0505cf844b18c0c81d859bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for asaf-0.0.1.tar.gz:

Publisher: release.yml on bartoszmazurwro/asaf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file asaf-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: asaf-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 32.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for asaf-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99b4ce2f6cbd6b4bad9749f6f74119fb052112150fae98fa46ecfecc5e834fb4
MD5 81e8db47a7c5d33edf035d492a14cd1f
BLAKE2b-256 904fe88f6afa91e4c19ff9da1bbe20d9316f02f7304272e86d355f31e42a7082

See more details on using hashes here.

Provenance

The following attestation bundles were made for asaf-0.0.1-py3-none-any.whl:

Publisher: release.yml on bartoszmazurwro/asaf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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