equilibrator-pathway-core
Max-min driving force (MDF) and enzyme cost minimization (ECM) for fully specified pathway models, with no compound database.
This is the lower layer of equilibrator-pathway. It analyses model SBtab files that already carry everything the optimisation needs -- stoichiometry, concentration bounds, fluxes and standard Gibbs energies -- and it never predicts or looks anything up. That is what lets it install in a few megabytes of Python on top of numpy, including in the browser via Pyodide.
| this package | equilibrator-pathway | |
|---|---|---|
| MDF, ECM on a model SBtab | yes | yes (re-exported) |
| network SBtabs, formula search, identifier resolution | -- | yes |
| dG'0 prediction (Component Contribution) | -- | yes |
| dG'0 uncertainty, MDMC | -- | yes |
pint Q_ public API |
-- | yes |
| compound database, sqlalchemy, pint | never | yes |
Units
Everything here works on plain floats in one canonical set of units -- M,
kJ/mol, K, 1/s, Da -- documented in equilibrator_pathway_core.constants.
Units are attached at the boundary, by equilibrator-pathway's pint adapter or by
the browser client's string parser.
Staying small
Importing this package must not pull in the equilibrator database stack. That is
tested directly, in a fresh interpreter, by tests/test_isolation.py, which
fails if equilibrator_api, equilibrator_cache, component_contribution,
sqlalchemy, pint or matplotlib appear in sys.modules. A dependency added
to pyproject.toml without the code that needs it is equally unwelcome.
Status
In place:
| module | what | needs sbtabpy |
|---|---|---|
constants.py |
R, T, standard concentrations | -- |
ecm.py |
the enzyme cost function and ECM | -- |
mdf.py |
the MDF linear program | -- |
errors.py |
ModelError, SolverFailure, ConfigurationError |
-- |
units.py |
unit strings to canonical floats | -- |
model.py |
model SBtab to arrays: S, bounds, fluxes, dG'0, water | yes |
ecm_model.py |
an ECM model's Parameter table | yes |
solution.py |
result tables and the SBtab report | yes |
configuration.py |
the editable Configuration options, their schema, and applying edits | yes |
Both equilibrator-pathway and the browser client run MDF and ECM through this
package; the browser also reads models (model.load_model), edits their
Configuration (configuration.py) and writes reports with it.
The SBtab modules use sbtabpy directly, and need sbtabpy 1.1.1 or later.
1.1.0 was the first release with no required dependencies (earlier ones
declared pandas, pyarrow, python-libsbml and openpyxl, which its parser never
imports); 1.1.1 added the dictionary rows, attribute defaults and pandas-free
SBtabTable.from_rows that replaced the core's own adapter module.
tests/test_isolation.py still forbids all four: nothing installs them by
default now, but the test is what guarantees the core never imports them, and
so stays loadable in the browser.
The extraction plan is in
enzyme-cost-minimization-webapp/CORE_EXTRACTION_PLAN.txt. Correctness is held
to the golden results frozen in that repository (tests/golden/), which record
what equilibrator-pathway and the browser port each produced while they were
still independent implementations. After the move, both consumers reproduce
every one of those 482 numbers bit for bit, not merely within the checker's
1e-6 tolerance.
Where the two replaced copies disagreed, see the docstring of ecm.py for
which behaviour was kept and why. In short: the port's get_volumes (the
server's zeroed the last metabolite when a model had no water), and working
versions of get_fluxes and is_feasible, which raised on every call in
equilibrator-pathway without any test noticing.
PYTHONPATH=src pytest tests/
Release files for equilibrator-pathway-core 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| equilibrator_pathway_core-0.1.0.tar.gz | 43.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| equilibrator_pathway_core-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 81.9 kB
Release files / equilibrator_pathway_core-0.1.0.tar.gz
| Download URL | equilibrator_pathway_core-0.1.0.tar.gz |
|---|---|
| Size | 43.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b893fcccc1e9ee159ec13b9a598fa1db94914bf3aeb8d021070cc1df95eba2b4
|
|
BLAKE2b-256 checksum How to use checksums |
db1cd3d8623765103ba9e0fcfc3309cdfc62433985dfc8ce256a0d89d6003d7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / equilibrator_pathway_core-0.1.0-py3-none-any.whl
| Download URL | equilibrator_pathway_core-0.1.0-py3-none-any.whl |
|---|---|
| Size | 38.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
103e8304395a1ded6a19f93da3c9a28ff202e485d5f6ca6d50f837847a77637d
|
|
BLAKE2b-256 checksum How to use checksums |
0c673592bab41eb480ff750062a4630a7b38c86635ca60cfd1558f7772c130dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|