Metadata-Version: 2.4
Name: enzyme-fit
Version: 0.1.0
Summary: Fit Michaelis-Menten and substrate-inhibition (Haldane) enzyme kinetics models to initial-velocity data.
Project-URL: Homepage, https://github.com/karenkhachatryan-lab/enzyme-fit
Project-URL: Issues, https://github.com/karenkhachatryan-lab/enzyme-fit/issues
Author-email: Karen Khachatryan <karen.khachatryan@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: Haldane,Km,Michaelis-Menten,Vmax,biochemistry,enzyme kinetics,food science,substrate inhibition
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Requires-Dist: matplotlib>=3.7
Requires-Dist: numpy>=1.24
Requires-Dist: pandas>=2.0
Requires-Dist: scipy>=1.11
Requires-Dist: typer>=0.12
Provides-Extra: build
Requires-Dist: pyinstaller>=6.0; extra == 'build'
Provides-Extra: dev
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Provides-Extra: gui
Requires-Dist: customtkinter>=5.2; extra == 'gui'
Provides-Extra: release
Requires-Dist: build>=1.0; extra == 'release'
Requires-Dist: twine>=5.0; extra == 'release'
Description-Content-Type: text/markdown

# enzyme-fit

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Status](https://img.shields.io/badge/status-in%20development-orange.svg)](#project-status)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.21724603.svg)](https://doi.org/10.5281/zenodo.21724603)

Fit Michaelis-Menten and substrate-inhibition (Haldane) enzyme kinetics models to initial-velocity data, with objective model selection (AIC), a built-in Lineweaver-Burk comparison, and a publication-ready report.

## Problem

Determining Km and Vmax from initial-velocity vs. substrate-concentration data is one of the most common quantitative tasks in enzymology and food biochemistry (fermentation, enzymatic browning, hydrolytic processing enzymes). It is still routinely done via the Lineweaver-Burk double-reciprocal linearization (1/v vs 1/[S]) — a method known since the 1970s to give biased parameter estimates because it disproportionately weights low-velocity (high 1/v, high-noise) points, compared to direct nonlinear regression on the untransformed data. Substrate inhibition at high concentrations (common for many enzymes) also goes undetected unless a dedicated model is fit and compared objectively. `enzyme-fit` automates nonlinear regression for Michaelis-Menten and Haldane substrate-inhibition models, selects the best-describing model by AIC, and reports a Lineweaver-Burk panel side-by-side with the nonlinear fit purely as a diagnostic — making the difference, and the recommended method, explicit.

## Installation

```bash
pip install enzyme-fit
```

Or from source:

```bash
git clone https://github.com/karenkhachatryan-lab/enzyme-fit.git
cd enzyme-fit
pip install -e ".[dev]"
```

## Usage

Input CSV with columns `substrate`, `velocity`, and optionally `velocity_std` (any consistent concentration/rate units):

```csv
substrate,velocity,velocity_std
2,577.6,10.2
4,862.4,12.1
6,1032.0,11.8
8,1144.5,13.4
10,1224.6,14.0
```

Fit models and generate a report:

```bash
enzyme-fit fit data.csv --output report
```

This produces:
- `report.pdf` — velocity vs. substrate curve with all fitted models, a Lineweaver-Burk diagnostic panel, and a residuals plot for the best model,
- `report.json` — fitted parameters, metrics (R², RMSE, AIC), kinetics classification, and the Lineweaver-Burk comparison values.

Print citation information:

```bash
enzyme-fit cite
```

### Desktop GUI (optional)

```bash
pip install "enzyme-fit[gui]"
enzyme-fit gui
```

Opens a desktop window (CustomTkinter) to load a CSV, pick models, view the kinetics plot and metrics live, and save the PDF/PNG/JSON outputs — no command-line arguments needed.

For users without Python, a prebuilt standalone Windows GUI is attached as a `.zip` to each [GitHub Release](https://github.com/karenkhachatryan-lab/enzyme-fit/releases/latest) — download, extract, and run `enzyme-fit-gui.exe`, no installation needed. To build it yourself instead, see `packaging/build_exe.ps1` (PyInstaller).

## Models

- **Michaelis-Menten**: v = Vmax·[S] / (Km + [S]) — 2 parameters, the standard model for the vast majority of enzymes.
- **Haldane (substrate inhibition)**: v = Vmax·[S] / (Km + [S] + [S]²/Ki) — 3 parameters; velocity rises then declines at high substrate concentration, common for many hydrolases and oxidases at supra-physiological substrate levels.

Both models are fit on the full dataset, so their AIC values are always directly comparable — no restricted-range caveat (unlike `isotherm-fit`'s BET model).

## Project status

Early development (v0.1.0) — MVP scope: 2 models, CSV loader, AIC-based model selection, kinetics classification (inhibition detection + optimal substrate concentration), Lineweaver-Burk diagnostic panel, PDF/PNG + JSON report generation, CLI via Typer, optional CustomTkinter desktop GUI. See [CHANGELOG.md](CHANGELOG.md).

## Citing this software

If you use `enzyme-fit` in your research, please cite it — see [`CITATION.cff`](CITATION.cff) or run `enzyme-fit cite` for the formatted citation and BibTeX entry. DOI: [10.5281/zenodo.21724603](https://doi.org/10.5281/zenodo.21724603).

## Contributing and support

Bug reports, feature requests, and usage questions are all welcome via [GitHub Issues](https://github.com/karenkhachatryan-lab/enzyme-fit/issues).

## License

MIT — see [LICENSE](LICENSE).
