Skip to main content

Python code relating to the textbook, Stochastic modelling for systems biology, third edition

Project description

smfsb for python

Code style: black

Python library for the book, Stochastic modelling for systems biology, third edition. This library is a Python port of the R package associated with the book.

Install

Latest stable version:

pip install smfsb

You can test your installation by typing

import smfsb

at a python prompt. If it returns silently, then it is probably installed correctly.

Documentation

Note that the book, and its associated github repo is the main source of documentation for this library. The code in the book is in R, but the code in this library is supposed to mirror the R code, but in Python.

For an introduction to this library, see the python-smfsb tutorial.

Further information

For further information, see the demo directory and the API documentation. Within the demos directory, see sbmlsh-demo.py for an example of how to specify a (SEIR epidemic) model using SBML-shorthand and sbml-params.py for how to modify the parameters of models parsed from SBML (or SBML-shorthand). Also see step_cle_2df.py for a 2-d reaction-diffusion simulation. For parameter inference (from time course data), see abc-cal.py for ABC inference, abc_smc.py for ABC-SMC inference and pmmh.py for particle marginal Metropolis-Hastings MCMC-based inference. There are many other demos besides these.

You can see this package on PyPI or GitHub.

Fast simulation and inference

If you like this library but find it a little slow, you should know that there is a JAX port of this package: jax-smfsb. It requires a JAX installalation, and the API is (very) slightly modified, but it has state-of-the-art performance for simulation and inference.

Copyright 2023-2026 Darren J Wilkinson

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

smfsb-1.1.4.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smfsb-1.1.4-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file smfsb-1.1.4.tar.gz.

File metadata

  • Download URL: smfsb-1.1.4.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for smfsb-1.1.4.tar.gz
Algorithm Hash digest
SHA256 da3bb3a24eab43b7ff4d2fd7059fc2d28d6f7fe06124f312ac1c32e83be8a2f1
MD5 7d56a9ee490a0fe3a40974ca4e0457b0
BLAKE2b-256 8a815c8bc572d99604de24e7b27d1b2ee1c61903df1c686752eaff59d5615296

See more details on using hashes here.

File details

Details for the file smfsb-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: smfsb-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for smfsb-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a8f2e6059cb5f0cc89d7f39e16e2b58376d37404683bab5149099dea98e87eb7
MD5 e9c44556f170aec51d5f48dca3653df4
BLAKE2b-256 b5d7df97b2bd293d82c4a8701a5067298233347ebde337d983a604f8d3fb2469

See more details on using hashes here.

Supported by

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