CellML Cellular Electrophysiology & Physiome Modeling (.cellml)
@modelscript/cellml (languages/cellml) provides native WebAssembly parsing, 7-base SI dimensional unit consistency and component port directionality verification, Hodgkin-Huxley / cardiac action-potential and 0D microvascular Windkessel ODE integration, DAEBuilder lowering, and Modelica 3.x / SBML projections for IUPS Physiome Project CellML (1.0 / 1.1 / 2.0) physiological models.
Supported Extensions & Standards
| Extension | Format | Description |
|---|---|---|
.cellml, .xml | CellML 1.0 / 1.1 / 2.0 | Modular XML specification of units, component, variable, MathML math ODEs, connection, and encapsulation |
Key Capabilities
1. Modular Components, Encapsulation & 7-Base SI Units
- Parses
<units>definitions (prefix,multiplier,exponentover SI base unitsampere,candela,kelvin,kilogram,metre,mole,second) and verifies dimensional homogeneity across<map_variables>component connections. - Enforces
public_interfaceandprivate_interface(in/out/none) encapsulation rules.
2. Cardiac Action Potential & Microvascular Hemodynamics Solver
- Integrates membrane voltage
and ionic gating variables ( ) across Hodgkin-Huxley, Noble, Luo-Rudy, and ten Tusscher cardiac electrophysiology models alongside 0D Windkessel arterial/venous perfusion loops:
3. DAE Arena Lowering & Modelica / SBML Projection
- Lowers modular CellML equations into
@modelscript/runtime'sDAEBuilderarena and projects models into Modelica 3.x (cellmlToModelica) and SBML (cellmlToSbml).
Pre-Flight Diagnostics
10 rules8 error2 warning
| Code | Rule | Severity | Message |
|---|---|---|---|
M9301 | cellml-missing-model-name | error | CellML '<model>' element is missing a non-empty 'name' attribute. |
M9302 | cellml-unresolved-units | error | Variable '<targetName>' in component '<componentName>' references unresolved units '<unitName>'. |
M9303 | cellml-interface-direction-conflict | error | Variable mapping between '<comp1>.<var1>' (interface '<iface1>') and '<comp2>.<var2>' (interface '<iface2>') has incompatible interface directions. |
M9304 | cellml-unit-dimensional-mismatch | warning | Connected variables '<comp1>.<var1>' ('<units1>') and '<comp2>.<var2>' ('<units2>') have incompatible physical SI base dimensions. |
M9305 | cellml-uninitialized-state-variable | warning | Differential state variable '<varName>' in component '<compName>' has no 'initial_value' attribute. |
M9306 | cellml-encapsulation-hierarchy-cycle | error | Circular component reference '<compName>' detected in '<encapsulation>' hierarchy. |
M9307 | cellml-unresolved-connection-member | error | Connection references unknown <memberKind> '<memberName>' in '<contextName>'. |
M9308 | cellml-overconstrained-variable | error | Variable '<varName>' in component '<compName>' has an 'in' interface or prior assignment and cannot be assigned by an equation or ODE. |
M9309 | cellml-undefined-math-ci | error | Equation in component '<compName>' references undeclared variable identifier '<ciName>'. |
M9310 | cellml-duplicate-variable-or-component | error | Duplicate <entityKind> '<name>' declared in component '<compName>'. |
Generated from languages/cellml/src/lints/rules.ts. All languages →
CLI Usage
bash
# Inspect CellML components, variables, units, and connections
msx cellml inspect HodgkinHuxley.cellml
# Validate SI dimensional unit compatibility and interface directions
msx cellml validate HodgkinHuxley.cellml
# Integrate cellular electrophysiology ODE trajectories
msx cellml simulate HodgkinHuxley.cellml
# Project CellML model to Modelica 3.x or SBML
msx cellml to-modelica HodgkinHuxley.cellml > HodgkinHuxley.mo
msx cellml to-sbml HodgkinHuxley.cellml > HodgkinHuxley.sbml
