Re: [cellml-discussion] [sbml-distrib] New draft secondary specification: Uncertainty

2012-05-29 Thread Lucian Smith
* Andrew Miller ak.mil...@auckland.ac.nz [2012-05-29 10:52] writes:
 On 29/05/12 20:17, Michael Clerx wrote:
  Dear all,
 
  I'm glad to see uncertainty being taken into acount in cell models.
  Perhaps it would be worthwhile to add the scenario where no assumptions
  are made about the uncertainty and a parameter value is simply given by
  its upper and lower bounds.
 
 I agree that there needs to be some way to handle that scenario. 
 However, it might be that in most cases where people do that, a uniform 
 distribution with upper and lower bounds will suffice - it seems to me 
 that saying a random variable is distributed uniformly between an upper 
 and lower bound is an explicit statement that the modeller knows that 
 the value falls in certain bounds, but has no reason to believe it is 
 any more likely to fall in one place within those bounds than anywhere else.

A uniform distribution is a huge assumption about a given range; I believe 
it would be not at all justified to make such an assumption by default.  
If the user knows that the value is distributed in a uniform linear 
fashion, they should be able to say that; likewise a uniform log or a 
normal or an Epanechnikov kernel.  But telling them they have to pick, or, 
worse, assuming you know when they didn't tell you is dangerous.

-Lucian
___
cellml-discussion mailing list
cellml-discussion@cellml.org
http://lists.cellml.org/mailman/listinfo/cellml-discussion


[cellml-discussion] (forw) JSim 2.06 released

2012-02-02 Thread Lucian Smith
Some of you might be interested in this--JSim now has CellML output as 
well as CellML input.  Since JSim models themselves are not modular, 
everything gets put into a single component; there is hope that in the 
future when JSim itself is modular, it will be able to produce modular 
CellML output.  A few more details at 

http://physiome.org/jsim/docs/MML_CellML.html#exporting

-Lucian

- Forwarded message from Erik Butterworth butt...@bioeng.washington.edu 
-

From: Erik Butterworth butt...@bioeng.washington.edu
Reply-To: Erik B butt...@u.washington.edu
To: JSim Development -- Adam Alessio aales...@u.washington.edu,
Dr. James Caldwell jc...@u.washington.edu,
Forbes Dewey cfde...@mit.edu, Huhns, Michael hu...@engr.sc.edu,
Melissa Krueger krue...@u.washington.edu,
Max Neal mn...@u.washington.edu,
David Nickerson d.nicker...@auckland.ac.nz,
Bart Jardine bar...@u.washington.edu,
Gary Raymond ga...@u.washington.edu,
Dr. James Bassingthwaighte j...@u.washington.edu,
Lucian Smith lpsm...@u.washington.edu,
Rebecca Rowe rebika...@gmail.com, Dash, Ranjan rd...@mcw.edu,
Richard Ward ward...@ornl.gov, Herb Sauro hsa...@u.washington.edu,
Andreas Schwab andreas.sch...@staff.mcgill.ca,
Shiva Ayyadurai vash...@mit.edu,
Gary Ynvge gyn...@cs.washington.edu,
Adam Alessio aales...@u.washington.edu
Subject: JSim 2.06 released
Date: Thu, 2 Feb 2012 10:01:48 -0800 (PST)
Message-ID: pine.lnx.4.64.1202020955210.4...@frodo.bioeng.washington.edu

  Highlights:

  o  new Monte-Carlo analysis module;

  o  CellML output is now available;

  o  various bug fixes,  including one in SBML import which previously
mishandled time-varying compartment volumes.

  See the JSim home page for complete information on JSim, including 
documentation, downloads, documentation and model repositories:

http://physiome.org/jsim/

  For complete details on the latest release, click on What's New?

  Note to QPP users:  JSim 2.06 should not be used with the previous
QPP release (0.913).  A new QPP release, 0.914, will be made later today
that is compatible with JSim 2.06.

Erik Butterworthbutt...@uw.edu206-685-2007
Software Engineer, University of Washington Bioengineering
http://physiome.org/~butterw/

- End forwarded message -
___
cellml-discussion mailing list
cellml-discussion@cellml.org
http://lists.cellml.org/mailman/listinfo/cellml-discussion


[cellml-discussion] Independent variables, and delay

2011-12-16 Thread Lucian Smith
A couple questions.  One:  is there a defined way in CellML to find the 
independent variables?  The spec says (about 'initial_value'):

  This attribute provides a convenient means for specifying the value of a 
  scalar real variable when all independent variables in the model have a 
  value of 0.0. Independent variables are those whose values do not depend 
  on others. 

From that definition, it would seem that if you defined 'pi' in your 
model, the initial value would apply when pi was equal to 0.

But more generally, if you have a single equation in your model:  

u = sin(t)

That's a single equation with two variables--how do you decide that you 
want to vary t and not u?  Do you just apply heuristics, so if you see 
'dx/dy' you assume y is the independent variable?  Is it part of what you 
do *with* a CellML model, that you present the user with t and u as 
possible options, and they pick one?


My second question is a bit simpler:  is there a way to define a delay 
equation in CellML and if so, how do you do it?  (A delay being 
something like 'x, 2 seconds ago'.)

-Lucian
___
cellml-discussion mailing list
cellml-discussion@cellml.org
http://lists.cellml.org/mailman/listinfo/cellml-discussion


Re: [cellml-discussion] nested components in CellML

2011-10-21 Thread Lucian Smith
* Maxwell Neal mn...@u.washington.edu [2011-10-21 22:03] writes:
 Hi all,
 
 I was wondering - can CellML models have nested components?  That is, are 
 there instances where some model component is a component in another model 
 component?
 Thanks,

Yes--this is covered by the concept of encapsulation.  See 
http://www.cellml.org/getting-started/tutorials/tutorial/best_practice/#grouping
for more detail, but basically you set up a whole tree of nested 
components, and this nesting determines the rules for how you can connect 
the variables in those components.

Also, an imported component from another file that encapsulates other 
components brings those components (and corresponding connections) with 
it in the import.

Is that a reasonable summary, list denizens?

-Lucian
___
cellml-discussion mailing list
cellml-discussion@cellml.org
http://lists.cellml.org/mailman/listinfo/cellml-discussion


Re: [cellml-discussion] ABI CellML Meeting Minutes, 25th May 2011

2011-05-26 Thread Lucian Smith
For what it's worth, it's 'Darren', not 'Darryl' (the SBML 'distrib' 
package guy).

-Lucian

* Dougal Cowan dj.co...@auckland.ac.nz [2011-05-26 22:32] writes:
 I have put the minutes from this week's meeting up at:
 
 http://www.cellml.org/community/meeting/minutes/2011/05.25
 
 Cheers,
 Dougal
 
 ___
 cellml-discussion mailing list
 cellml-discussion@cellml.org
 http://lists.cellml.org/mailman/listinfo/cellml-discussion
___
cellml-discussion mailing list
cellml-discussion@cellml.org
http://lists.cellml.org/mailman/listinfo/cellml-discussion


Re: [cellml-discussion] Unofficial draft CellML specification - backwards compatibility, type attributes on variables

2011-02-01 Thread Lucian Smith
* Andrew Miller ak.mil...@auckland.ac.nz [2011-02-02 03:27] writes:
 Hi all,
 
 I've just put up an unofficial draft CellML specification up at 
 http://www.cellml.org/Members/miller/draft-normative-spec-andrews-preferred/toplevel.xhtml
  
 to prototype what some of the new features could look like.
 
 This version has the following features:
   Backwards and forwards compatibility with CellML 1.1.
   A new attribute, type, on variables. It defaults to real, but can 
 alternatively point to a URL defining the type (it is up to secondary 
 specifications to define the meaning of URLs other than the one for real 
 values defined in the specification).
 
 The source for generating the specification and creating your own draft 
 version is up at http://repo.or.cz/w/cellml-draft-miller.git - the 
 andrews-preferred-version branch was used to generate the XHTML linked to.

The section on MathML was a little vague--are *all* valid MathML 
constructs valid CellML constructs, or only a subset?

Also, I didn't see anything in there about events--are those being 
deferred again?

My only other suggestion is that eventually you'll want pictures in there 
;-)

-Lucian
___
cellml-discussion mailing list
cellml-discussion@cellml.org
http://lists.cellml.org/mailman/listinfo/cellml-discussion


Re: [cellml-discussion] Fwd: [Fwd: Fwd: Curation flags]

2010-06-03 Thread Lucian Smith
My only comment is that lines 6 and 9 ('is it valid?' and 'is it 
simulatable?') are the ones I'd be looking at/for the most, so if those 
bit of the glyphs were emphasized or at least easy to pick out, that'd be 
great.

-Lucian

* Catherine Lloyd c.ll...@auckland.ac.nz [2010-06-03 13:27] writes:
 My apologies - my original email was more exclusive to its recipients  
 that to the discussion list!
 
 I will be happy to leave this another week to give anyone else a  
 change to respond if they have comments.
 
 Best wishes
 Catherine
 
 
 
 
 Begin forwarded message:
 
 *From: *Catherine Lloyd c.ll...@auckland.ac.nz 
 mailto:c.ll...@auckland.ac.nz 
 *Date: *13 May 2010 9:22:00 AM
 *To: *biomodels-net-disc...@lists.sourceforce.net 
 mailto:biomodels-net-disc...@lists.sourceforce.net 
 *Cc: *Poul Nielsen p.niel...@auckland.ac.nz 
 mailto:p.niel...@auckland.ac.nz , Tommy Yu tommy...@auckland.ac.nz  
 mailto:tommy...@auckland.ac.nz, David Nickerson 
 d.nicker...@auckland.ac.nz mailto:d.nicker...@auckland.ac.nz, Peter 
  Hunter p.hun...@auckland.ac.nz mailto:p.hun...@auckland.ac.nz, 
  Randall Britten r.brit...@auckland.ac.nz 
  mailto:r.brit...@auckland.ac.nz
 *Subject: **Curation flags*
 
 Dear All
 
 During my last visit to the EBI in August last year I circulated a  
 document describing the issues we have with the current star system  
 of curation ratings, and the proposal to replace these stars with  
 more meaningful curation flags. Once I was back in Auckland James  
 Lawson and I went through several iterations of testing out  
 different flag options, and the topic was also extensively  
 discussed at the weekly team meetings and also on the Physiome  
 Tracker (https://tracker.physiomeproject.org/show_bug.cgi?id=87).  
 Further, the topic was raised at the CellML workshop in February  
 this year.
 
 In the end, as the bare minimum (we are happy to add further flags  
 if needs be), we decided to go with the MIRIAM guidelines (see  
 attached spreadsheet).  This highlighted 2 issues with all the  
 CellML models in the current repository - 1) None were associated  
 with a specific terms of use/distribution and 2) None were  
 annotated with biological data.
 
 The former has been addressed and we have chosen a creative commons  
 attribution licence to cover all the data in the repository.  Tommy  
 has been implementing a terms of use page and also a how to cite  
 this model page.  We'd also like to include the licence term in  
 the metadata of each model (we have found the correct RDF tag for  
 this).
 
 The latter issue is still being addressed.  I have annotated 2  
 CellML models (Goldbeter 1991 and Teusink 2000) but we have to  
 decide if this is the way we want to annotate models, and if so,  
 confirm it in the metadata specification.  Also until we have  
 better annotation tools, adding these terms using a text editor is  
 the only method available and it is less than ideal - that said, I  
 will be meeting Allyson and Morgan next week to see if it is  
 possible for me to use Saint to annotate the models.  This would be  
 fantastic from my point of view - BUT - there is then the danger of  
 me annotating several models in a certain way - only to have to re- 
 do them later when it's decided the method of annotation has to  
 change.
 
 I'll also attend the annotation meeting at the EBI next week.
 
 I'm circulating this now at the request of the BioModels team, who  
 are interested in our thoughts on the flags.  Ideally the two  
 efforts would adopt the same set of flags.
 
 Camille and Lukas looked at our spreadsheets a while ago, and the  
 attached spreadsheet has been modified in response to their  
 comments.  Additional feedback is always welcome.
 
 Once we have confirmed the set of flags, Tommy will be able to  
 start to implement them in the next version of PMR2.
 
 Best wishes
 Catherine
 
 
 
 
 
 
 
 
 
 

 ___
 cellml-discussion mailing list
 cellml-discussion@cellml.org
 http://www.cellml.org/mailman/listinfo/cellml-discussion

___
cellml-discussion mailing list
cellml-discussion@cellml.org
http://www.cellml.org/mailman/listinfo/cellml-discussion


Re: [cellml-discussion] Fwd: [Fwd: Fwd: Curation flags]

2010-06-03 Thread Lucian Smith
* Catherine Lloyd c.ll...@auckland.ac.nz [2010-06-03 20:55] writes:
 Hi Lucian
 
 Adding to that, I'll emphasise again that this list forms the bare  
 minimum and we will be happy to expand on the list in the future.   
 validity and simulation could be two areas which we choose to  
 expand on first - for example simulation in a specific named tool, etc.

I think 'validity' probably isn't worth spending too much time on.  If 
it's not valid, there are probably a bajillion ways it can be invalid, and 
the actual 'this file is invalid on line 3 because...' message you get 
from the API is probably more valuable than trying to classify all the 
invalidity error messages into curatable groups.  (Though perhaps 'the 
model is overspecified' might be a handy particular thing to know?  And 
maybe it wouldn't be too hard to say 'the model is syntactically invalid' 
vs 'the model is semantically invalid'?)

However, 'simulation' probably *is* a more productive area in which to 
expand--if you could tell, in general, what kind of math techniques a 
model needed to be simulated, you could tell if your simulator 
(/translator) could handle those techniques.  ODE's, PDE's, algebraic 
rules, etc.

-Lucian
___
cellml-discussion mailing list
cellml-discussion@cellml.org
http://www.cellml.org/mailman/listinfo/cellml-discussion


[cellml-discussion] CellML models in Antimony format

2010-04-23 Thread Lucian Smith
Thanks to the help of many of you on this list, I now have a working 
CellML-to-Antimony translator, and have used it to translate all the 
models at models.cellml.org into the Antimony format.  The results are at:

http://antimony.sourceforge.net/antimony-cellml.html

along with SBML versions of those files, as translated from Antimony.  
These SBML versions are probably not as good as those created with the 
existing cellml2sbml translators--various aspects of the CellML files have 
been lost.  They do, however, work for 1.1 models, which (I believe) some 
cellml2sbml translators are unable to do (thanks to the use of the CellML 
API).

The main advantage of this translator is that it preserves and translates 
the modularity from the CellML format to the Antimony format.  The 
Antimony format is very similar to the as-yet-hypothetical hierarchical 
modeling package for SBML, and thus should provide a good basis for 
future translations between CellML and that SBML package.  This modularity 
includes the 'encapsulation' concept in CellML--if one compartment 
'encapsulates' another in a CellML file, that corresponding parent module 
in Antimony will contain the submodule.

All of the math found in ~92% of the models was successfully translated; 
of the remaining 8%, most were due to Antimony's insistence that 
assignment rules not be defined circularly, and the remainder tended to be 
little-used CellML constructs such as partial differential equations or 
rates of change with respect to some non-time variable.  All elements like 
this that failed to translate are mentioned in a comment a the top of the 
file.

Other aspects that we didn't attempt to translate include units, 
compartments, and annotation.  (And reactions, but there are zero 
reactions at cellml.org, so I think we're safe there.)  We hope that 
future versions of the translator will include these aspects, at least 
insofar as cellml-antimony-SBML translators.

If you have comments on how well or how poorly we managed to translate 
your favorite CellML model to Antimony, we would love to hear from you.  

Thank you!

-Lucian
___
cellml-discussion mailing list
cellml-discussion@cellml.org
http://www.cellml.org/mailman/listinfo/cellml-discussion


Re: [cellml-discussion] Leftover thoughts from the CellML workshop

2010-03-16 Thread Lucian Smith
(Whoops, I meant to send this to the list, but replied directly to Poul 
instead...)

- Forwarded message from Lucian Smith lpsm...@spod-central.org -

A couple follow-up thoughts:

* Poul Nielsen p.niel...@auckland.ac.nz [2010-03-11 03:28] writes:
 Dear Lucian
 
 Many thanks for your participation in the CellML workshop and subsequent 
 comments.
 
 On 2010-02-27, at 08:43, Lucian Smith wrote:
 
  CellML 1.2:
 One thing I noticed was the claim that events could be stored in 
  CellML as piecewise formulas.  I'm pretty sure that won't be the case with 
  SBML events, which are 'fire once' events instead of 'true while' events.  
  Maybe one could come up with a piecewise hack to store SBML events, but if 
  a goal is to become more amenable to SBML-translated models, you might 
  want to think about how best to translate SBML events.  Or maybe I'm wrong 
  and there's already a way to do it?
 Another thing I noticed was a reluctance to add too many new features 
  to the language in the fear that interpreters might not be able or willing 
  to handle them.  One way to mitigate this would be to allow models to 
  claim somewhere in the header whether the model required that feature or 
  not--an interpreter could then more cleanly note whether it was able to 
  correctly interpret a given model, while still being able to interpret 
  other 1.2 models.

 I don't think the goal is necessarily to become more amenable to 
 SBML-translated models. What we are most strongly motivated by is to 
 come up with simple, powerful generic mechanisms for representing events 
 and behaviours that depend on them. I would value your thoughts on why 
 piecewise representations are insufficient for handling events.

Certainly I don't think SBML translation is *the* goal of CellML 1.2, I 
just posited that it might be *a* goal.

Piecewise functions say while (condition), the following is always true.  
SBML events say when (condition) becomes true, set the following to be 
true at that instant, and let it change after that.

Depending on the nature of the condition, these can be very different 
beasts.  As an example, you could have a species X controlled by various 
reactions, and at regular intervals, it's being injected into the system 
(daily feeding, say).  An SBML event would just say something like 'when 
time is a multiple of 24, X = X+5'.  A piecewise function would have to 
incorporate that event into all the other things that change X.  It might 
be possible, but the resulting expression will probably be very 
complicated.  And it might be impossible to write any sort of automatic 
translator that translated SBML events to CellML.

At the core, SBML events allow you to separate 'the sort of math the 
normally happens to these variables' from 'these things happen every so 
often, and the model adjusts accordingly'.  If you require those two 
things to be mushed together into piecewise functions, I *think* you could 
probably end up with a function that produced the same output (though 
there might be some counter-examples), but it would be complicated.  I'm 
not saying you definitely should add SBML-style events to CellML, but the 
tradeoff is simplicity for interpreters if you leave it as-is vs. 
simplicity for modelers if you add some new construct.

-Lucian
___
cellml-discussion mailing list
cellml-discussion@cellml.org
http://www.cellml.org/mailman/listinfo/cellml-discussion


[cellml-discussion] Leftover thoughts from the CellML workshop

2010-02-26 Thread Lucian Smith
Thanks to all of you who were at the workshop for letting me attend 
remotely.  I found it quite valuable, and hope you didn't mind me asking 
you all to repeat the questions too often.  And special thanks to 
Catherine for being the driving force behind getting it all set up!

I had a couple extra thoughts on some of the presentations, which I 
probably would have chatted with you about had I been there, but since I 
wasn't, here they are in email instead.

The OpenCell network visualization tool:  
 I agree that there is definitely a need both for automatically-
generated network visualization and for human-arranged network 
visualization.  One thing that might help this is to have a standard for 
exchanging or at least storing these--I know SBML has a 'layout extension' 
that stores the visual representation of SBML models.  I don't know if a 
CellML extension is the right way to go or if that information is better 
suited to storing in a separate file, but you could at least look at that 
extension for an example of the information you'd want to store.

CellML 1.2:
One thing I noticed was the claim that events could be stored in 
CellML as piecewise formulas.  I'm pretty sure that won't be the case with 
SBML events, which are 'fire once' events instead of 'true while' events.  
Maybe one could come up with a piecewise hack to store SBML events, but if 
a goal is to become more amenable to SBML-translated models, you might 
want to think about how best to translate SBML events.  Or maybe I'm wrong 
and there's already a way to do it?
Another thing I noticed was a reluctance to add too many new features 
to the language in the fear that interpreters might not be able or willing 
to handle them.  One way to mitigate this would be to allow models to 
claim somewhere in the header whether the model required that feature or 
not--an interpreter could then more cleanly note whether it was able to 
correctly interpret a given model, while still being able to interpret 
other 1.2 models.

Roundtrip translators:  
I think I'm coming around to the theory that we don't need non-lossy 
translators--that's probably an unattainable goal.  What might be more 
helpful instead is roundtrop re-integrators.  What I mean by that is that 
nobody actually needs a way to round-trip a model that has never been 
modified, because you still have the original.  Instead, what you need is 
a way to translate a model to a new format, modify it in that new format, 
translate it back to the original format, and end up with a model that is 
identical to the original model except for those bits that have been 
changed.  I think the best hope for this is if you take the original model 
and the round-tripped-and-modified model, and re-integrate the two.

Obviously, the trickiest bit of this is if you've modified the model by 
deleting something--you need to know that the round-tripping was *able* to 
keep the information, so that if it's gone, that means it's been deleted 
on purpose.  But everything else can stay.  Similarly, you need to know if 
the format of the information will have changed, and if so, how to map the 
new format to the old format.  This may well be the trickier bit--I 
certainly don't know off the top of my head what a good algorithm would be 
to track CellML's modularity through modularless SBML, for example.  But 
perhaps with the Hierarchical Modeling extention up and running SBML, this 
would become attainable?

At any rate, I'd be interested in others' thoughts on this.  I'm certainly 
not saying that translators should discard information they could have 
saved--the more information they save, the better.  I just think there 
will alwaybe be information they can't save (even if it's just some 
proprietary annotations), and re-itegration seems like the way to go here.

-Lucian
___
cellml-discussion mailing list
cellml-discussion@cellml.org
http://www.cellml.org/mailman/listinfo/cellml-discussion


Re: [cellml-discussion] Lucian's questions

2010-02-23 Thread Lucian Smith
* Catherine Lloyd c.ll...@auckland.ac.nz [2010-02-23 22:50] writes:
 Dear Andrew
 
 I am forwarding Lucian's questions onto you in case you feel you have  
 to file tracker items for any of them or need to get in touch with  
 Lucian again.
 
 I am also opening it up to the discussion list in case anyone else  
 would like to comment.

I can at least put the answers I got; here they are:

 Begin forwarded message:
 
 From: Lucian Smith lpsm...@spod-central.org
 
 -Currently, I must run my program from the directory with the  
 'components/'
 subdirectory.  Is there a way I can set things up so I can run my  
 program
 from anywhere?

The short answer is 'yes'; the longer answer is 'look at the OpenCell 
Installer'.  I may need some help here, but it's at least a start.

 -In the model bertram_satin_pedersen_luciani_sherman_2007.cellml,  
 'lambda'
 gets translated into infix with a '$' before it.  Is this because  
 'lambda'
 is also a function name?  Does this happen with any other variables?

Yes.  Any variable may be prepended with the '$'; it's *required* for any 
variable that is also a reserved word.  There may be a list of reserved 
words somewhere; someone said they'd look into forwarding me a copy.

 -Is there documentation about how you define your infix?

