ModellingWebLab / cellmlmanip

CellML loading and model equation manipulation
Other
3 stars 1 forks source link

Parsing CellML with libcellml #184

Open MichaelClerx opened 4 years ago

MichaelClerx commented 4 years ago

Have started wondering what the steps would be to eventually do this

https://github.com/cellml/libcellml/issues/498

Would also involve

Update Hugh is working on the pip install at the moment.

MichaelClerx commented 4 years ago

Not pip-installable yet, but I think libcellml now has the features we need to read CellML 2.0 models

This would deal with model parsing, validation, and give us an API to extract the equations as MathML

MichaelClerx commented 4 years ago

Here are the tutorials presented at COMBINE 2020: https://libcellml-tutorials.readthedocs.io/en/combine/tutorials/tutorials_index.html

MichaelClerx commented 4 years ago

(There are also "Generator" classes for code generation, but these aren't useful for us as we want to modify things in sympy (after the CellML shell has been discarded) - unless we change it so that the cellml structure is maintained :D )

MichaelClerx commented 4 years ago

And some early work on annotation https://libcellml-tutorials.readthedocs.io/en/combine/tutorials/combine2020/tut6_annotateModel.html

MichaelClerx commented 4 years ago

There is an AST you can get from libcellml, in addition to the raw MathML, which might make transpiling a lot easier

MichaelClerx commented 4 years ago

The plan is for libcellml to stay relatively low level, and for a new libOpenCOR C++ library with Python bindings to be created, which will be able to do higher-level things. (OpenCOR itself will then use libOpenCOR)

MichaelClerx commented 4 years ago

W.r.t. annotations the plan is for libcellml to just provide access to ids, while everything else is handled via https://github.com/sys-bio/libOmexMeta