From dj.cowan at auckland.ac.nz Mon Jul 6 19:16:14 2009 From: dj.cowan at auckland.ac.nz (Dougal Cowan) Date: Mon, 06 Jul 2009 19:16:14 +1200 Subject: [cellml-discussion] ABI CellML Meeting minutes 2009-07-01 Message-ID: <4A51A4BE.4090609@auckland.ac.nz> I have put the minutes from Wednesday's meeting up at: http://www.cellml.org/meeting_minutes/abi-cellml-meeting-minutes-2009-07-01 Dougal From j.marsh at auckland.ac.nz Tue Jul 14 12:03:27 2009 From: j.marsh at auckland.ac.nz (Justin Marsh) Date: Tue, 14 Jul 2009 12:03:27 +1200 Subject: [cellml-discussion] ABI CellML team meeting minutes 2009-07-08 Message-ID: <4A5BCB4F.9010109@auckland.ac.nz> Dear CellML community, The ABI CellML team meeting minutes for last Wednesday (2009-07-08) are now available at: http://www.cellml.org/meeting_minutes/abi-meeting-minutes-2009-07-09 Kind Regards, Justin Marsh. From dom.layfield at gmail.com Wed Jul 15 08:12:31 2009 From: dom.layfield at gmail.com (Dom Layfield) Date: Tue, 14 Jul 2009 13:12:31 -0700 Subject: [cellml-discussion] Time delays in CellML models? Message-ID: <5f8370730907141312j700b43d8q45ae878f9b7dda82@mail.gmail.com> Is there a recommended/suggested way to add time-delays to a CellML model? I found this model: "A model of HIV-1 pathogenesis that includes an intracellular delay" http://models.cellml.org/exposure/a0c93131fa0a4cc2b1740fdc4076ac78 However, this model will not run in current versions of either PCEnv or COR. I also found this tracker item: https://tracker.physiomeproject.org/show_bug.cgi?id=70 Everything looks pretty unresolved, with no comments since Feb '08. Has there been any progress on this? If not, are there any suggested workarounds? It seems that I might be able to add a variable to a component to provide dynamics that approximate a straight delay. But I can't think of how to do it. As in the model referenced above, there are legions of instances where a time delay would be useful: incubation periods, dissolution times, transit time etc. In my case, I'm trying to model the passage of food through the digestive tract. And unless I incorporate some sort of delay, I'll have the problem of material starting to exit the distal end of the tract immediately that any enters the proximal end. With an organ that is ~8 m long, this doesn't make much physical sense. Can anyone provide any advice? Thanks, -- Dom Layfield From r.britten at auckland.ac.nz Wed Jul 15 10:18:49 2009 From: r.britten at auckland.ac.nz (Randall Britten) Date: Wed, 15 Jul 2009 10:18:49 +1200 Subject: [cellml-discussion] Time delays in CellML models? In-Reply-To: <5f8370730907141312j700b43d8q45ae878f9b7dda82@mail.gmail.com> References: <5f8370730907141312j700b43d8q45ae878f9b7dda82@mail.gmail.com> Message-ID: <000f01ca04d1$146882f0$3d3988d0$@britten@auckland.ac.nz> Recent work on addressing issues with the CellML specification have focussed on reset rules (see https://tracker.physiomeproject.org/show_bug.cgi?id=1543). Some of the discussion on reset rules has touched on how delays may need to be expressed, though this is still unresolved. I have added a comment to tracker item 70 pointing to tracker item 1543. Please join these discussions, we would really appreciate your input. Regards, Randall > -----Original Message----- > From: cellml-discussion-bounces at cellml.org [mailto:cellml-discussion- > bounces at cellml.org] On Behalf Of Dom Layfield > Sent: Wednesday, 15 July 2009 8:13 a.m. > To: cellml-discussion at cellml.org > Subject: [cellml-discussion] Time delays in CellML models? > > Is there a recommended/suggested way to add time-delays to a CellML model? > > I found this model: "A model of HIV-1 pathogenesis that includes an > intracellular delay" > http://models.cellml.org/exposure/a0c93131fa0a4cc2b1740fdc4076ac78 > However, this model will not run in current versions of either PCEnv or COR. > > I also found this tracker item: > https://tracker.physiomeproject.org/show_bug.cgi?id=70 > > Everything looks pretty unresolved, with no comments since Feb '08. > Has there been any progress on this? > > If not, are there any suggested workarounds? It seems that I might be > able to add a variable to a component to provide dynamics that > approximate a straight delay. But I can't think of how to do it. > > As in the model referenced above, there are legions of instances where > a time delay would be useful: incubation periods, dissolution times, > transit time etc. In my case, I'm trying to model the passage of food > through the digestive tract. And unless I incorporate some sort of > delay, I'll have the problem of material starting to exit the distal > end of the tract immediately that any enters the proximal end. With > an organ that is ~8 m long, this doesn't make much physical sense. > > Can anyone provide any advice? > > Thanks, > > -- Dom Layfield > _______________________________________________ > cellml-discussion mailing list > cellml-discussion at cellml.org > http://www.cellml.org/mailman/listinfo/cellml-discussion From lpsmith at spod-central.org Fri Jul 24 09:22:07 2009 From: lpsmith at spod-central.org (Lucian Smith) Date: Thu, 23 Jul 2009 22:22:07 +0100 Subject: [cellml-discussion] 'Model' has pure virtual functions Message-ID: <20090723212207.GA37792@strackenz.spod-central.org> I am just starting to use the CellML DOM API in C++, and am running into problems. Everything compiled fine (I'm using v1.6), but I seem to be unable to declare 'Model' objects because they contain pure virtual functions: This code: cellml_api::Model model; gives me the error: src/module.cpp:1570: error: cannot declare variable 'model' to be of abstract type 'iface::cellml_api::Model' /usr/local/include/IfaceCellML_APISPEC.hxx:163: note: because the following virtual functions are pure within 'iface::cellml_api::Model': /usr/local/include/Ifacexpcom.hxx:25: note: virtual void iface::XPCOM::IObject::add_ref() /usr/local/include/Ifacexpcom.hxx:26: note: virtual void iface::XPCOM::IObject::release_ref() (etc. etc.) Is there a subclass of 'Model' that I need to use instead? The example seems to just use 'Model', but it's in Java. -Lucian (Also, the 'Issue tracker' and 'Support' links on http://www.cellml.org/tools/downloads/cellml_api are broken.) (Also also, all mailman links are also broken, though mailman itself seems to be running.) From dom.layfield at gmail.com Fri Jul 24 09:25:02 2009 From: dom.layfield at gmail.com (Dominick Layfield) Date: Thu, 23 Jul 2009 15:25:02 -0600 Subject: [cellml-discussion] PCEnv question Message-ID: <4A68D52E.9000603@gmail.com> Using PCEnv 0.6rc1, I get the following error: "Equation with no id on the apply or math element" PCEnv (as far as I can see) gives no information about which equation is responsible, and the error message is absolutely unintelligible to me. Can anyone translate this error into plain English and/or give me any tips to help track down where the problem might lie? Thanks, -- Dom From c.lloyd at auckland.ac.nz Fri Jul 24 09:36:05 2009 From: c.lloyd at auckland.ac.nz (Catherine Lloyd) Date: Fri, 24 Jul 2009 09:36:05 +1200 Subject: [cellml-discussion] PCEnv question In-Reply-To: <4A68D52E.9000603@gmail.com> References: <4A68D52E.9000603@gmail.com> Message-ID: <3A0AF8ED-846B-4902-B1FA-494D046D1596@auckland.ac.nz> Hi Dom You can identify the equation by adding "IDs" to all of the MathML namespaces and reloading the model into PCEnv. Alternatively/as well as you can right click on the name of the model in the left hand pane and click "validate". There should be a list of errors/warnings in the right hand pane. Alternatively/as well as - you can email the model to me and I will get back to you ASAP! Best wishes Catherine On 24/07/2009, at 9:25 AM, Dominick Layfield wrote: > Using PCEnv 0.6rc1, I get the following error: > > "Equation with no id on the apply or math element" > > PCEnv (as far as I can see) gives no information about which > equation is responsible, and the error message is absolutely > unintelligible to me. > > Can anyone translate this error into plain English and/or give me > any tips to help track down where the problem might lie? > > Thanks, > > -- Dom > _______________________________________________ > cellml-discussion mailing list > cellml-discussion at cellml.org > http://www.cellml.org/mailman/listinfo/cellml-discussion From ak.miller at auckland.ac.nz Fri Jul 24 12:54:27 2009 From: ak.miller at auckland.ac.nz (Andrew Miller) Date: Fri, 24 Jul 2009 12:54:27 +1200 Subject: [cellml-discussion] 'Model' has pure virtual functions In-Reply-To: <20090723212207.GA37792@strackenz.spod-central.org> References: <20090723212207.GA37792@strackenz.spod-central.org> Message-ID: <4A690643.2090404@auckland.ac.nz> Lucian Smith wrote: > I am just starting to use the CellML DOM API in C++, and am running into > problems. Everything compiled fine (I'm using v1.6), but I seem to be > unable to declare 'Model' objects because they contain pure virtual > functions: > > This code: > > cellml_api::Model model; Hi Lucian, Model is an interface, not a concrete class. The way the API works is that you always work with interfaces, but you never directly create them directly. Instead, you need to use one of the bootstrap methods to get access to an interface for the first object, and then from there use the interfaces to get to everything else you need (working with pointers). See the test programs like the unit tests, and CellML2C, to get an idea of how to call the API from C++. Best wishes, Andrew > > gives me the error: > > src/module.cpp:1570: error: cannot declare variable 'model' to be of > abstract type 'iface::cellml_api::Model' > /usr/local/include/IfaceCellML_APISPEC.hxx:163: note: because the > following virtual functions are pure within 'iface::cellml_api::Model': > /usr/local/include/Ifacexpcom.hxx:25: note: virtual void > iface::XPCOM::IObject::add_ref() > /usr/local/include/Ifacexpcom.hxx:26: note: virtual void > iface::XPCOM::IObject::release_ref() > > (etc. etc.) > > Is there a subclass of 'Model' that I need to use instead? The example > seems to just use 'Model', but it's in Java. > > -Lucian > > (Also, the 'Issue tracker' and 'Support' links on > http://www.cellml.org/tools/downloads/cellml_api are broken.) > > (Also also, all mailman links are also broken, though mailman itself seems > to be running.) > _______________________________________________ > cellml-discussion mailing list > cellml-discussion at cellml.org > http://www.cellml.org/mailman/listinfo/cellml-discussion From j.lawson at auckland.ac.nz Fri Jul 24 15:37:57 2009 From: j.lawson at auckland.ac.nz (James Lawson) Date: Fri, 24 Jul 2009 15:37:57 +1200 Subject: [cellml-discussion] CellML Metadata 1.0 Specification finalised Message-ID: <4A692C95.1010401@auckland.ac.nz> Dear CellML community, The CellML Metadata 1.0 specification has been in draft format for a number of years. Although we recognise that there are many changes and updates required in CellML metadata, we have decided to finalise the specification as it is, since it has not changed since 2005, and has been referenced in many articles. The finalised specification is now available at: http://www.cellml.org/specifications/metadata Kind regards, James Lawson -------------- next part -------------- A non-text attachment was scrubbed... Name: j_lawson.vcf Type: text/x-vcard Size: 278 bytes Desc: not available URL: From j.lawson at auckland.ac.nz Fri Jul 24 15:59:39 2009 From: j.lawson at auckland.ac.nz (James Lawson) Date: Fri, 24 Jul 2009 15:59:39 +1200 Subject: [cellml-discussion] new cellml.org website Message-ID: <4A6931AB.5050103@auckland.ac.nz> Dear CellML community, We have given cellml.org a complete redesign and makeover. We've added some new content and updated old content, and reworked the architecture and design. We hope you like it. Please visit http://www.cellml.org and take a look. With thanks to the cellml.org web working group, in particular Gareth de Walters of the Auckland Bioengineering Institute for his time and sage advice. Kind regards, James -------------- next part -------------- A non-text attachment was scrubbed... Name: j_lawson.vcf Type: text/x-vcard Size: 278 bytes Desc: not available URL: From lpsmith at spod-central.org Sat Jul 25 06:40:16 2009 From: lpsmith at spod-central.org (Lucian Smith) Date: Fri, 24 Jul 2009 19:40:16 +0100 Subject: [cellml-discussion] 'Model' has pure virtual functions In-Reply-To: <4A690643.2090404@auckland.ac.nz> References: <20090723212207.GA37792@strackenz.spod-central.org> <4A690643.2090404@auckland.ac.nz> Message-ID: <20090724184016.GE37792@strackenz.spod-central.org> * Andrew Miller [2009-07-24 01:55] writes: > > Model is an interface, not a concrete class. The way the API works is > that you always work with interfaces, but you never directly create them > directly. Instead, you need to use one of the bootstrap methods to get > access to an interface for the first object, and then from there use the > interfaces to get to everything else you need (working with pointers). Ah, OK. That wasn't clear from the single Java example at http://cellml-api.sourceforge.net/ > See the test programs like the unit tests, and CellML2C, to get an idea > of how to call the API from C++. That'd be great--where are they? I didn't see them or references to them in the documentation. Poking around in the source directory I found tests/ but I'm not sure what I'm looking at there. -Lucian From r.britten at auckland.ac.nz Tue Jul 28 00:27:14 2009 From: r.britten at auckland.ac.nz (Randall Britten) Date: Tue, 28 Jul 2009 00:27:14 +1200 Subject: [cellml-discussion] 'Model' has pure virtual functions In-Reply-To: <20090724184016.GE37792@strackenz.spod-central.org> References: <20090723212207.GA37792@strackenz.spod-central.org> <4A690643.2090404@auckland.ac.nz> <20090724184016.GE37792@strackenz.spod-central.org> Message-ID: <003e01ca0eb5$93d21a90$bb764fb0$@britten@auckland.ac.nz> Hi Lucian Have a look at ./CCGS/tests/CellML2C.cpp Regards, Randall > -----Original Message----- > From: cellml-discussion-bounces at cellml.org [mailto:cellml-discussion- > bounces at cellml.org] On Behalf Of Lucian Smith > Sent: Saturday, 25 July 2009 6:40 a.m. > To: CellML Discussion List > Subject: Re: [cellml-discussion] 'Model' has pure virtual functions > > * Andrew Miller [2009-07-24 01:55] writes: > > > > Model is an interface, not a concrete class. The way the API works is > > that you always work with interfaces, but you never directly create them > > directly. Instead, you need to use one of the bootstrap methods to get > > access to an interface for the first object, and then from there use the > > interfaces to get to everything else you need (working with pointers). > > Ah, OK. That wasn't clear from the single Java example at > http://cellml-api.sourceforge.net/ > > > See the test programs like the unit tests, and CellML2C, to get an idea > > of how to call the API from C++. > > That'd be great--where are they? I didn't see them or references to them > in the documentation. Poking around in the source directory I found > tests/ but I'm not sure what I'm looking at there. > > -Lucian > > _______________________________________________ > cellml-discussion mailing list > cellml-discussion at cellml.org > http://www.cellml.org/mailman/listinfo/cellml-discussion From lpsmith at spod-central.org Tue Jul 28 10:49:50 2009 From: lpsmith at spod-central.org (Lucian Smith) Date: Mon, 27 Jul 2009 23:49:50 +0100 Subject: [cellml-discussion] The CellML library basics Message-ID: <20090727224949.GI37792@strackenz.spod-central.org> (Thanks for the link to the CellML2C source; that was very helpful.) (Also, I'm more than willing to move this to some other forum if it's better suited there.) So, I feel like I'm missing something pretty fundamental here, because I can't figure out how to set the name of a model. The example Java program sets the name with a 'setName' function, but this doesn't exist for the basic C++. The docs say: attribute CellMLAttributeString name The name associated with this CellML element. but trying to do (say) model->name = L"modelname"; tells me 'invalid use of member', which probably refers to the fact that model->name() is a *function* that will give me the name of the model, should it already be set. So I don't know whether the docs are out of date, or if the 'attribute' bit means something I'm unfamiliar with, or what. In other first-encounter-with-the-library news, I am sad that there is no loadFile option, just loadFromURL and createFromText. Is the standard recommendation to convert a filename to a URL, or to load the file and extract the text myself? Thanks for bearing with me through the newbie stage! -Lucian From j.marsh at auckland.ac.nz Tue Jul 28 11:30:08 2009 From: j.marsh at auckland.ac.nz (Justin Marsh) Date: Tue, 28 Jul 2009 11:30:08 +1200 Subject: [cellml-discussion] The CellML library basics In-Reply-To: <20090727224949.GI37792@strackenz.spod-central.org> References: <20090727224949.GI37792@strackenz.spod-central.org> Message-ID: <20090728113008.14641gwyoksrqetc@webmail.bioeng.auckland.ac.nz> Hi Lucian, The basic C++ should have two functions for each member attribute, named after the attribute; one with no arguments, which returns the value of the attribute, and one with one argument which sets the value of the attribute. So, to set the name you would call model->name(L"modelname"); And to get the name, you would call model->name(); These specific functions are located in ./sources/cellml/CellMLImplementation.cpp Different bindings have different conventions; in the Java binding, we use setX and getX methods for attribute X. In the XPCOM binding we have setX and getX as well, but they both take pointers to a container as arguments, and return status flags. I hope this helps. As far as a recommended approach to loading files goes, in the test cases for the API, we assume we are given a URL. In OpenCell, we resolve file locations into URLs. Depending on the libraries you are using, converting file locations into URLs or pulling out the text from a file yourself may be trivial or annoying; we use whichever method is least annoying at the time, which is usually resolving the file location into a URL, unless we are dealing with models that only exist in ram. Best Regards, Justin. Quoting Lucian Smith : > (Thanks for the link to the CellML2C source; that was very helpful.) > > (Also, I'm more than willing to move this to some other forum if it's > better suited there.) > > So, I feel like I'm missing something pretty fundamental here, because I > can't figure out how to set the name of a model. The example Java program > sets the name with a 'setName' function, but this doesn't exist for the > basic C++. The docs say: > > attribute CellMLAttributeString name > The name associated with this CellML element. > > but trying to do (say) > > model->name = L"modelname"; > > tells me 'invalid use of member', which probably refers to the fact that > > model->name() > > is a *function* that will give me the name of the model, should it already > be set. > > So I don't know whether the docs are out of date, or if the 'attribute' > bit means something I'm unfamiliar with, or what. > > > In other first-encounter-with-the-library news, I am sad that there is no > loadFile option, just loadFromURL and createFromText. Is the standard > recommendation to convert a filename to a URL, or to load the file and > extract the text myself? > > Thanks for bearing with me through the newbie stage! > > -Lucian > _______________________________________________ > cellml-discussion mailing list > cellml-discussion at cellml.org > http://www.cellml.org/mailman/listinfo/cellml-discussion > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From lpsmith at spod-central.org Tue Jul 28 11:53:47 2009 From: lpsmith at spod-central.org (Lucian Smith) Date: Tue, 28 Jul 2009 00:53:47 +0100 Subject: [cellml-discussion] The CellML library basics In-Reply-To: <20090728113008.14641gwyoksrqetc@webmail.bioeng.auckland.ac.nz> References: <20090727224949.GI37792@strackenz.spod-central.org> <20090728113008.14641gwyoksrqetc@webmail.bioeng.auckland.ac.nz> Message-ID: <20090727235346.GC89269@strackenz.spod-central.org> * Justin Marsh [2009-07-28 00:31] writes: > Hi Lucian, > > The basic C++ should have two functions for each member attribute, > named after the attribute; one with no arguments, which returns the > value of the attribute, and one with one argument which sets the value > of the attribute. > > So, to set the name you would call > model->name(L"modelname"); > And to get the name, you would call > model->name(); > > These specific functions are located in > ./sources/cellml/CellMLImplementation.cpp Thanks! Is there information like this in the documentation somewhere? I'd rather not have to bug you all every time I have a basic question like this. -Lucian From j.marsh at auckland.ac.nz Tue Jul 28 13:26:38 2009 From: j.marsh at auckland.ac.nz (Justin Marsh) Date: Tue, 28 Jul 2009 13:26:38 +1200 Subject: [cellml-discussion] The CellML library basics In-Reply-To: <20090727235346.GC89269@strackenz.spod-central.org> References: <20090727224949.GI37792@strackenz.spod-central.org> <20090728113008.14641gwyoksrqetc@webmail.bioeng.auckland.ac.nz> <20090727235346.GC89269@strackenz.spod-central.org> Message-ID: <20090728132638.110038a374xvrx72@webmail.bioeng.auckland.ac.nz> Hi Lucian, The documentation at http://cellml-api.sourceforge.net/ is generated from the IDL abstract definition of the api, which is the canonical form of the api. At the moment, there is not much in the way of documentation about how bindings are generated from the IDL, and how the various bindings and the concrete C++ implementation work. The binding generators reside in the ./simple_interface_generators subdirectory of the api; each generator is a Python program which acts as a visitor, and is used by omniorb as it parses the IDL files in the ./interfaces subdirectory during the build process. As far as the examples of the workings of each CellML API component go, each component which has a full program as an example has a tests subfolder (ie ./CIS/tests) which has the source for the program in it. All the unit tests are in the main ./tests subfolder. This has yet to be organised into formal documentation, however. So, please do feel free to ask questions. Best Regards, Justin. Quoting Lucian Smith : > * Justin Marsh [2009-07-28 00:31] writes: >> Hi Lucian, >> >> The basic C++ should have two functions for each member attribute, >> named after the attribute; one with no arguments, which returns the >> value of the attribute, and one with one argument which sets the value >> of the attribute. >> >> So, to set the name you would call >> model->name(L"modelname"); >> And to get the name, you would call >> model->name(); >> >> These specific functions are located in >> ./sources/cellml/CellMLImplementation.cpp > > Thanks! Is there information like this in the documentation somewhere? > I'd rather not have to bug you all every time I have a basic question like > this. > > -Lucian > _______________________________________________ > cellml-discussion mailing list > cellml-discussion at cellml.org > http://www.cellml.org/mailman/listinfo/cellml-discussion > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From ak.miller at auckland.ac.nz Tue Jul 28 13:27:10 2009 From: ak.miller at auckland.ac.nz (Andrew Miller) Date: Tue, 28 Jul 2009 10:27:10 +0900 Subject: [cellml-discussion] The CellML library basics In-Reply-To: <20090727235346.GC89269@strackenz.spod-central.org> References: <20090727224949.GI37792@strackenz.spod-central.org> <20090728113008.14641gwyoksrqetc@webmail.bioeng.auckland.ac.nz> <20090727235346.GC89269@strackenz.spod-central.org> Message-ID: <4A6E53EE.6030306@auckland.ac.nz> Lucian Smith wrote: > * Justin Marsh [2009-07-28 00:31] writes: > >> Hi Lucian, >> >> The basic C++ should have two functions for each member attribute, >> named after the attribute; one with no arguments, which returns the >> value of the attribute, and one with one argument which sets the value >> of the attribute. >> >> So, to set the name you would call >> model->name(L"modelname"); >> And to get the name, you would call >> model->name(); >> >> These specific functions are located in >> ./sources/cellml/CellMLImplementation.cpp >> > > Thanks! Is there information like this in the documentation somewhere? > I'd rather not have to bug you all every time I have a basic question like > this. > Hi Lucian, I'm moving this to the cellml-tools-developers list; it is a good one for questions relating to tools that process CellML as some people get upset if there is too much software related discussion on cellml-discussion. We are a bit lacking on some aspects of documentation for API users, as you have discovered. We have some information on the PCM - Physiome C++ Mapping in the docs subdirectory, but maybe not enough high-level documentation to get people started. It is often difficult for people already familiar with things to identify what new developers need to know the most, and so if you have created any documentation / notes / comments on what you discovered early on, it would be very useful to other people starting out with the API (or at least to aid the process of documentation), and so contributing it back would be useful. The Physiome Tracker would be a good way to manage correspondence with respect to documentation. See https://tracker.physiomeproject.org Best wishes, Andrew > -Lucian > _______________________________________________ > cellml-discussion mailing list > cellml-discussion at cellml.org > http://www.cellml.org/mailman/listinfo/cellml-discussion > From lpsmith at spod-central.org Thu Jul 30 06:50:02 2009 From: lpsmith at spod-central.org (Lucian Smith) Date: Wed, 29 Jul 2009 19:50:02 +0100 Subject: [cellml-discussion] Modules and Components Message-ID: <20090729185002.GC31569@strackenz.spod-central.org> So, my current project is to translate CellML to Antimony, and take advantage of the modularity in both. So I have a couple questions about that, first, to make sure I understand CellML modularity, and second, to ask all of you how you would expect to find CellML's modules converted. So, as I understand it, there are two ways to modularize a CellML model. You can put variables into components, and/or you can put models into files. For now, there is a 1:1 relationship between files and models--one file will contain exactly one model. One model might contain any number of components, but only one copy of each. If you want multiple copies of a module, you need to put it in another file, then import that model multiple times. There is no such thing as an imported model that is not part of the model that imports it, though it's possible to import a model and not connect it to anything, thereby creating, in effect, two separate models that are running at the same time. (Well, I guess you'd still have to connect 'time' in those models. What if you didn't?) Any aspect of an element of a model is only defined once, by design. I am not sure what happens if a variable in one component is given (say) an initial value, and another variable in a different component is given a different initial value, and then the two are connected. Is that invalid CellML? Can you only connect things that have compatible public_interface bits set? At any rate, it is at least clear that the intent is to set the public_interface parts appropriately. In Antimony, each module is distinct from the other modules, much as if they had been converted to different files in CellML--they can be imported as needed into other models, but have their own separate existence, and can function as complete models on their own. Given this, I'm inclined to convert CellML components into Antimony models, 'promoting' them. My worry is that in practice, CellML components might be pretty small, and promoting each component to a full-fledged model might not make much sense. But on the other hand, if I flatten all components to a single Antimony model, all the modularity within a model will have been lost, which also seems unfortunate. So it seems like a good question to ask the CellML community--would you rather see components fully modularized, or flattened? And going back the other way, will converting Antimony modules to CellML components be enough, or would you prefer to see them as distinct CellML files/models? (This also has ramifications in the future, when SBML gets modularity, or 'hierarchical modeling', as they're calling it, so I'm sure the issue will be raised again in the future.) Thanks! -Lucian Smith From m.cooling at auckland.ac.nz Thu Jul 30 12:00:32 2009 From: m.cooling at auckland.ac.nz (Michael Cooling) Date: Thu, 30 Jul 2009 12:00:32 +1200 Subject: [cellml-discussion] Modules and Components In-Reply-To: <20090729185002.GC31569@strackenz.spod-central.org> References: <20090729185002.GC31569@strackenz.spod-central.org> Message-ID: <20090730120032.98946yojh8q4ldb4@webmail.bioeng.auckland.ac.nz> Dear Lucian I'd like to start by keeping a distinction between a CellML , which I'll denote with angle brackets, and a model in the way people use that word (which can be a very slippery and ambiguous term). As you say, you can partition variables (and mathematics) into components, and you can also place components (wrapped in s) in different files. In CellML, a model and a component are not equivalent concepts - models may also encompass none, one or many unit definitions, information on the hierarchical grouping of components, annotations, and connections between component variables. The question about creating two separate models in a single is interesting. I enclose a cellml file that does this. Time is not an implicit concept in Cellml so as you will see in this I have two time variables, t1 and t2. I essentially have (in one component, even) two models, one tracking the change in A over t1, and one tracking B over t2. While it is possible to do this, most models I have seen simply have one time variable. But in CellML it is possible to have many. As a slight tangent, as well as importing the same component to get multiple 'copies', I do know one researcher who uses cut-n-paste to achieve the same goal . That seems potentially bad to me, but for that researcher there are other constraints.... my point is that there is another possible way, even if few choose to take it (for good reason). Connecting two variables up with different initial conditions is something of a contradiction. Perhaps think of the element as declaring a statement of equivalency. When time = 0, we would be declaring that two unequal quantities are in fact equal.... I haven't tried it but I would expect OpenCell to report that the model is overconstrained in that case. The question about public/private interfaces interacts with grouping (the hierarchical component structure information which may be present in a model). Have you seen the CellML spec? http://www.cellml.org/specifications/cellml_1.1 Or, you can email me if you like and I will try to answer your questions, (although I'm on leave after tomorrow morning) - sometimes it's easier and quicker just to talk to someone :). In my work with CellML, we have certainly gone in the 'fully modularised' direction. One advantage is that modularised models can be refined independently and for large systems that is desirable. It is also possible to write a tool to 'flatten' a model should you need it (and often they are more flexible for certain tasks when flattened), whereas going the other way automatically might be more tricky (although, I think, still possible if you don't mind the potential of losing some kinds of information along the way). To some extent, I would say it depends what you are trying to do, but the modular approach seems more flexible to me, even if there is sometimes extra overhead in terms of model verbosity and processing. Finally, would you mind sending me a preprint or similar of your Antimony paper? In theory I should have access to it, but I seem to be having some problems with that just now, and it sounds intriguing :). Cheers, Mike. Quoting Lucian Smith : > So, my current project is to translate CellML to Antimony, and take > advantage of the modularity in both. So I have a couple questions about > that, first, to make sure I understand CellML modularity, and second, to > ask all of you how you would expect to find CellML's modules converted. > > So, as I understand it, there are two ways to modularize a CellML model. > You can put variables into components, and/or you can put models into > files. For now, there is a 1:1 relationship between files and models--one > file will contain exactly one model. One model might contain any number > of components, but only one copy of each. If you want multiple copies of > a module, you need to put it in another file, then import that model > multiple times. There is no such thing as an imported model that is not > part of the model that imports it, though it's possible to import a model > and not connect it to anything, thereby creating, in effect, two separate > models that are running at the same time. (Well, I guess you'd still have > to connect 'time' in those models. What if you didn't?) > > Any aspect of an element of a model is only defined once, by design. I am > not sure what happens if a variable in one component is given (say) an > initial value, and another variable in a different component is given a > different initial value, and then the two are connected. Is that invalid > CellML? Can you only connect things that have compatible public_interface > bits set? At any rate, it is at least clear that the intent is to set the > public_interface parts appropriately. > > > In Antimony, each module is distinct from the other modules, much as if > they had been converted to different files in CellML--they can be imported > as needed into other models, but have their own separate existence, and > can function as complete models on their own. > > Given this, I'm inclined to convert CellML components into Antimony > models, 'promoting' them. My worry is that in practice, CellML components > might be pretty small, and promoting each component to a full-fledged > model might not make much sense. But on the other hand, if I flatten > all components to a single Antimony model, all the modularity within a > model will have been lost, which also seems unfortunate. So it seems like > a good question to ask the CellML community--would you rather see > components fully modularized, or flattened? And going back the other way, > will converting Antimony modules to CellML components be enough, or would > you prefer to see them as distinct CellML files/models? > > (This also has ramifications in the future, when SBML gets modularity, or > 'hierarchical modeling', as they're calling it, so I'm sure the issue will > be raised again in the future.) > > > Thanks! > > -Lucian Smith > _______________________________________________ > cellml-discussion mailing list > cellml-discussion at cellml.org > http://www.cellml.org/mailman/listinfo/cellml-discussion > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. -------------- next part -------------- A non-text attachment was scrubbed... Name: TwoTimer.cellml Type: application/cellml+xml Size: 855 bytes Desc: not available URL: