Skip to content

pre-commit CI github pages License: MIT Code style: black

gotranx

gotranx is the next generation General ODE translator and is an attempt to a full rewrite of gotran.

The general idea is that you write your ODE in a high level markup language and use gotranx to generate code for solving the ODE in different programming languages.

At the moment we only support Python and C, but we plan to support a wide range of programming languages in the future.

gotranx uses sympy to generate the numerical schemes.

  • Source code: https://github.com/finsberg/gotranx
  • Documentation: https://finsberg.github.io/gotranx/

Install

Install with pip

python3 -m pip install gotranx
or for the development version
python3 -m pip install git+https://github.com/finsberg/gotranx

Quick start

Check out the demos in the documentation and the examples in the repository.

Road map

The plan is to have all the features from the old gotran implemented in gotranx (and some more). This includes

  • [ ] More numerical schemes
    • [x] Forward Euler
    • [ ] Rush Larsen
    • [x] Generalized Rush Larsen
    • [ ] Hybrid Generalized Rush Larsen
    • [ ] Simplified Implicit Euler
    • [ ] Newton's method for implicit schemes
  • [ ] Code generation for more languages
    • [x] Python
    • [x] C
    • [ ] C++
    • [ ] Julia
    • [ ] CUDA
    • [ ] OpenCL
    • [ ] Rust
    • [ ] Latex
    • [ ] Markdown
  • [x] Converters between commonly used ODE markup languages
    • [x] Myokit (still some limited support for unit conversion, see issue #26)
    • [x] CellML (supported via MyoKit)

If you have additional feature requests, please open an issue

Contributing

Contributions are very welcomed, but please read the contributing guide first