Metadata-Version: 2.5
Name: pkpdsim
Version: 0.3.0
Summary: pkpdsim provides the building blocks shared by physiologically based pharmacokinetic and pharmacodynamic (PBPK/PD) models in SBML.
Project-URL: Homepage, https://matthiaskoenig.github.io/pkpdsim
Project-URL: Documentation, https://matthiaskoenig.github.io/pkpdsim
Project-URL: Repository, https://github.com/matthiaskoenig/pkpdsim
Project-URL: Issues, https://github.com/matthiaskoenig/pkpdsim/issues
Project-URL: Changelog, https://github.com/matthiaskoenig/pkpdsim/tree/develop/release-notes
Project-URL: Download, https://pypi.org/project/pkpdsim
Author-email: Matthias König <konigmatt@googlemail.com>
Maintainer-email: Matthias König <konigmatt@googlemail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: PBPK,SBML,modeling,pharmacodynamics,pharmacokinetics,simulation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.13
Requires-Dist: libroadrunner>=2.10.0
Requires-Dist: matplotlib>=3.11.2
Requires-Dist: numpy>=2.5.3
Requires-Dist: pillow>=12.3.0
Requires-Dist: python-libsbml>=5.21.2
Requires-Dist: sbmlsim>=0.8.5
Requires-Dist: sbmlutils>=0.16.0
Provides-Extra: dev
Requires-Dist: bump-my-version>=1.5.1; extra == 'dev'
Requires-Dist: mkdocstrings-python>=2.0.9; extra == 'dev'
Requires-Dist: pre-commit>=4.6.2; extra == 'dev'
Requires-Dist: pytest-cov>=7.1.0; extra == 'dev'
Requires-Dist: pytest-xdist>=3.8.0; extra == 'dev'
Requires-Dist: pytest>=9.1.1; extra == 'dev'
Requires-Dist: ruff>=0.17.0; extra == 'dev'
Requires-Dist: tox>=4.65.0; extra == 'dev'
Requires-Dist: ty>=0.0.86; extra == 'dev'
Requires-Dist: zensical>=0.0.69; extra == 'dev'
Description-Content-Type: text/markdown

# pkpdsim: building blocks of PBPK/PD models
[![GitHub Actions CI/CD Status](https://github.com/matthiaskoenig/pkpdsim/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/matthiaskoenig/pkpdsim/actions/workflows/ci-cd.yml)
[![Documentation](https://img.shields.io/badge/docs-pkpdsim-3f51b5.svg)](https://matthiaskoenig.github.io/pkpdsim)
[![Version](https://img.shields.io/pypi/v/pkpdsim.svg)](https://pypi.org/project/pkpdsim/)
[![Python Versions](https://img.shields.io/pypi/pyversions/pkpdsim.svg)](https://pypi.org/project/pkpdsim/)
[![MIT License](https://img.shields.io/pypi/l/pkpdsim.svg)](https://opensource.org/licenses/MIT)

`pkpdsim` is a python package with the building blocks shared by physiologically based pharmacokinetic and pharmacodynamic (PBPK/PD) models in [SBML](https://sbml.org). The models of [pkdb_models](https://github.com/matthiaskoenig/pkdb_models) are written in python with the factory of [sbmlutils](https://github.com/matthiaskoenig/sbmlutils) and simulated with [sbmlsim](https://github.com/matthiaskoenig/sbmlsim); what they share lives in `pkpdsim`, so that the folder of a model imports nothing but itself and released packages.

Features include

- **templates and annotations** - the creators and the terms of use of a model, the annotations of the compartments which recur in the models (liver, kidneys, gut, blood, urine, ...)
- **study data** - the study folders of [PK-DB](https://pk-db.com) in a checkout of [pkdb_data](https://github.com/matthiaskoenig/pkdb_data), found through the environment variable `PKDB_DATA`, and the data of a model collected from them into its own folder
- **initial values** - the same initial concentration or amount of a substance in every tissue of a model, which removes the distribution kinetics
- **licenses** - the texts of CC BY-SA 4.0 and MIT for the COMBINE archive of a model, written byte for byte the same on every platform
- **models and their commands** - the model object and the commands of a model (`run`, `fit`, `report`, `identifiability`), the tests of a model as functions and the verification of a change (`pkpdsim-verify`)

The documentation is available at [https://matthiaskoenig.github.io/pkpdsim](https://matthiaskoenig.github.io/pkpdsim).

If you have any questions or issues please [open an issue](https://github.com/matthiaskoenig/pkpdsim/issues).

## Quickstart

```python
from pathlib import Path

from pkpdsim.annotations import compartments
from pkpdsim.licenses import License, write_license
from pkpdsim.templates import creators

print(creators[0].givenName, creators[0].familyName)
print([resource for _, resource in compartments["li"]])

results = Path("results")
results.mkdir()
print(write_license(results, License.MIT, copyright="2026 Matthias König").name)
```

```text
Matthias König
['fma/FMA:7197', 'bto/BTO:0000759', 'ncit/C12392']
mit.txt
```

The [user guide](https://matthiaskoenig.github.io/pkpdsim/templates/) of the documentation describes every module with a snippet which runs.

## How to cite

If you use `pkpdsim` please cite the archived software on [Zenodo](https://zenodo.org), whose DOI is added here with the first release.

## Installation

`pkpdsim` requires python >= 3.13 and is available from [pypi](https://pypi.org/project/pkpdsim/):

```bash
uv add pkpdsim
```

or with pip

```bash
pip install pkpdsim
```

See [Installation](https://matthiaskoenig.github.io/pkpdsim/installation/) for details and [Development](https://matthiaskoenig.github.io/pkpdsim/development/) for working on the repository.

## License

- Source Code: [MIT](https://opensource.org/license/MIT)
- Documentation: [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)

## Funding

Matthias König is supported by the German Research Foundation (DFG) within the Research Unit Programme FOR 5151 "QuaLiPerF (Quantifying Liver Perfusion-Function Relationship in Complex Resection - A Systems Medicine Approach)" by grant number 436883643 and by grant number 465194077 (Priority Programme SPP 2311, Subproject SimLivA).

Matthias König was supported by the Federal Ministry of Education and Research (BMBF, Germany) within the research network Systems Medicine of the Liver (**LiSyM**, grant number 031L0054).

© 2026 Matthias König.
