ImpregCalc
Explicit, mass-conserving recipes for supported-catalyst impregnation.
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, andCu(NO3)2·3H2Oare 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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file impregcalc-0.1.0.tar.gz.
File metadata
- Download URL: impregcalc-0.1.0.tar.gz
- Upload date:
- Size: 75.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be5d80267c4bd05647f43fc29bd2764edbb940d52428b6f27cfc550c18f38dd6
|
|
| MD5 |
6b6e4764e682a2448745519044f5d5e4
|
|
| BLAKE2b-256 |
703f008b0210b638cd52a33b9f4f1cd5fe7a88d8f912c72114ff7fd19f030906
|
Provenance
The following attestation bundles were made for impregcalc-0.1.0.tar.gz:
Publisher:
publish.yml on hdkim99/ImpregCalc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
impregcalc-0.1.0.tar.gz -
Subject digest:
be5d80267c4bd05647f43fc29bd2764edbb940d52428b6f27cfc550c18f38dd6 - Sigstore transparency entry: 2571202726
- Sigstore integration time:
-
Permalink:
hdkim99/ImpregCalc@225b81496d887a172cca095855d0bfc38049bd0b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/hdkim99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@225b81496d887a172cca095855d0bfc38049bd0b -
Trigger Event:
release
-
Statement type:
File details
Details for the file impregcalc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: impregcalc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0f1098caa2b96c6a742e61a0782697d7931381fc61a61ed7cdea4c43f1cc606
|
|
| MD5 |
f78d7db4a511ee3ab98962cc7d3af3c2
|
|
| BLAKE2b-256 |
902fc60f8f7222f2ea10ea776396d86941404b8fd49721479b5b8de365333af2
|
Provenance
The following attestation bundles were made for impregcalc-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on hdkim99/ImpregCalc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
impregcalc-0.1.0-py3-none-any.whl -
Subject digest:
d0f1098caa2b96c6a742e61a0782697d7931381fc61a61ed7cdea4c43f1cc606 - Sigstore transparency entry: 2571202870
- Sigstore integration time:
-
Permalink:
hdkim99/ImpregCalc@225b81496d887a172cca095855d0bfc38049bd0b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/hdkim99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@225b81496d887a172cca095855d0bfc38049bd0b -
Trigger Event:
release
-
Statement type: