Skip to main content

AdsorpQC

CI PyPI version Python versions License: MIT DOI

Automated Quality-Control, GCMC Burn-in Detection, Isotherm Model Fitting, and Reproducibility Toolkit for Adsorption Simulations in Nanoporous Materials.


Overview

AdsorpQC is an open-source scientific software toolkit tailored for the rigorous validation and certification of molecular adsorption simulations (Grand Canonical Monte Carlo, GCMC, RASPA, LAMMPS) and experimental gas isotherms in MOFs, COFs, Zeolites, and Porous Carbons.

In GCMC simulations, reporting average loadings before reaching true thermodynamic equilibrium (under-equilibrated burn-in) or during unresolved systematic drift leads to invalid capacities. adsorpqc addresses this with an automated quality-control pipeline in a single command:

  • ⏳ Automated GCMC Burn-in Detection:
    • Maximizes the number of statistically independent production samples ($N_{\text{eff}}$).
    • Automatically identifies and truncates un-equilibrated initialization cycles.
  • 📉 Loading Drift & Stationarity Audit:
    • Compares the first and last 20% of the production phase. The drift is flagged only when it is statistically significant against the autocorrelation-corrected noise ($z > 2$ / $z > 3$) and large relative to the mean.
    • Generates clear safety alerts: "DO NOT REPORT PRODUCTION AVERAGE" if the drift is significant ($z > 3$) and larger than 8% of the mean.
  • 🧪 Non-Linear Isotherm Fitting & Model Selection:
    • Fits Langmuir, Dual-Site Langmuir (DSLG), Sips (Langmuir-Freundlich) and Toth models.
    • Selects the model with the lowest small-sample corrected Akaike Information Criterion (AICc), and reports $R^2$ and RMSE.
  • ⚡ Thermodynamic Energetics & Selectivity:
    • Henry coefficient ($K_H$), obtained by extrapolating $q/P$ to zero loading. On RASPA3 methane/MFI data it agrees with Widom insertion within 0.1%.
    • Isosteric heat of adsorption ($q_{\text{st}}$), from the $\mu VT$ particle–energy fluctuation formula. It needs the number of molecules and the energy with explicit units; RASPA3's own value is read when available.
    • Ideal Adsorbed Solution Theory (IAST) binary mixture selectivity ($S_{A/B}$) with 95% Bootstrap Confidence Intervals. This part has not yet been validated against an independent IAST implementation.
  • 📑 Publication Deliverables:
    • Interactive self-contained report.html dashboard.
    • Vector publication plots (Isotherm fit curves, GCMC burn-in shaded trajectory) in SVG, PDF, PNG (300 DPI).
    • Ready-to-compile LaTeX summary tables (.tex).
    • Draft Methods text paragraph and BibTeX citation (citation.bib).
    GCMC Simulation (RASPA) / Isotherm CSV
                      │
                      ▼
  ┌───────────────────────────────────────────────────────────┐
  │                         AdsorpQC                          │
  │  ├── Automated GCMC Burn-in / Equilibration Cutoff        │
  │  ├── Production Loading Drift & Stationarity Audit        │
  │  ├── Non-Linear Isotherm Fitting (Langmuir, Sips, Toth)   │
  │  ├── Henry Constant (K_H) & Isosteric Heat (q_st)        │
  │  └── IAST Selectivity (S_A/B) with Bootstrap 95% CI       │
  └───────────────────────────────────────────────────────────┘
                      │
                      ▼
  ┌───────────────────────────────────────────────────────────┐
  │                   Publication Deliverables                │
  │  ├── report.html (Interactive Dashboard & Badges)         │
  │  ├── adsorpqc_isotherm_fit.pdf/svg/png                    │
  │  ├── adsorpqc_gcmc_burnin_trajectory.pdf/svg/png         │
  │  ├── adsorpqc_summary_table.tex / .csv                    │
  │  ├── methods_snippet.txt (Ready for Manuscript)           │
  │  └── citation.bib (BibTeX Reference)                      │
  └───────────────────────────────────────────────────────────┘

