CellML Discussion List

Text archives Help


[cellml-discussion] CellML model not rendered in OpenCOR


Chronological Thread 
  • From: Matthias König <konigmatt AT googlemail.com>
  • To: cellml-discussion AT lists.cellml.org
  • Subject: [cellml-discussion] CellML model not rendered in OpenCOR
  • Date: Tue, 5 Jul 2022 17:17:56 +0200
  • Arc-authentication-results: i=1; relay.mimecast.com; dkim=pass header.d=googlemail.com header.s=20210112 header.b=T+JGmWd8; dmarc=pass (policy=quarantine) header.from=googlemail.com; spf=pass (relay.mimecast.com: domain of konigmatt AT googlemail.com designates 209.85.217.43 as permitted sender) smtp.mailfrom=konigmatt AT googlemail.com
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=dkim.mimecast.com; s=201903; t=1657034302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: dkim-signature; bh=G7X/hBlr9WBsjIMjTbdMzhaXraVrAablzEL6mK4bIwM=; b=nEJoY+Q9zPAKP8dcBvE4Zl0kcE3T9DXFKnkArMv3lMXF+f62YMYVC90LpibmvZeBuM6AmJ pPooaDnsh32GjliaGy0npD4/QNa5tLRX8vmAYr2yPbLJWs4ggGzT8aSUASypo/uZUnnivw weF3iJMj9FMl3gS/uavraIMjMHluiaU0tYiLfvPkPY5QcizXVInPzU75fSx0iPzwWi4Kgj OEyAW3zboiI48eu5xB2HGJlSOK6mLFdl8aKsA3rex7zPXIq+0nHvFGtZc7VY9J7GfEBHY4 dx6MyoU/Mdj6umNjipOvChspM3GWSni07dj1uwwBShYvGR9TfC+u0YUtTf7Y+w==
  • Arc-seal: i=1; s=201903; d=dkim.mimecast.com; t=1657034302; a=rsa-sha256; cv=none; b=H/1WxcvLu/qSfQq/FeJJt2ZFwQZM1Dg+9vrJ0esnV7u1V23hGSk+e1BnP6u/ZqzPiIetqW FXpXTfAyikL6v/0vDrMJ/8qrKgSpqlEz9p4EEi+WGWs3IAHFghMRxuZh2vyGH5u0fnxXC+ LyFAnwJ6Eb821q/I0nLp3EIPAxW6Tlod4ZjHWHv8lWw0bMZyUSqwRnCRaT018EL/bo6RzN 7EyK+9u0H09LUOIc6ic1hSyFzy/3T8TS+PaUUZuC7e7tUlJMwf//wybwInqne3qFxN20yg p5Tl65EuYzxS46O5Ygqubo9NaBWol0pMU/XNc/e9A0sbA8eGO8VxMxSZc75azg==
  • Authentication-results: relay.mimecast.com; dkim=pass header.d=googlemail.com header.s=20210112 header.b=T+JGmWd8; dmarc=pass (policy=quarantine) header.from=googlemail.com; spf=pass (relay.mimecast.com: domain of konigmatt AT googlemail.com designates 209.85.217.43 as permitted sender) smtp.mailfrom=konigmatt AT googlemail.com

Hi all,
I am trying to create the repressilator in CellML as part of a project via
the python binding.
Unfortunately, the created models (cellml v2.0) are not rendered in
OpenCOR. I.e. normally I see nice CellML Text in the editor, but for the
attached model nothing is displayed.

```

<?xml version="1.0" encoding="UTF-8"?>
<model
xmlns="https://protect-au.mimecast.com/s/fTM8CVARD0T944z2iG5XgB?domain=cellml.org";
name="repressilator">
<component name="parameters">
<variable name="n" units="dimensionless" initial_value="2"/>
</component>
</model>

```
Model was created using libcellml via

```

import libcellml
from cellml_utilities import print_model


def create_model(cellml_path: Path) -> libcellml.Model:
"""Create CellML repressilator and save to Path."""
model = libcellml.Model()
model.setName("repressilator")

comp_parameters = libcellml.Component()
comp_parameters.setName("parameters")
model.addComponent(comp_parameters)

# var n: dimensionless {init: 2, pub: out};
var_n = libcellml.Variable()
var_n.setName("n")
var_n.setInitialValue(2.0)
var_n.setUnits("dimensionless")
# var_n.setInterfaceType()
comp_parameters.addVariable(var_n)

# Checking that it worked
print_model(model)

# Save model
printer = libcellml.Printer()
serialised_model: str = printer.printModel(model)

with open(cellml_path, "w") as f_cellml:
f_cellml.write(serialised_model)

return model

```

How can I create models with python libcellml which I can use/edit/view in
OpenCOR?
Best Matthias

--
Matthias König, PhD.
Junior Group Leader Systems Medicine of the Liver Lab
Humboldt-Universität zu Berlin,
Institute of Biology, Institute for Theoretical Biology
Philippstraße 13, Haus 20, 10115 Berlin
Tel: +49 30 2093 98435
https://protect-au.mimecast.com/s/SahXCWLVEjtGppN6txhtfs?domain=livermetabolism.com
konigmatt AT googlemail.com
https://protect-au.mimecast.com/s/AZKpCXLWGkt066k4UD580u?domain=twitter.com
https://protect-au.mimecast.com/s/rwcKCYW8JlTO00jDtVBtC-?domain=github.com

Attachment: repressilator.cellml
Description: Binary data




Archive powered by MHonArc 2.6.18.

Top of page