Balance chemical equations and generate printable forms
Project description
reaction-balancer
A precise chemical-equation balancer that uses exact rational arithmetic and CIAAW atomic weights to generate printable reaction preparation sheets (Excel format) from Markdown input.
Features
1. Exact scientific computation
- Uses CIAAW (2024) standard atomic weights.
- All internal math uses sympy.Rational (exact fractions), eliminating floating-point errors.
- Linear algebra–based solver ensures correct balancing or gives an informative error if impossible.
2. Flexible input syntax
- Supports parentheses and fractional subscripts:
Ni(NO3)2(H2O)6Fe7/8SeLa1.8Sr0.2CuO4.12
- Optional basis specification (e.g., ) allows partial balancing, which is useful for sol–gel and oxide-precursor routes.
3. Automatic Excel output
- Produces a ready-to-print xlsx recipe sheet with formatted layout.
- Column widths, styles, and alignment handled automatically—no manual editing required.
4. Reproducible and traceable
- Input is a Markdown document, allowing you to record:
- sample IDs
- furnace schedule
- experimental notes
- Perfect for lab notebooks and long-term traceability.
5. Designed for materials synthesis
Suitable for:
- solid-state reactions
- flux growth
- hydrothermal / sol-gel precursor balancing
- cuprates, pnictides, nickelates, chalcogenides, and general inorganic synthesis
Installation
pip install balancer
or if using uv:
uv tool install balancer
Usage
Run this command in a directory:
balancer
If input.md is missing, the program automatically creates a template in your working directory.
You may also specify an explicit filepath:
balancer <filepath>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
reaction_balancer-2.0.0.tar.gz
(20.5 kB
view details)
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 reaction_balancer-2.0.0.tar.gz.
File metadata
- Download URL: reaction_balancer-2.0.0.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4de3692f02643190888be2d8becb83f42fc9b9be0a6fbff6808922b60299ced1
|
|
| MD5 |
7596537bb8e5258ea1adce5d9904d376
|
|
| BLAKE2b-256 |
383d06997f6cb0c1c38d365677b5d65c162b140bab084de90384252090ac420e
|
File details
Details for the file reaction_balancer-2.0.0-py3-none-any.whl.
File metadata
- Download URL: reaction_balancer-2.0.0-py3-none-any.whl
- Upload date:
- Size: 20.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa32936d9e862c1de0bd92b87f1398e464d165b0b01282b6e93c4c067bb95f5e
|
|
| MD5 |
b105feb2193f48d5f0fd22db11aefc95
|
|
| BLAKE2b-256 |
4446f4ad2f50a292bfec3e9e19f29858a4661d5349f16af4b2662adb8f0ae4d8
|