chaste_codegen
chaste_codegen converts CellML models into C++ code for use in computational electrophysiology simulations.
Key Features:
- CellML parsing and manipulation: Uses the cellmlmanip Python library to read and manipulate CellML models.
- C++ code generation via templating: Employs templating techniques to generate C++ code for integration into the Chaste (Cancer, Heart, and Soft Tissue Environment) C++ library.
- Analytic Jacobian generation: Produces analytic Jacobians without relying on proprietary software to improve numerical solver performance.
- Singularity detection and handling: Identifies singularities in equations and applies automatic linear approximations to mitigate numerical issues.
- Nonlinear and stiff ODE support: Targets nonlinear systems comprising tens or hundreds of ordinary differential equations and numerous parameters.
- Chaste integration for tissue coupling: Generates code that can be run in isolation or as part of coupled tissue simulations within Chaste.
- Python 3 implementation: Redeveloped in Python 3 as the successor to PyCML.
Scientific Applications:
- Computational electrophysiology: Enables simulation of the electrical behavior of various cell types using CellML-derived models.
- Tissue and multicellular simulations: Supports incorporation of cellular models into coupled tissue-level simulations in Chaste.
- Stiff system simulation and stability: Improves simulation efficiency and stability for stiff electrophysiological models via analytic Jacobians and singularity handling.
- Model translation and reuse: Facilitates translation of CellML models into portable C++ implementations for reuse across simulation environments.
Methodology:
Reads and manipulates CellML models with the cellmlmanip Python library.
Applies templating techniques to generate C++ code targeted to the Chaste C++ library.
Generates analytic Jacobians and detects singularities, applying linear approximations where needed.
Implemented in Python 3 as a redevelopment of PyCML.
Topics
Details
- License:
- BSD-3-Clause
- Cost:
- Free of charge
- Tool Type:
- library
- Operating Systems:
- Mac, Linux, Windows
- Programming Languages:
- Python, C++
- Added:
- 4/14/2022
- Last Updated:
- 4/14/2022
Operations
Publications
Hendrix M, Clerx M, Tamuri AU, Keating SM, Johnstone RH, Cooper J, Mirams GR. chaste codegen: automatic CellML to C++ code generation with fixes for singularities and automatically generated Jacobians. Wellcome Open Research. 2021;6:261. doi:10.12688/wellcomeopenres.17206.1.
Funding: - Biotechnology and Biological Sciences Research Council: BB/P010008/1
- Wellcome Trust: 212203
Documentation
API documentation
https://chaste-codegen.readthedocs.io/en/latest/