-
Notifications
You must be signed in to change notification settings - Fork 1
/
all-classes.heta
101 lines (86 loc) · 2.55 KB
/
all-classes.heta
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// Component
// Base element annotation
{
id: <ID>,
space: <ID>,
class: <String>, // class of component
title: <String>, // Human readable name of component
notes: <String>, // any notes, supports Markdown
tags: <String[]>, // tags for component
aux: <Dict>, // Any user defined properties
...
};
''' Notes '''
sp1::cmd @Component 'Title' {
tags: [a, b, c],
aux: {},
...
};
// Record <= Component
// describes value which can change its value in time
p1 @Record {
boundary: <Boolean>, // if true it cannot be changed by @Process or @Reaction
units: <UnitExpr>, // units describing the value
assignments: {
[<ID>]: <MathExpr>, // any number of key/value pairs describing value changes
...
}
};
// record assignments
p1 .= <MathExpr>; // calculated at start, uses start_ switcher
p1 := <MathExpr>; // calculated at each time point, uses ode_ switcher
p1 [sw1]= <MathExpr>; // calculated at sw1 switcher
p1 []= <MathExpr>; // the same as .=
// Process <= Record
// change record values using ODEs
pr1 @Process {
actors: <ProcessExpr>/<Actor[]> // describes records to change
};
// correct ProcessExpr
1*A = 2*B + 3*C
A => 2B + 3C // mark as irreversible
A <=> B + B + 3C // mark as reversible
// TimeSwitcher <= Component
// run reassignment of records at specific time points
sw1 @TimeSwitcher {
start: <Number>, // required, when switcher is called
period: <Integer>, // >0, if set, the switcher will be called with period
stop: <Number>
};
// Const <= Component
// numerical value which does not change in time
k1 @Const {
units: <UnitExpr>, // units describing the value
num: <Number>, // required, constant value
free: <Boolean> // if true the value is marked for fitting
};
// Compartment <= Record <= Component
// describes volumes where Species instances are located
comp1 @Compartment {
// no specific properties
};
// Species <= Record <= Component
// describes particles in some location
s @Species {
isAmount: <Boolean>, //
compartment: <ID> // required, reference to Compartment
};
// Reaction <= Process <= Record
// The same as Process, but all target references should be Species
r1 @Reaction {
actors: <ProcessExpr>/<Reactant[]>, //
modifiers: <Modifier[]>/<Id[]> // array of references to Species
};
// ===
pmid @ReferenceDefinition {
prefix: "https://pubmed.org",
suffix: /
};
pow #defineFunction {
args: [x, y],
expr: x^y
};
kDa #defineUnit {components: [
{ kind: g, multiplier: 1e3, exponent: 1},
{ kind: mole, exponent: -1}
]};