Hendrix Maurice, Clerx Michael, Tamuri Asif U, Keating Sarah M, Johnstone Ross H, Cooper Jonathan, Mirams Gary R
Centre for Mathematical Medicine & Biology, University of Nottingham, Nottingham, UK.
Digital Research Service, School of Mathematical Sciences, University of Nottingham, Nottingham, NG8 1BB, UK.
Wellcome Open Res. 2022 Jun 15;6:261. doi: 10.12688/wellcomeopenres.17206.2. eCollection 2021.
Hundreds of different mathematical models have been proposed for describing electrophysiology of various cell types. These models are quite complex (nonlinear systems of typically tens of ODEs and sometimes hundreds of parameters) and software packages such as the Cancer, Heart and Soft Tissue Environment (Chaste) C++ library have been designed to run simulations with these models in isolation or coupled to form a tissue simulation. The complexity of many of these models makes sharing and translating them to new simulation environments difficult. CellML is an XML format that offers a widely-adopted solution to this problem. This paper specifically describes the capabilities of two new Python tools: the cellmlmanip library for reading and manipulating CellML models; and chaste_codegen, a CellML to C++ converter. These tools provide a Python 3 replacement for a previous Python 2 tool (called PyCML) and they also provide additional new features that this paper describes. Most notably, they can generate analytic Jacobians without the use of proprietary software, and also find singularities occurring in equations and automatically generate and apply linear approximations to prevent numerical problems at these points.
已经提出了数百种不同的数学模型来描述各种细胞类型的电生理学。这些模型相当复杂(通常是由数十个常微分方程和有时数百个参数组成的非线性系统),并且诸如癌症、心脏和软组织环境(Chaste)C++库之类的软件包已被设计用于单独运行这些模型的模拟或耦合以形成组织模拟。许多这些模型的复杂性使得共享它们并将其转换到新的模拟环境变得困难。CellML是一种XML格式,为这个问题提供了一种被广泛采用的解决方案。本文具体描述了两个新的Python工具的功能:用于读取和操作CellML模型的cellmlmanip库;以及chaste_codegen,一个从CellML到C++的转换器。这些工具为之前的Python 2工具(称为PyCML)提供了Python 3替代方案,并且还提供了本文所描述的其他新功能。最值得注意的是,它们可以在不使用专有软件的情况下生成解析雅可比矩阵,还能找到方程中出现的奇点,并自动生成并应用线性近似以防止在这些点出现数值问题。