- From: Lucian Smith <lucianoelsmitho AT gmail.com>
- To: CellML Discussion List <cellml-discussion AT cellml.org>
- Subject: Re: [cellml-discussion] CellML model not rendered in OpenCOR
- Date: Tue, 5 Jul 2022 14:15:20 -0700
- Arc-authentication-results: i=1; relay.mimecast.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="Kl/5UAMS"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (relay.mimecast.com: domain of lucianoelsmitho AT gmail.com designates 209.85.216.53 as permitted sender) smtp.mailfrom=lucianoelsmitho AT gmail.com
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=dkim.mimecast.com; s=201903; t=1657055737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Gb5Wxk419NeDZxJWeDmjSmLFYLY53i2+l0tfxUOD7a8=; b=cTZ6Cnd3UoZd/yU4NViBeR0rTreMBC4pcCC4l6NLUFq8iFKEU8Pas+wKXu1mpYAW65LLv7 fz15aDsEBe3WhElc46SCmONYPD+DzkNUN1V+QtIPF9F/jpnlIvsWB7cV4IsVueaIvlYUU/ 7P0PEbu0dLBHOX9Za/eG1FDUWQTD7Kn5wiw8Qcy41QgMaqT+q1q3/EivkFgyl/8eMssus6 nKL0NRUMEguq1gYmXV9i2qF/PYGAqiO3hWcAhXJob4iN0YCMVRLglqrZzOJ00T9ViDRC1i px7n8G8bzuJIrqqjkIaQiqX8WiIBPkCffsQ2sckV0LDysJebVyV9/sFNOzNAYw==
- Arc-seal: i=1; s=201903; d=dkim.mimecast.com; t=1657055737; a=rsa-sha256; cv=none; b=EkykrR35wfwPuTBPNQnRQhYL4MjO+m6a65kfO1f4AqZYc3jXTo5f9uqAqQipgB3BMsVrPz IAGwJZs3P30EKeDIISx2/JSTHOFhh/nWm5fGiOhI1WYtxCAcsqLsmH+zOKgZxoyqQk8wye nzNeXvjI0O77wCwSGJP/5OdO0kcYYJrERveAqKDUII52Wh00YkT8YZNOik4VmKYEm4lD+K bDRfAmdFjCuh8coqUKFoJhKj2ws+p+w3eUdWQlltgQK2m5gUAdyAAsan5F4RXmfwido/qW XDbSXoleuXiCXeDtaEtgxxDlSQjWZnyWYbNU9ovCCGSfNgmkHRLQrEc0D61HXA==
- Authentication-results: relay.mimecast.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="Kl/5UAMS"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (relay.mimecast.com: domain of lucianoelsmitho AT gmail.com designates 209.85.216.53 as permitted sender) smtp.mailfrom=lucianoelsmitho AT gmail.com
Is there a converter from CellML 2.0 to 1.1?
On Tue, Jul 5, 2022 at 1:55 PM Alan Garny
<a.garny AT auckland.ac.nz>
wrote:
>
Hi Matthias,
>
>
Sorry, but libCellML generates CellML 2.0 models while OpenCOR "only"
>
supports CellML 1.0/1.1 at this stage. So, yes, using OpenCOR, you won't be
>
able to edit/run any model generated by libCellML.
>
>
Support for CellML 2.0 in OpenCOR is planned, but it is still some time
>
away. This will be done through libOpenCOR, OpenCOR's new backend which
>
will be using libCellML rather than the original CellML API. (The reason
>
for going the libOpenCOR route is that libOpenCOR will greatly improve our
>
Python bindings.)
>
>
Hopefully, I will have more information to share at COMBINE in October.
>
>
Alan
>
------------------------------
>
*From:*
>
cellml-discussion-request AT lists.cellml.org
>
<
>
cellml-discussion-request AT lists.cellml.org>
>
on behalf of Matthias König <
>
konigmatt AT googlemail.com>
>
*Sent:* Wednesday, 6 July 2022 3:17 am
>
*To:*
>
cellml-discussion AT lists.cellml.org
>
<
>
cellml-discussion AT lists.cellml.org>
>
*Subject:* [cellml-discussion] CellML model not rendered in OpenCOR
>
>
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/doOqCP7Lw5FMD1Apfzp-zw?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/mJLCCQnMx5CrD140fPKLTd?domain=livermetabolism.com
>
konigmatt AT googlemail.com
>
https://protect-au.mimecast.com/s/K3u-CRONy5uBKDP2IP78YT?domain=twitter.com
>
https://protect-au.mimecast.com/s/OSf5CVARD0T94njGHJ-1N7?domain=github.com
>
Archive powered by MHonArc 2.6.18.