Skip to content

FunctionDefinition

A named function which the mathematics of the model can call.

A function definition gives a name to a formula with arguments, so that a rate law which appears in many reactions is written once. The capabilities are deliberately limited: a function may only use its own arguments and other functions, it cannot read a species or a parameter, and it cannot call itself.

The report shows the body of the function as rendered mathematics, in the table and in the inspector.

Attributes

attribute type required meaning specification
math Math optional the formula of the function, with its arguments core 4.3.2

Every element of a model also carries the common attributes of SBase.

math

The math of a function definition is a MathML lambda expression: it declares the arguments and the expression which is computed from them. It is the only place in SBML core where a lambda is allowed.

The report renders the formula and shows it in the column "math" and in the inspector.

Default: the function has no mathematical meaning in SBML core.

  • 20301 (error): The top-level element within <math> in a <functionDefinition> is restricted.
  • 20303 (error): Inside the <lambda> of a <functionDefinition>, the identifier of that <functionDefinition> cannot appear as the value of a <ci> element. SBML functions are not permitted to be recursive.
  • 20304 (error): Inside the <lambda> of a <functionDefinition>, if a <ci> element is not the first element within a MathML <apply>, then the <ci>'s value can only be the value of a <bvar> element declared in that <lambda>. In other words, all model entities referenced inside a function definition must be passed arguments to that function.
  • 20305 (error): The value type returned by a <functionDefinition>'s <lambda> must be either Boolean or numeric.
  • 20306 (error): A FunctionDefinition object must contain exactly one MathML math element. The <math> element is optional in L3V2 and beyond.

Validation rules

  • 10702 (warning): The value of the 'sboTerm' attribute on a <functionDefinition> is expected to be an SBO identifier (http://www.biomodels.net/SBO/) referring to a mathematical expression (i.e., terms derived from SBO:0000064, "mathematical expression").
  • 20307 (error): FunctionDefinition object must have the required attribute 'id', and may have the optional attributes 'metaid', 'sboTerm' and 'name'. No other attributes from the SBML Level 3 Core namespace are permitted on a FunctionDefinition object.
  • Model: the container of everything a model is made of

Specification

SBML Level 3 Version 2 Core, Section 4.3 (Hucka et al. 2019, J Integr Bioinform 16(2):20190021).