Forums

F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Search Search
SBML Discussions » libsbml-development » no getFormula for function definitions
Show: Today's Posts  :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
AuthorTopic
Falko Krause


Posts: 30
Registered:
April 2007
no getFormula for function definitions 08 Jan '09 07:11 Go to next message

I would like to have a getFormula() for FunctionDefinitions, is there any
reason why there is none so far?

Falko
____________________________________________________________
To manage your libsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/libsbml-development

For a web interface to the libsbml-development mailing list, visit
http://sbml.org/Forums/

For questions or feedback about the libsbml-development list,
contact sbml-team@caltech.edu

      
Sarah Keating


Posts: 413
Registered:
May 2004
Re: no getFormula for function definitions 09 Jan '09 07:31 Go to previous messageGo to next message

Hi Falko

The reason that the getFormula function exists is historical.

In SBML L1, mathematics within the model was defined using infix
formula. Thus libSBML-1 had the function getFormula for Rules and
kineticLaws. When SBML L2 adopted MathML, libSBML used the ASTNode
class to define the mathematics and the function getMath to retrieve it.
Any L1 constructs kept the getFormula function for interaction with
SBML L1 but this function was not explicitly implemented for constructs
that exist only in L2 i.e. a FunctionDefinition.

It is possible to implement the functionality of the getFormula
functions using

ASTNode *Math = functionDefinition->getMath();
const char * formula = SBML_formulaToString(Math);

(This is actually what the existing getFormula functions do)

The problem with this is that the infix functions allowable in SBML L1
was very restricted. The function SBML_formulaToString and its converse
SBML_parseFormula only expects these allowable functions and thus not
all of the valid MathML constructs will be correctly returned as formula
strings. This is one of the reasons the getFormula function is not
implemented as convenience functions in current libSBML.

Sarah



Falko Krause wrote:
> I would like to have a getFormula() for FunctionDefinitions, is there
> any reason why there is none so far?
>
> Falko ____________________________________________________________ To
> manage your libsbml-development list subscription, visit
> https://utils.its.caltech.edu/mailman/listinfo/libsbml-development
>
> For a web interface to the libsbml-development mailing list, visit
> http://sbml.org/Forums/
>
> For questions or feedback about the libsbml-development list, contact
> sbml-team@caltech.edu
>
>

____________________________________________________________
To manage your libsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/libsbml-development

For a web interface to the libsbml-development mailing list, visit
http://sbml.org/Forums/

For questions or feedback about the libsbml-development list,
contact sbml-team@caltech.edu

      
Lucian Smith


Posts: 183
Registered:
July 2008
Re: no getFormula for function definitions 09 Jan '09 11:22 Go to previous messageGo to next message

* Sarah Keating <skeating@caltech.edu> [2009-01-09 19:04] writes:
>
> The problem with this is that the infix functions allowable in SBML L1
> was very restricted. The function SBML_formulaToString and its converse
> SBML_parseFormula only expects these allowable functions and thus not
> all of the valid MathML constructs will be correctly returned as formula
> strings.

Is this list available somewhere? I'm also working with converting
formulas to infix, but hadn't realized this.

-Lucian
____________________________________________________________
To manage your libsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/libsbml-development

For a web interface to the libsbml-development mailing list, visit
http://sbml.org/Forums/

For questions or feedback about the libsbml-development list,
contact sbml-team@caltech.edu

      
Sarah Keating


Posts: 413
Registered:
May 2004
Re: no getFormula for function definitions 09 Jan '09 11:30 Go to previous messageGo to next message

> Is this list available somewhere? I'm also working with converting
> formulas to infix, but hadn't realized this.

Appendix C of the SBML L1V2 specification :-)

Sarah
____________________________________________________________
To manage your libsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/libsbml-development

For a web interface to the libsbml-development mailing list, visit
http://sbml.org/Forums/

For questions or feedback about the libsbml-development list,
contact sbml-team@caltech.edu

      
Frank Bergmann


Posts: 80
Registered:
August 2005
Re: no getFormula for function definitions 09 Jan '09 11:36 Go to previous messageGo to next message

Yes it is:

Right from the 1.2 spec:

Table 2: The reserved names in SBML Level 1.

abs cos hillr massr pow tan ucii umai usii uur
acos exp isouur not ppbr time ucir umar usir volume
and floor log or sin uai ucti umi uuci xor
asin hilli log10 ordbbr sqr uaii uctr umr uucr
atan hillmmr mass ordbur sqrt ualii uhmi unii uuhr
ceil hillmr massi ordubr substance uar uhmr unir uui

see also:

http://sbml.org/Special/specifications/sbml-level-1/version-2/html/sbml-leve
l-1.html#SECTION000110000000000000000

for more on predefined functions ...

cheers
Frank

> -----Original Message-----
> From: libsbml-development-bounces@caltech.edu [mailto:libsbml-
> development-bounces@caltech.edu] On Behalf Of Lucian Smith
> Sent: Friday, January 09, 2009 11:22 AM
> To: LibSBML Development List
> Subject: Re: [libsbml-development] no getFormula for function
> definitions
>
> * Sarah Keating <skeating@caltech.edu> [2009-01-09 19:04] writes:
> >
> > The problem with this is that the infix functions allowable in SBML
> L1
> > was very restricted. The function SBML_formulaToString and its
> converse
> > SBML_parseFormula only expects these allowable functions and thus not
> > all of the valid MathML constructs will be correctly returned as
> formula
> > strings.
>
> Is this list available somewhere? I'm also working with converting
> formulas to infix, but hadn't realized this.
>
> -Lucian
> ____________________________________________________________
> To manage your libsbml-development list subscription, visit
> https://utils.its.caltech.edu/mailman/listinfo/libsbml-development
>
> For a web interface to the libsbml-development mailing list, visit
> http://sbml.org/Forums/
>
> For questions or feedback about the libsbml-development list,
> contact sbml-team@caltech.edu


____________________________________________________________
To manage your libsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/libsbml-development

For a web interface to the libsbml-development mailing list, visit
http://sbml.org/Forums/

For questions or feedback about the libsbml-development list,
contact sbml-team@caltech.edu

      
Lucian Smith


Posts: 183
Registered:
July 2008
Re: no getFormula for function definitions 09 Jan '09 12:21 Go to previous messageGo to next message

* Sarah Keating <skeating@caltech.edu> [2009-01-09 19:37] writes:
> > Is this list available somewhere? I'm also working with converting
> > formulas to infix, but hadn't realized this.
>
> Appendix C of the SBML L1V2 specification :-)

No, sorry, the other way around: a list of functions not recognized by
SBML_formulaToString, but valid in some other level of SBML. Should I
just look at the list in 3.4.1 of the L2 spec, and figure out what's there
that's not in Appendix C of L1?

-Lucian
____________________________________________________________
To manage your libsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/libsbml-development

For a web interface to the libsbml-development mailing list, visit
http://sbml.org/Forums/

For questions or feedback about the libsbml-development list,
contact sbml-team@caltech.edu

      
Mike Hucka


Posts: 961
Registered:
October 2003
Re: no getFormula for function definitions 09 Jan '09 17:08 Go to previous message

lpsmith> No, sorry, the other way around: a list of
lpsmith> functions not recognized by SBML_formulaToString,
lpsmith> but valid in some other level of SBML. Should I
lpsmith> just look at the list in 3.4.1 of the L2 spec,
lpsmith> and figure out what's there that's not in
lpsmith> Appendix C of L1?

I'm not aware of one, but now that you mention it, what a
nice idea! :-). This should go into the wiki, or FAQ, or
both. If you do end up creating such a list, will you
please post it? (Or volunteer to put it on the wiki, but
even if you just post it here, I can take it from there.)

MH


____________________________________________________________
To manage your libsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/libsbml-development

For a web interface to the libsbml-development mailing list, visit
http://sbml.org/Forums/

For questions or feedback about the libsbml-development list,
contact sbml-team@caltech.edu

      
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic:Astnode can't be exported to SBML
Next Topic:Compilation error using xerces-c-3.0.0
Go to forum:
-=] Back to Top [=-

Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)

Please use our issue tracking system for any questions or suggestions about this website.