diff --git a/cases/all-classes.heta b/cases/all-classes.heta index 168177d..ad2b710 100644 --- a/cases/all-classes.heta +++ b/cases/all-classes.heta @@ -1,57 +1,105 @@ -pmid @ReferenceDefinition { - prefix: "https://pubmed.org", - suffix: / +// Component +// Base element annotation +{ + id: , + space: , + class: , // class of component + title: , // Human readable name of component + notes: , // any notes, supports Markdown + tags: , // tags for component + aux: , // 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: , // if true it cannot be changed by @Process or @Reaction + units: , // units describing the value + assignments: { + []: , // any number of key/value pairs describing value changes + ... + } +}; + +// record assignments +p1 .= ; // calculated at start, uses start_ switcher +p1 := ; // calculated at each time point, uses ode_ switcher +p1 [sw1]= ; // calculated at sw1 switcher +p1 []= ; // the same as .= -avogadro @Const { - num: 6e23, - free: false +// Process <= Record +// change record values using ODEs +pr1 @Process { + actors: / // 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: , // required, when switcher is called + period: , // >0, if set, the switcher will be called with period + repeatCount: // >=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: , // units describing the value + num: , // required, constant value + free: // 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: , // + compartment: // 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: /, // + modifiers: / // 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 { diff --git a/classes.md b/classes.md index bd1ed7c..95bf9ef 100644 --- a/classes.md +++ b/classes.md @@ -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 diff --git a/versions.md b/versions.md index 37e833a..f29ac6e 100644 --- a/versions.md +++ b/versions.md @@ -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 |