Skip to main content

Latest release Tests

mgrowthctrl

A Python package for parameter inference, mechanistic microbiome modeling, and control, with consumer–resource (CRM) and generalized Lotka–Volterra (gLV) models.

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 for the CRM 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).
  • A species-only gLV model (GLVModel) with intrinsic growth rates and pairwise interactions.
  • 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

Parameter fitting is currently available for the CRM.

  • 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)
│   ├── glv.py          # Generalized Lotka–Volterra model and parameters
│   └── 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.1

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.1
File Size Uploaded Provenance Actions
mgrowthctrl-0.1.1.tar.gz 45.5 MB Without provenance Details for mgrowthctrl-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 45.6 MB

Release files / mgrowthctrl-0.1.1.tar.gz

Download URL mgrowthctrl-0.1.1.tar.gz
Size 45.5 MB
Tags Source
SHA-256 checksum
How to use checksums
a96a64a9dc4103fad8924a6f50a6fb25a08004c1e9d4c203c3d8a7c4d7be97b8
BLAKE2b-256 checksum
How to use checksums
0fcd9e9a781b9e291776a997b94779b44cd4f927db292fe619a074c8cf559c62
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.1-py3-none-any.whl

Download URL mgrowthctrl-0.1.1-py3-none-any.whl
Size 46.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ba2bcd4939cf816178238e660f68231a6f257abcbc9f3e351572eed6a2b3a17
BLAKE2b-256 checksum
How to use checksums
cfbd3fce29366a166edebf89c50c938f32123837ebd1bfad8b5efbbd487cd1f9
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.1

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.1 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