astnodes¶
Construction of formulas as libsbml ASTs.
The converter keeps every formula as the AST libsbml reads from the model and
builds the new ones (reaction terms, amounts, rates) from nodes. A formula as
text in the syntax of libsbml cannot tell an id from a symbol of the syntax:
a parameter avogadro, pi or NaN would be read back as the constant.
number
¶
A real number, infinity and NaN included.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float
|
the value. |
required |
units
|
str | None
|
id of the SBML units of the number, none when |
None
|
apply
¶
An operator or function applied to copies of its arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
operator
|
int
|
type of the node, e.g. |
required |
arguments
|
ASTNode
|
the arguments in their order, they are not changed. |
()
|
signed_sum
¶
The sum of terms which are added (AST_PLUS) or subtracted (AST_MINUS).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
terms
|
list[tuple[int, ASTNode]]
|
sign and term, at least one; the terms are not changed and every term is copied once, whatever the number of terms. |
required |
Returns:
| Type | Description |
|---|---|
ASTNode
|
|