Installation

From PyPI

pip install adsorpqc

From Source

git clone https://github.com/sircalch/adsorpqc.git
cd adsorpqc
pip install -e .[dev]

Quickstart (CLI)

1. Run Benchmark Demo (Instant GCMC + Isotherm Simulation)

adsorpqc demo -o my_adsorption_audit/

Open my_adsorption_audit/report.html in your browser to explore the interactive dashboard!

2. Assess Isotherm CSV File

adsorpqc assess -i my_isotherm.csv --framework "Mg-MOF-74" --adsorbate "CO2" --temp 298.15 -o output_report/

3. Assess RASPA Simulation Output

# one RASPA3 run (output/output_<T>_<P>.s0.txt) or RASPA2 run (output_*.data)
adsorpqc assess -i output/output_300_1e+05.s0.txt -o raspa_audit/
# a folder of RASPA runs, one pressure each; Widom runs are compared with the isotherm K_H
adsorpqc assess -i runs/ -o raspa_isotherm/

Python API Usage

import numpy as np
from adsorpqc import assess_adsorption_quality
from adsorpqc.parsers import parse_isotherm_csv
from adsorpqc.reporters import generate_adsorption_figures, generate_adsorption_manuscript_assets, generate_adsorption_html_report

# 1. Parse isotherm data
data = parse_isotherm_csv("co2_isotherm.csv")

# 2. Assess quality and fit models
report = assess_adsorption_quality(
    metadata={"framework": "HKUST-1", "adsorbate": "CO2", "temperature_k": 298.15},
    pressure_isotherm=data["pressure"],
    loading_isotherm=data["loading"],
    temperature_k=298.15
)

print(f"Overall Certification: {report.overall_status}")
print(f"Optimal Model: {report.isotherm_fits['best_model_name']} (R^2 = {report.isotherm_fits['best_r_squared']:.4f})")

# 3. Export all publication assets
generate_adsorption_figures(report, "output_dir/", pressure_raw=data["pressure"], loading_raw=data["loading"])
generate_adsorption_manuscript_assets(report, "output_dir/")
generate_adsorption_html_report(report, "output_dir/report.html")

Citation

If you use AdsorpQC in your publications, please cite:

@software{monreal2026adsorpqc,
  author = {Monreal-Hern{\'a}ndez, Andre},
  title = {{AdsorpQC: An Open-Source Toolkit for Quality-Control, GCMC Burn-in Detection, Isotherm Fitting, and Reproducibility Assessment of Adsorption Simulations}},
  year = {2026},
  version = {1.0.0},
  publisher = {Zenodo},
  url = {https://github.com/sircalch/adsorpqc}
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for adsorpqc 1.1.0

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

Source distribution (sdist)

Source distribution for adsorpqc 1.1.0
File Size Uploaded Provenance
adsorpqc-1.1.0.tar.gz 38.1 kB With provenance Details

Built distribution (wheel)

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

Total release size: 74.9 kB

Release files / adsorpqc-1.1.0.tar.gz

Download URL adsorpqc-1.1.0.tar.gz
Size 38.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5463619af579422f94354d87fdec4584297f9eb8cf08f4dd512ed34557e2f7ac
BLAKE2b-256 checksum
How to use checksums
be87adcdca2c2932019b2a13435fff49c3cfd55bc8ed203977cbb2b5250421d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 30, 2026.

Transparency log

Release files / adsorpqc-1.1.0-py3-none-any.whl

Download URL adsorpqc-1.1.0-py3-none-any.whl
Size 36.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80ce3e1f1de6ccb35fd36ad49397203a56f75a884550018e2e8c03ddcb370acf
BLAKE2b-256 checksum
How to use checksums
2ac62d442d204589aecbf8cd6e2db958111d285c3389902e40e1b13f61091453
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 30, 2026.

Transparency log

Security for adsorpqc 1.1.0

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 adsorpqc-1.1.0.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 Sep 30, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.0 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