Skip to main content

Latest release Tests

mgrowthctrl

A Python package for parameter inference, mechanistic microbiome modeling, and control, based on a consumer–resource model (CRM).

Detailed documentation is available at Documentation.

Key features of mgrowthctrl include:

  • An API for defining and simulating ODE-based microbiome dynamics.
  • A data loader that allows users to retrieve data from mGrowthDB.
  • A parameter estimation backend offering both least-squares and Markov Chain Monte Carlo (MCMC) optimization.
  • Built-in visualization utilities for evaluating trajectories and analyzing posteriors.
  • A controller framework based on neural ODEs.
  • A modular architecture designed to facilitate the extension and integration of custom models, controllers, and data processing workflows.

Features

Models

  • An implementation of a CRM (CRModel).
  • Scalable design supporting both single-species and multi-species systems.
  • A unified engine (BaseODEModel) with NumPy and PyTorch backends.
  • Extensible base classes enabling straightforward implementation of custom ODE models.

Controllers

  • BaseController provides an abstract interface with simulate and fit methods.
  • OpenLoopNeuralController implements time-dependent control functions.
  • ClosedLoopNeuralController implements state-dependent control functions.

Fitting Backend

  • Least-squares parameter optimization (crm_fit_mechanistic).
  • Bayesian parameter inference through MCMC sampling (crm_fit_mcmc).

Plotting

  • Tools for visualizing coupled metabolite and species population dynamics.
  • Plots of empirical data, spline interpolations, and simulated trajectories.
  • Integration of MCMC outputs to show credible intervals.

Code Structure

src/mgrowthctrl/
│
├── backends/
│   ├── array.py        # Array backend interfaces for NumPy and PyTorch
│   └── __init__.py
│
├── controllers/
│   ├── base.py         # BaseController interface with simulate and fit methods
│   ├── closed_loop.py  # ClosedLoopNeuralController
│   └── open_loop.py    # OpenLoopNeuralController
│
├── models/
│   ├── base.py         # ODE base class (uses dependency injection)
│   └── crm/
│       ├── fit.py      # LSQ + MCMC fitting engine
│       ├── model.py    # Mechanistic CRM using BaseODEModel
│       └── utils.py    # Shared utilities
│
├── utils/
│   ├── data.py         # Data loading functions with a public DataLoader-style API
│   ├── plot.py         # Plotting utilities
│   ├── save.py         # Saving / loading utilities
│   └── __init__.py
│
└── __init__.py

Metadata

Release files for mgrowthctrl 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mgrowthctrl 0.1.0
File Size Uploaded Provenance Actions
mgrowthctrl-0.1.0.tar.gz 17.9 MB Without provenance Details for mgrowthctrl-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mgrowthctrl 0.1.0
File Interpreter ABI Platform Actions
mgrowthctrl-0.1.0-py3-none-any.whl Python 3 none any Details for mgrowthctrl-0.1.0-py3-none-any.whl

Total release size: 18.0 MB

Release files / mgrowthctrl-0.1.0.tar.gz

Download URL mgrowthctrl-0.1.0.tar.gz
Size 17.9 MB
Tags Source
SHA-256 checksum
How to use checksums
e220173ff66a23a67141ac4d3e6b4ba5b83fc7b076c90fa68661fa95b6fd287c
BLAKE2b-256 checksum
How to use checksums
4330d633e2d8b6664854460b2e04c1bdba7d310fc5695017cc3d294764d99ec9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / mgrowthctrl-0.1.0-py3-none-any.whl

Download URL mgrowthctrl-0.1.0-py3-none-any.whl
Size 42.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2359b2d606eddcd6acfa00292839cd6a1a588612773a794a9f9899a54e3712da
BLAKE2b-256 checksum
How to use checksums
f02bb3ec5125b56a76f668b4a00a7e95a5e49185f9ebbbf3e63520de2975dd15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for mgrowthctrl 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page