Differentiable models of enzyme-catalysed reaction networks
Project description
Enzax
Enzax is a library of automatically differentiable equations and solvers for modelling networks of enzyme-catalysed reactions, written in JAX.
Enzax provides straightforward, fast and interoperable access to the gradients of realistic metabolic network models, allowing you to incorporate these models in your MCMC and machine learning algorithms when you want to, for example, predict the effect of down-regulating an enzyme on the yield of a fermentation experiment.
Installation
pip install enzax
Usage
Find a kinetic model's steady state
from enzax.examples import methionine
from enzax.steady_state import get_kinetic_model_steady_state
from jax import numpy as jnp
guess = jnp.full((5,) 0.01)
steady_state = get_steady_state(methionine.model, guess, methionine.parameters)
Find a steady state's Jacobian with respect to all parameters
import jax
from enzax.examples.methionine import model, parameters
from enzax.steady_state import get_steady_state
from jax import numpy as jnp
guess = jnp.full((5,), 0.01)
jacobian = jax.jacrev(get_steady_state, argnums=2)(model, guess, parameters)
jacobian["log_kcat"]["GNMT1"]
Array([-3.83561770e-07, -9.66801636e-06, 3.38183140e-10, 3.15564928e-09,
5.28588273e-08], dtype=float64, weak_type=True)
Load a kinetic model from an sbml file
from enzax.sbml import load_libsbml_model_from_url, sbml_to_enzax
url = "https://raw.githubusercontent.com/dtu-qmcm/enzax/refs/heads/main/tests/data/exampleode.xml"
libsbml_model = load_libsbml_model_from_url(url)
# or to load an sbml file from your computer:
# libsbml_model = load_libsbml_model_from_file(path_to_file)
model, parameters = sbml_to_enzax(libsbml_model)
[!NOTE] The parameters in the sbml file have to have unique identifiers. In CopasiUI it is possible to make Global Quantities as assignments and odes. Enzax currently does not support this.
Project details
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 enzax-0.2.2.tar.gz.
File metadata
- Download URL: enzax-0.2.2.tar.gz
- Upload date:
- Size: 76.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e98cfa310299f0c52f772f1aea90c116eb2487bdc4097b2c4a76be601b99d3fe
|
|
| MD5 |
3b5af15c8f45d5568453663226dcf613
|
|
| BLAKE2b-256 |
7dab3187fe8402eeda4a285975f2673755ed40198d64ef8e85e1d40ac3e8a651
|
Provenance
The following attestation bundles were made for enzax-0.2.2.tar.gz:
Publisher:
release.yml on dtu-qmcm/enzax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
enzax-0.2.2.tar.gz -
Subject digest:
e98cfa310299f0c52f772f1aea90c116eb2487bdc4097b2c4a76be601b99d3fe - Sigstore transparency entry: 814730236
- Sigstore integration time:
-
Permalink:
dtu-qmcm/enzax@2fd860c0e6a7ae4fa7220e56c4fec174f4b5da0a -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/dtu-qmcm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2fd860c0e6a7ae4fa7220e56c4fec174f4b5da0a -
Trigger Event:
push
-
Statement type:
File details
Details for the file enzax-0.2.2-py3-none-any.whl.
File metadata
- Download URL: enzax-0.2.2-py3-none-any.whl
- Upload date:
- Size: 49.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a450c71ec187f6f4510cc2bbf773b64a39ec48a168b3ce09589dae2f1dc049b
|
|
| MD5 |
113d76e044acbf5192568ab00df7fd93
|
|
| BLAKE2b-256 |
95d5b1fd9489dde353200fb95077a1fc407af7658d8cf1539b4f8b2590478b21
|
Provenance
The following attestation bundles were made for enzax-0.2.2-py3-none-any.whl:
Publisher:
release.yml on dtu-qmcm/enzax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
enzax-0.2.2-py3-none-any.whl -
Subject digest:
1a450c71ec187f6f4510cc2bbf773b64a39ec48a168b3ce09589dae2f1dc049b - Sigstore transparency entry: 814730238
- Sigstore integration time:
-
Permalink:
dtu-qmcm/enzax@2fd860c0e6a7ae4fa7220e56c4fec174f4b5da0a -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/dtu-qmcm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2fd860c0e6a7ae4fa7220e56c4fec174f4b5da0a -
Trigger Event:
push
-
Statement type: