Skip to content

Commit

Permalink
update versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Metelkin committed Nov 24, 2019
1 parent 7a426c7 commit d031550
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 38 deletions.
124 changes: 86 additions & 38 deletions cases/all-classes.heta
Original file line number Diff line number Diff line change
@@ -1,57 +1,105 @@

pmid @ReferenceDefinition {
prefix: "https://pubmed.org",
suffix: /
// 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
...
};

pow @FunctionDefinition {
args: [x, y],
expr: x^y
''' Notes '''
sp1::cmd @Component "Title" {
tags: [a, b, c],
aux: {},
...
};

kDa @UnitDefinition {components: [
{kind: g, multiplier: 1e3, exponent: 1},
{kind: mole, exponent: -1}
]};
// 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 .=

avogadro @Const {
num: 6e23,
free: false
// Process <= Record
// change record values using ODEs
pr1 @Process {
actors: <ProcessExpr>/<Actor[]> // describes records to change
};

x @Record {
title: "This is x title",
units: items/mole,
boundary: true,
assignments: {
start_: 1
}
// 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
repeatCount: <Integer> // >=0, if set the switche will be called (repeatCount + 1) times
};

s @Species {
units: mM,
isAmount: false,
boundary: false,
assignments: {
start_: 0
},
compartment: comp1
// 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 {
units: L,
assignments: {
start_: 5.3
}
// 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 {
units: mmole/min
assignments: {
ode_: k1*comp1*s
}
actors: 'a=>',
modifiers: ['b']
actors: <ProcessExpr>/<Reactant[]>, //
modifiers: <Modifier[]>/<Id[]> // array of references to Species
};

// ===

pmid @ReferenceDefinition {
prefix: "https://pubmed.org",
suffix: /
};

pow @FunctionDefinition {
args: [x, y],
expr: x^y
};

kDa @UnitDefinition {components: [
{kind: g, multiplier: 1e3, exponent: 1},
{kind: mole, exponent: -1}
]};

// simulations

simple_task1 @SimpleTask {
Expand Down
3 changes: 3 additions & 0 deletions classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ r1 := k1*A*comp1;

**Parent:** [_Component](#_component)

Run reassignment of records for some contions.
Switcher id can be used as key in assignments dictionary.

*no specific properties*

## TimeSwitcher
Expand Down
1 change: 1 addition & 0 deletions versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ Each substantial change in Heta syntax or interpretation will update the MINOR n
| 0.2.0 | v0.4.2 | ^0.4 |
| 0.2.1 | v0.4.3 | ^0.4 |
| 0.2.2 | v0.4.4 | ^0.4 |
| 0.2.3 | v0.4.5 | ^0.4.5 |

0 comments on commit d031550

Please sign in to comment.