Not externally, but it's inside the help in OpenCell.

 -If I get a 'failed to load external entity' exception, it SIGABRTs  
 me,
 despite being supposedly wrapped in one of those 'nsresult'  
 thingummies, and
 try/catch doesn't seem to work.  What do I need to do to catch this?
 
 code:
 bool Registry::LoadCellML(nsCOMPtrcellml_apiIModel model)
 {
  if (model == NULL) return true;
  nsresult rv;
  nsCOMPtrcellml_servicesICeVASBootstrap  
 cevasboot(do_GetService(CEVAS_BOOTSTRAP_CONTRACTID, rv));
  NS_ENSURE_SUCCESS(rv, true);
 
  nsCOMPtrcellml_servicesICeVAS cevas;
  try {
rv = cevasboot-CreateCeVASForModel(model, getter_AddRefs(cevas));
  }
  catch (...){
return true;
  }
 
 
 result:
 I/O warning : failed to load external entity /home/lpsmith/CellML/ 
 models/.\ImportExample2.cellml
 terminate called after throwing an instance of  
 'iface::cellml_api::CellMLException'
  what():  std::exception
 
 Program received signal SIGABRT, Aborted.
 0xb7f5b430 in __kernel_vsyscall ()
 

Basically, this is a bug, so I submitted a tracker item for it.  Andrew 
had a workaround (I believe), but I don't remember what it was; it's a 
low enough priority item for me I think I'll just wait for the fix.

 -Speaking of, the above problem was due to the imported file name  
 being
 called .\ImportedExample2.cellml instead of ./ 
 ImportedExample2.cellml
 (and me running on a unix platform).  Is there a good cross-platform  
 method
 for fixing this problem?

This turned out to also be a bug in the example CellML file (the file in 
question was named 'CompletedImportExample.cellml').  I submitted a 
different tracker item for that.  Basically, the answer was 'use / and not 
\'.

 -Can I get a zip file of all the cellml models on cellml.org from  
 anywhere?

The short answer was What? and the long answer was Um, maybe?  There 
may be a script that uses mercurial that could work for this. I still 
think such a zip file would be very useful for anyone who wants to 
translate models or just test their own systems.  Biomodels does this 
(albeit with a lower number of models), and that's what I always grab when 
I'm testing things.  If in the future I wanted to provide Antimony 
versions of CellML models, it would be great if I could update those 
translations with the current versions at the repository.

One possibility would be to download the cellml files grouped by their 
curation status: cellml_threestar_models.tar.gz, etc.

 -hypertrophy_or_deterioration_parent.cellml
 -faville_model_2008:  This model is recursive.  When I loop over its
 components, some components come up multiple times, every time under  
 the
 original name.  My code then sees the same thing again, and fails.   
 How
 would I get the *new* name for the component?  Here's the current  
 code:
 
  while (component != NULL) {
numcomps++;
//Each CellML 'component' becomes its own Antimony 'module'
nsString cellmltext;
rv = component-GetName(cellmltext);
string cellmlname = cellmlmod_ + ToThinString(cellmltext.get());
NewCurrentModule(cellmlname);
CurrentModule()-LoadCellMLComponent(component);
RevertToPreviousModule();
rv = cmpi-NextComponent(getter_AddRefs(component));
  }

There are API calls you can use to get the number of times the current 
component has been imported--I think I can use this so I don't try to 
re-create the basic model again.  The trick then will be to make sure I 
implement the multiple instantiations needed for the full model.

This does bring up a different point that wasn't quite appropriate for the 
hackathon, but might be worth discussing here:  if a model like 
faville_model_2008 has shown that it is helpful to 'clone

[cellml-discussion] The CellML library basics

2009-07-27 Thread 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 = Lmodelname;

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@cellml.org
http://www.cellml.org/mailman/listinfo/cellml-discussion


Re: [cellml-discussion] The CellML library basics

2009-07-27 Thread Lucian Smith
* Justin Marsh j.ma...@auckland.ac.nz [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(Lmodelname);
 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@cellml.org
http://www.cellml.org/mailman/listinfo/cellml-discussion