Skip to main content

ImpregCalc

Explicit, mass-conserving recipes for supported-catalyst impregnation.

DGX CI macOS License: MIT Python 3.10–3.13

A result-derived ImpregCalc recipe figure

ImpregCalc answers a narrow laboratory question: what mass of each specified precursor should I weigh, and what nominal liquid volume follows from my explicitly chosen loading convention? It keeps elemental-metal, metal-oxide, and precursor loadings separate; it also keeps final-catalyst and support-relative denominators separate.

Why

15 wt% Co, 15 wt% Co3O4, and 15 wt% cobalt nitrate are different recipes. Hydrate state and assay/purity change the mass to weigh. A promoter atomic ratio couples to the main component mass. ImpregCalc records these choices in the input and in every exported result instead of silently guessing them.

Install

ImpregCalc is currently source-installable while the first PyPI release is prepared:

git clone https://github.com/hdkim99/ImpregCalc.git
cd ImpregCalc
python3 -m venv .venv
source .venv/bin/activate
python -m pip install .

XLSX and publication-figure export are optional:

python -m pip install ".[xlsx,plot]"

The GUI uses Python's Tkinter/ttk. On macOS, use a Python distribution built with Tcl/Tk support. python -c "import tkinter" should succeed.

30-second example

The included example specifies 15 wt% elemental Co on a final-formulated-catalyst basis, a Ru:Co atomic ratio of 0.01, hydrated cobalt nitrate at 98% assay, 8 g of support, and two arithmetic impregnation cycles:

impregcalc validate examples/co_ru_iwi.json
impregcalc calculate examples/co_ru_iwi.json --output recipe.md
impregcalc calculate examples/co_ru_iwi.json --output recipe.xlsx
impregcalc calculate examples/co_ru_iwi.json --plot recipe.svg

The same core is available from Python:

from impregcalc import calculate_recipe

result = calculate_recipe("examples/co_ru_iwi.json")
print(result.requirements[0].commercial_precursor_mass_g)
print(result.mass_closure_residual_g)

GUI

python -m impregcalc.gui
# or: impregcalc-gui

The main GUI workflow performs a real single-target calculation, displays the full recipe and assumptions, and exports Markdown, JSON, CSV, or XLSX. Co-impregnation and promoter-ratio workflows are available through JSON, CLI, and Python API in 0.1.0; the compact GUI does not yet provide multi-target editors.

Tkinter is intentionally used instead of Qt. The core and CLI do not import Tkinter, matplotlib, PyQt, or PySide. Result figures use the explicit non-interactive Agg backend and are exported as PNG, SVG, or PDF.

Scientific basis

  • Hydrate-dot formulas such as Co(NO3)2·6H2O, Ni(NO3)2·6H2O, Fe(NO3)3·9H2O, and Cu(NO3)2·3H2O are parsed into integer elemental counts.
  • Coupled final-basis and support-relative loadings are solved from one component mass balance.
  • Oxide targets use the specified oxide stoichiometry; purity scales the commercial precursor mass, not the requested active-component mass.
  • Promoters may be specified by an elemental atomic ratio to a named main target.
  • IWI nominal volume is dry support mass × supplied pore volume. It is reported as a planning value, not as a universal wetting truth.

Equations, derivations, atomic-weight policy, and peer-reviewed references are in docs/scientific-basis.md.

Validation

The test suite covers hand-calculated elemental and oxide loadings, hydrated precursors, purity, co-impregnation, atomic-ratio promoters, mass closure, nominal IWI volume, wet impregnation, cycle splits, invalid compositions, exports, CLI/core import isolation, and GUI calculation/export/close lifecycle. See docs/validation.md.

Real-data validation is pending. The repository does not label a synthetic or manually constructed recipe as a literature-data validation.

Scope and limitations

ImpregCalc is recipe arithmetic, not a catalyst-structure simulator. Version 0.1.0:

  • supports IWI and wet-impregnation liquid planning;
  • does not calculate precipitation, sol-gel, hydrothermal, or deposition kinetics;
  • does not contain an asserted solubility database or declare a recipe feasible or impossible from concentration alone;
  • does not predict pore filling, adsorption, drying redistribution, calcination loss, phase formation, dispersion, morphology, activity, or safety;
  • treats multi-cycle preparation as an arithmetic allocation only;
  • rejects charges, variable hydrate states (xH2O), fractional stoichiometry, and isotopically enriched formulas rather than guessing them.

Supported platforms

  • Python: 3.10–3.13 (3.14 is locally smoke-tested but not yet in the supported range)
  • macOS CI: macOS 15 on Apple Silicon and Intel, Python 3.10 and 3.13
  • local macOS validation: macOS 27.0, Apple Silicon, Python 3.14.7, Tk 9.0
  • scientific CI: Linux ARM64 DGX self-hosted runner
  • GUI: Tkinter/ttk; no Qt dependency

See docs/macos.md for the support matrix and diagnostic commands.

Development

python -m pip install -e ".[dev,plot]"
ruff format --check .
ruff check .
mypy src
pytest
python -m build
twine check dist/*

Scientific contributions must state the definition, units, assumptions, reference, and a numerical regression case. See CONTRIBUTING.md.

Metadata

Release files for impregcalc 0.1.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 impregcalc 0.1.1
File Size Uploaded Provenance Actions
impregcalc-0.1.1.tar.gz 75.2 kB With provenance Details for impregcalc-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 101.1 kB

Release files / impregcalc-0.1.1.tar.gz

Download URL impregcalc-0.1.1.tar.gz
Size 75.2 kB
Tags Source
SHA-256 checksum
How to use checksums
22a0f785c0cba22a0f9abba10b0ef77c2e01f4f1de13885b711246b781919fa2
BLAKE2b-256 checksum
How to use checksums
89e52a29a0ccb004e6a41c9fb166dea1c99e52601530a0c8f2fe3caf33119804
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 15, 2026.

Transparency log

Release files / impregcalc-0.1.1-py3-none-any.whl

Download URL impregcalc-0.1.1-py3-none-any.whl
Size 25.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fdb7a986f4092dbf8f87be95e3d44074a80d882089c89219fbf7b0af419a63fd
BLAKE2b-256 checksum
How to use checksums
0f0f0a44a1f1d80fc9f45441b0c81e59011885b1df1ccf5038d368a25ec013c6
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 15, 2026.

Transparency log

Security for impregcalc 0.1.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 impregcalc-0.1.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 15, 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

0.1.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