# SUND toolbox
<img src="https://gitlab.liu.se/ISBgroup/projects/sund/-/raw/main/logo/SUND_logo.png"
     alt="SUND logo"
     style="max-height:300px;width:100%;width:auto;display:block;margin:0 auto 1rem;" />
SUND (Simulation Using Nonlinear Dynamic models) is a Python package for high‑level, object‑oriented modeling and fast simulation of ODE/DAE systems with complex time‑dependent inputs and hierarchical model structures. Models compile against a SUNDIALS backend for performance and can be seamlessly connected by declaring inputs and outputs.
Supported Python: 3.10–3.14 on Linux (x86_64), Windows (x86_64) and macOS (Intel & ARM).
## Requirements
A C++ compiler (GCC, Clang, or MSVC) is required to install SUND and to compile models for efficient simulations. Pre-built wheels are not provided, as model compilation is performed locally. Ensure your system has a working C++ compiler before installing.
## Install
Install using `pip` or `uv` (requires compiler):
```bash
pip install sund   # or: uv add sund
```
## Quick start
Minimal end‑to‑end example:
```python
import sund
# 1. Generate a template model file
sund.save_model_template("example_model.txt", model_name="Example")
# 2. Install (compiles → C extension module under sund/models)
sund.install_model("example_model.txt")
# 3. Load an instance
model = sund.load_model("Example")
# 4. Simulate (time vector in model time unit; default from template is 's')
sim = sund.Simulation(models=[model], time_vector=[0, 1, 2, 3], time_unit=model.time_unit)
sim.simulate()
# 5. Get the results as a dict and print
print(sim.features_as_dict())
```
See the docs for activities (time‑varying inputs), multiple models, events, validation.
## Documentation
Full user & API docs: <https://isbgroup.eu/sund-toolbox> (versioned; latest alias always points to newest release).
## Model validation (optional)
Validate a model file or content before installing:
```python
import sund
results = sund.validate_model_file("example_model.txt", verbose=True)
```
## Citation
If you use SUND in academic work, please cite the project (formal citation text will be added once available).
## Getting help
Open an issue or start a discussion on the project GitLab. Bug reports with a minimal reproducer and model snippet are appreciated.
            
         
        Raw data
        
            {
    "_id": null,
    "home_page": null,
    "name": "sund",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "William L\u00f6vfors <william.lovfors@liu.se>, Henrik Pod\u00e9us <henrik.podeus.derelov@liu.se>",
    "keywords": "sund, simulation, ODE, DAE, modeling, toolbox, systems biology",
    "author": "ISB group @ Link\u00f6ping University",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/fe/64/67a56ad463d04ed98ebf688cae9ba561636c0eb4a073e5f1d664a72cd832/sund-2.0.4.tar.gz",
    "platform": null,
    "description": "# SUND toolbox\n\n<img src=\"https://gitlab.liu.se/ISBgroup/projects/sund/-/raw/main/logo/SUND_logo.png\"\n     alt=\"SUND logo\"\n     style=\"max-height:300px;width:100%;width:auto;display:block;margin:0 auto 1rem;\" />\n\nSUND (Simulation Using Nonlinear Dynamic models) is a Python package for high\u2011level, object\u2011oriented modeling and fast simulation of ODE/DAE systems with complex time\u2011dependent inputs and hierarchical model structures. Models compile against a SUNDIALS backend for performance and can be seamlessly connected by declaring inputs and outputs.\n\nSupported Python: 3.10\u20133.14 on Linux (x86_64), Windows (x86_64) and macOS (Intel & ARM).\n\n## Requirements\n\nA C++ compiler (GCC, Clang, or MSVC) is required to install SUND and to compile models for efficient simulations. Pre-built wheels are not provided, as model compilation is performed locally. Ensure your system has a working C++ compiler before installing.\n\n## Install\n\nInstall using `pip` or `uv` (requires compiler):\n\n```bash\npip install sund   # or: uv add sund\n```\n\n## Quick start\n\nMinimal end\u2011to\u2011end example:\n\n```python\nimport sund\n\n# 1. Generate a template model file\nsund.save_model_template(\"example_model.txt\", model_name=\"Example\")\n\n# 2. Install (compiles \u2192 C extension module under sund/models)\nsund.install_model(\"example_model.txt\")\n\n# 3. Load an instance\nmodel = sund.load_model(\"Example\")\n\n# 4. Simulate (time vector in model time unit; default from template is 's')\nsim = sund.Simulation(models=[model], time_vector=[0, 1, 2, 3], time_unit=model.time_unit)\nsim.simulate()\n\n# 5. Get the results as a dict and print\nprint(sim.features_as_dict())\n```\n\nSee the docs for activities (time\u2011varying inputs), multiple models, events, validation.\n\n## Documentation\n\nFull user & API docs: <https://isbgroup.eu/sund-toolbox> (versioned; latest alias always points to newest release).\n\n## Model validation (optional)\n\nValidate a model file or content before installing:\n\n```python\nimport sund\nresults = sund.validate_model_file(\"example_model.txt\", verbose=True)\n```\n\n## Citation\n\nIf you use SUND in academic work, please cite the project (formal citation text will be added once available).\n\n## Getting help\n\nOpen an issue or start a discussion on the project GitLab. Bug reports with a minimal reproducer and model snippet are appreciated.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A simulation toolbox for ODE and DAE systems, with focus on systems biology applications.",
    "version": "2.0.4",
    "project_urls": {
        "Homepage": "https://isbgroup.eu/sund-toolbox",
        "Repository": "https://gitlab.liu.se/ISBgroup/projects/sund"
    },
    "split_keywords": [
        "sund",
        " simulation",
        " ode",
        " dae",
        " modeling",
        " toolbox",
        " systems biology"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fe6467a56ad463d04ed98ebf688cae9ba561636c0eb4a073e5f1d664a72cd832",
                "md5": "221072f62ca3872c5743836a1498bf12",
                "sha256": "3caa8902ac9c2197baabb59aff6d34427677c987f3fe17ab09d15a9dbb47857a"
            },
            "downloads": -1,
            "filename": "sund-2.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "221072f62ca3872c5743836a1498bf12",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 370372,
            "upload_time": "2025-11-04T10:26:38",
            "upload_time_iso_8601": "2025-11-04T10:26:38.316431Z",
            "url": "https://files.pythonhosted.org/packages/fe/64/67a56ad463d04ed98ebf688cae9ba561636c0eb4a073e5f1d664a72cd832/sund-2.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-11-04 10:26:38",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "sund"
}