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_kinetic_model_steady_state(methionine.model, guess)
Find a steady state's Jacobian with respect to all parameters
import jax
from enzax.examples import methionine
from enzax.steady_state import get_kinetic_model_steady_state
from jax import numpy as jnp
from jaxtyping import PyTree
guess = jnp.full((5,) 0.01)
model = methionine.model
def get_steady_state_from_params(parameters: PyTree):
"""Get the steady state with a one-argument non-pure function."""
_model = RateEquationModel(
parameters, model.structure, model.rate_equations
)
return get_kinetic_model_steady_state(_model, guess)
jacobian = jax.jacrev(get_steady_state_from_params)(model.parameters)
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
enzax-0.1.2.tar.gz
(45.9 kB
view details)
Built Distribution
enzax-0.1.2-py3-none-any.whl
(15.2 kB
view details)
File details
Details for the file enzax-0.1.2.tar.gz
.
File metadata
- Download URL: enzax-0.1.2.tar.gz
- Upload date:
- Size: 45.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82ca7847fd6b954006669b0c38a2b5b9f11496c867da9b3ab14fa30fd0490b56 |
|
MD5 | f2eaac59047bc4056646d9025f195630 |
|
BLAKE2b-256 | a919e8d307f2a526643b198c62c64521bf1e571779ce5cd9b78ebfc6bb785c4b |
File details
Details for the file enzax-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: enzax-0.1.2-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2be61431192893f084dd6fd70b48f80f157fcc338eb8ce679d77af22a3226d9 |
|
MD5 | 9990f2940a15019d16e49ed6add1de85 |
|
BLAKE2b-256 | ced312ea1cdd177493f66e53c3ef200baca333e6be42421e3108822e2f519a1d |