TOOL

libCellML

libCellML is an open-source library for creating, editing, validating, serialising, and executing models written in CellML, the XML-based markup language for describing biological and physiological systems as networks of mathematical equations. Started in 2015 by the CellML community and hosted under the cellml organisation on GitHub, it is written primarily in C++ with a lightweight C interface, and ships optional bindings for Python (and historically JavaScript and Julia) generated via SWIG. Its stated goal is to be an easy-to-install, easy-to-contribute successor to the older, heavier CellML API, focused specifically on the CellML specification.

The library exposes CellML's object model programmatically: a Model contains a hierarchy of reusable Components, each holding Variables (with declared Units) and MathML equations that relate those variables, plus Connections that map variables between components and Imports that pull components or units from external documents. libCellML parses serialised CellML XML into this in-memory graph, lets applications manipulate it, and serialises it back out. Notably it can read CellML 1.0 and 1.1 models but only writes CellML 2.0, so it doubles as a one-way upgrade path from the legacy standard. A Validator checks documents against the specification, and analysis tooling resolves the unit system and equation dependencies.

A distinguishing feature is the Generator, which translates a validated, fully-instantiated model into runnable source code. Two profiles are provided, C (the default) and Python, emitting an implementation plus an interface header describing the state variables, rates, and computed variables of the resulting system of ODEs/algebraic equations, ready to be handed to a numerical integrator. This makes libCellML a bridge from declarative model description to executable simulation rather than a graph-visualisation tool.

libCellML deliberately keeps a narrow scope: it does not fetch remote import URLs (delegating HTTP retrieval to the calling application via libcurl or similar), performs no simulation itself, and does not target the broader systems-biology exchange ecosystem such as SBML, SBGN-ML, or SBOL that tools like libSBML, libSBGN, and libSBOL serve. It is the computational core beneath the OpenCOR modelling and simulation environment. At roughly version 0.6.x it remains pre-1.0, and coverage of every corner of the CellML 2.0 specification is still maturing, though the core parse-edit-validate-generate workflow is stable and in production use.

Graph Formats(Input & Output)

Frequently Asked Questions

What graph file formats does libCellML support?

See the list on this page — it shows every format libCellML can read, write and display.

How do I import a graph into libCellML?

Convert your file to a format libCellML can read, then open it in libCellML. Use GraphInOut to get a libCellML-compatible file in seconds.

How do I convert a file so libCellML can open it?

Use the convert links above — upload or paste your graph, pick a format libCellML accepts and download the result, right in your browser.