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 data in MFI it agrees with Widom insertion within 0.2% (0.11% for CH$_4$, 0.16% for CO$_2$), inside the statistical uncertainty of the Widom estimates (about 0.7%); see validation/results/henry_summary.csv.
    • 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. Validated against pyIAST (relative difference below $10^{-11}$ across the tested model combinations; validation/iast_vs_pyiast.py) and against explicit binary GCMC for CO$_2$/CH$_4$ in MFI (adsorbed amounts within 3.8%; validation/iast_vs_gcmc.py).
  • 📑 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")

Documentation and help


Citation

If you use AdsorpQC in your publications, please cite:

@software{monreal2026adsorpqc,
  author = {Monreal-Hernández, Andrés},
  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.2.1},
  publisher = {Zenodo},
  doi = {10.5281/zenodo.22217574},
  url = {https://github.com/sircalch/adsorpqc}
}

The DOI above always resolves to the latest archived version. The repository's CITATION.cff is the canonical citation record; GitHub's "Cite this repository" button uses it.

The post-processing checks (Henry coefficients, isosteric heats, IAST and stationarity tests) are compared against RASPA3 in a public preprint (not peer reviewed):

Monreal Hernández, A., Franco Amaya, S. L., & Martínez Osorio, C. I. (2026). Checking the post-processing of adsorption simulations: Henry coefficients, isosteric heats, IAST and stationarity tests validated against RASPA3. Research Square. https://doi.org/10.21203/rs.3.rs-11626447/v1

Project page

Release record and related tools: adsorpqc on the author's site · quality-control and reproducibility family.


License

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

Metadata

Release files for adsorpqc 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 adsorpqc 1.2.1
File Size Uploaded Provenance Actions
adsorpqc-1.2.1.tar.gz 39.5 kB With provenance Details for adsorpqc-1.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 77.1 kB

Release files / adsorpqc-1.2.1.tar.gz

Download URL adsorpqc-1.2.1.tar.gz
Size 39.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5ceb86fd465c13e35f0b32bacf6da046f07c0abb5669f22f8735851db00e1199
BLAKE2b-256 checksum
How to use checksums
04c8cb95988aec0822fc142a443a50650b6fa99f2a7a544c44a3f24749b3f647
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 20, 2026.

Transparency log

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

Download URL adsorpqc-1.2.1-py3-none-any.whl
Size 37.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d88af40091d87e71cc22d2dd41f910334600fe009c256c6283079173b63a460f
BLAKE2b-256 checksum
How to use checksums
fdd600bc534ec115e4400d2301846fe2544d54ec35f5559eac58fec4a83115f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 20, 2026.

Transparency log

Security for adsorpqc 1.2.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for adsorpqc-1.2.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 Nov 20, 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.

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