The (Non-)Steady state Kinetics simulation package (NSKinetics)
Contents
What is NSKinetics?
NSKinetics is a fast, flexible, and convenient package in Python for simulating steady- and non-steady-state reaction kinetics — including microbial fermentation and enzyme kinetics — and connecting them to techno-economic analysis (TEA) and life-cycle assessment (LCA) under uncertainty. Kinetic models are declared as SBML — most easily authored as Antimony text, or imported from an existing SBML file — and wrapped in a KineticModel, which adds unit-aware value access and a Python event API on top of a Tellurium RoadRunner engine that performs the actual ODE integration. Event covers a single trigger/assignment pair (a parameter switch, a control action); the higher-level FeedSpike builds on it for fed-batch feeding, topping a species back up to a target concentration whenever it drops below a threshold. The same kinetic model can then drive a BioSTEAM process unit through the NSKBatchReactor bridge, coupling kinetics directly to TEA.
Installation
Get the latest version of NSKinetics from PyPI. If you have an installation of Python with pip, simply install it with:
$ pip install nskinetics
To get the git version, run:
$ git clone https://github.com/sarangbhagwat/nskinetics
For help on common installation issues, please visit the documentation.
Documentation
NSKinetic’s full documentation includes a staged tutorial, starting from a minimal model and building up to a full process/TEA-coupled fed-batch fermentation. The interactive quickstart demo below runs that full picture end to end.
One factory call builds a complete, industrially configured process around a real kinetic model: nskinetics.processes.create_sugar_prep_and_fermentation_system assembles the sugar-solution preparation and fed-batch fermentation section of an actual biorefinery model — a splitter feeding parallel initial-feed and spike-feed conditioning trains (multi-effect evaporator, pumps, dilution-water mixer, heat exchanger), a FermentationSaccharomycesEthanolIsobutanol fermentor driven by the shipped S. cerevisiae kinetic model, and a compressed-air aeration loop. The complete biorefinery built around this section ships with NSKinetics as the isobutanol biorefinery demonstration. This example runs the section end to end: build, simulate, change the fed-batch strategy, and inspect the reactor. Total simulation time is a few seconds once the imports are loaded; the ~1-minute interactive demo below plays through the whole thing, showing real output at every step:
▶ Watch the quickstart run end to end — a ~1-minute interactive demo (build, simulate, re-tune, inspect).
See the full tutorial for the full walkthrough — writing and simulating a kinetic model from scratch, the Event/FeedSpike API used inside the fermentor, a tour of the shipped S. cerevisiae kinetic model, and the kinetics-to-biosteam bridge behind V406.
Demonstration: isobutanol biorefinery
NSKinetics ships a complete corn dry-grind biorefinery as a demonstration, nskinetics.biorefineries.isobutanol: a BioSTEAM flowsheet whose fermentor runs the shipped S. cerevisiae fed-batch model with an engineered isobutanol pathway, so titer, rate and yield are outputs of the strain kinetics and the feeding policy rather than inputs to the techno-economic analysis. It comes with ten scenarios (the wild-type ethanol plant, an engineered ethanol + isobutanol co-producer and eight strain-design optima), its TEA, and the scripts behind its feeding-strategy and kinetic sweeps, Bayesian strain-design optimization, objective-landscape, enzyme-burden (proteome allocation), global sensitivity and uncertainty analyses.
The demonstration needs NSKinetics 0.9.2 or later, the first release that ships nskinetics.biorefineries; earlier releases do not include it. Until 0.9.2 is on PyPI, install it from source, with its optional isobutanol dependencies, and check the installation with a pinned smoke case (a few minutes):
$ git clone https://github.com/sarangbhagwat/nskinetics
$ cd nskinetics
$ git checkout dev
$ pip install -e ".[isobutanol]"
$ python -m nskinetics.biorefineries.isobutanol.smoke 1
Once 0.9.2 is on PyPI, pip install "nskinetics[isobutanol]>=0.9.2" installs the same package and dependencies. Running the analyses has the full installation instructions (including the validated dependency versions) and lists every analysis script, its runtime and its outputs; the demonstration documentation presents the findings.
Figure code and data
The code and data behind the figures of Bhagwat et al., 2026 are in two folders:
analyses/results/publication/: one folder per figure (Fig1–Fig6, EDFig1–EDFig9). Each holds the figure’s plotting code (code/), a snapshot of its data (data/; the diagrams in Fig1–Fig3 need none) and make_figure.py, which redraws the figure from that snapshot without running any simulation.
analyses/: the scripts that simulate the biorefinery and generate those data, one subfolder per analysis:
feeding_strategies/: sweep of the fed-batch glucose-feeding strategy.
kinetic_sweeps/: 2-D sweeps of kinetic parameters (e.g. glycolysis capacity × ethanol inhibition) and a one-at-a-time sweep of every kinetic parameter.
kinetic_optimization/: the Bayesian-optimization strain-design campaigns.
objective_landscape/: 1-D sweeps of each decision variable through the best co-production design.
sensitivity/: the Sobol’/Shapley global sensitivity analysis.
uncertainty/: the Monte Carlo uncertainty analysis.
tea_breakdowns/: per-unit-group equipment-cost, utility and operating-cost breakdowns of the optimized designs.
opt_scenarios/: turns campaign optima into the reusable opt_* scenarios.
Bug reports
To report bugs, please use NSKinetics’s Bug Tracker at:
Contributing
For guidelines on how to contribute, visit:
[link to be added]
License information
See LICENSE.txt for information on the terms & conditions for usage of this software, and a DISCLAIMER OF ALL WARRANTIES.
Although not required by the NSKinetics license, if it is convenient for you, please cite NSKinetics if used in your work. Please also consider contributing any changes you make back, and benefit the community.
References
Metadata
Release files for nskinetics 0.9.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nskinetics-0.9.2.tar.gz | 1.2 MB | Without provenance | Details for nskinetics-0.9.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nskinetics-0.9.2-py3-none-any.whl | Python 3 | none | any | Details for nskinetics-0.9.2-py3-none-any.whl |
Total release size: 2.7 MB
Release files / nskinetics-0.9.2.tar.gz
| Download URL | nskinetics-0.9.2.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48e991e5c8722b8921fe34ac029c71008f91ee046c2ca14fe719abd2cb92c70f
|
|
BLAKE2b-256 checksum How to use checksums |
a3189d05238a3c4079f7f81027c3c9580a76b1cda49fc1a818b298246e7ce345
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / nskinetics-0.9.2-py3-none-any.whl
| Download URL | nskinetics-0.9.2-py3-none-any.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1430b4ab29c004fd5eeb3d233681e07d08abae2e43f06c0f61e4fd571ba3f77a
|
|
BLAKE2b-256 checksum How to use checksums |
4d2dc9ff5f1adfeab6cdf0b821b3267779e4944f45f931b28c463302c6978bfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for nskinetics 0.9.2
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.