Skip to main content

A JAX-based framework for (neural) ODE modelling in biocatalysis.

Project description

Catalax

Catalax is a JAX-based framework that facilitates simulation and parameter inference through optimization algorithms and Hamiltonian Monte Carlo sampling. Its features enable efficient model building and inference, including the utilization of neural ODEs to model system dynamics and serve as surrogates for the aforementioned techniques.

🚧 Please note that Catalax is still in early development and the API is subject to change. 🚧

Getting started

To get started with Catalax, you can install it via pip:

MacOS / Linux

python3 -m pip install git+https://github.com/JR-1991/Catalax.git

Windows

python -m pip install git+https://github.com/JR-1991/Catalax.git

Quickstart

To develop a model, Catalax offers a user-friendly interface that comprises two core components: Species and ODE. The former is utilized to specify the species of the model, while the latter is used to define its dynamics. Through the integration of these components, a robust model is created, which can be employed for inference purposes. Notably, Catalax automatically generates Parameter objects from the extracted parameters, which can be leveraged to define priors and constraints for the model.

import catalax as ctx

model = ctx.Model(name="My Model")

# Define the species of the model
model.add_species(s1="Substrate", e1="Enzyme")

# Now add an ODE for each species
model.add_ode("s1", "k_cat * e1 * s1 / (K_m + s1)")
model.add_ode("e1", "0", observable=False)

# All parameters [k_cat, K_m] are automatically extracted
# and can be accessed via model.parameters
model.parameters.k_cat.value = 5.0
model.parameters.K_m.value = 100.0

# Integrate over time
initial_condition = {"s1": 100.0, "s2": 0.0}
time, states = model.simulate(
    initial_conditions=initial_condition,
    t0=0, t1=100, dt0=0.1, nsteps=1000, in_axes=None
)

# Visualize the results
f = visualize(
    model=model,
    data=states, # Replace this with actual data
    times=time,
    initial_conditions=initial_conditions,
    figsize=(4,4),
)

Give it a try!

To get a better understanding of Catalax, we recommend that you try out the examples found in the examples directory. These examples are designed to showcase the capabilities of Catalax and provide a starting point for your own projects:

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

catalax-0.3.0.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

catalax-0.3.0-py3-none-any.whl (41.6 kB view details)

Uploaded Python 3

File details

Details for the file catalax-0.3.0.tar.gz.

File metadata

  • Download URL: catalax-0.3.0.tar.gz
  • Upload date:
  • Size: 32.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.0 Linux/6.2.0-1012-azure

File hashes

Hashes for catalax-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4fecb72a46510893f8705947b424d706c7685e985d990c5ddd03723fb37fb03c
MD5 05a2e8afd073a251e8436f46d37200c2
BLAKE2b-256 f9d27d3c81a99094855f8139080f80441632bd9dd347975aaa6ceff4d3a5a86a

See more details on using hashes here.

File details

Details for the file catalax-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: catalax-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 41.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.0 Linux/6.2.0-1012-azure

File hashes

Hashes for catalax-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05c99691eab709aa1afc6f16147a07d90ad2d1dde5403c21298f8ad2618d43ed
MD5 4329ec0f274b72d89c6efc10bc020cf5
BLAKE2b-256 3072b2eaccd85b917e28f527720a8e7d65d584f88d07351a425da04918e7fdad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page