Skip to content

Commit c68e58e

Browse files
authored
Merge pull request #91 from sys-bio/develop
2.14 release
2 parents 35b5372 + 976440f commit c68e58e

32 files changed

+1577
-1141
lines changed

azure-pipelines.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ stages:
3434
variables:
3535
LLVM_CACHE: 'false'
3636
MinicondaRoot : 'C:\Miniconda'
37-
PythonName: 'py39'
38-
PythonVersion: '3.9'
37+
PythonName: 'py311'
38+
PythonVersion: '3.11'
3939
PythonRoot: '$(MinicondaRoot)\envs\$(PythonName)'
4040
PythonLibDir: '$(PythonRoot)\Lib'
4141
PythonScriptsDir: '$(PythonRoot)\Scripts'
@@ -54,7 +54,7 @@ stages:
5454
CheckFile: check-debug.zip
5555
CheckURL: https://github.com/sys-bio/antimony/releases/download/libcheck/check-debug.zip
5656
PythonCMake: -DWITH_PYTHON=OFF
57-
expatlib: libexpatmdd.lib
57+
expatlib: libexpatdMD.lib
5858
steps:
5959
- script: |
6060
echo "SOURCE_DIR $(SOURCE_DIR)"
@@ -231,16 +231,16 @@ stages:
231231
displayName: MacBuildAntimonyCpp
232232
continueOnError: "false"
233233
pool:
234-
vmImage: 'macOS-11'
234+
vmImage: 'macOS-12'
235235
strategy:
236236
matrix:
237237
64-bit Mac Release:
238238
BuildType: Release
239239
64-bit Mac Debug:
240240
BuildType: Debug
241241
variables:
242-
PythonVersion: 3.9
243-
PythonName: py39
242+
PythonVersion: 3.11
243+
PythonName: py311
244244
MinicondaRoot : '/usr/local/miniconda'
245245
PythonRoot: '$(MinicondaRoot)/envs/$(PythonName)'
246246
PythonLibDir: '$(PythonRoot)/lib'
@@ -375,7 +375,7 @@ stages:
375375
targetFolder: $(Build.ArtifactStagingDirectory)
376376
displayName: Copy to Staging Area
377377
- publish: $(Build.ArtifactStagingDirectory)
378-
artifact: antimony-MacOS10.15-$(BuildType)
378+
artifact: antimony-MacOS12-$(BuildType)
379379
displayName: Publish
380380
- script: |
381381
rm -r $(Build.ArtifactStagingDirectory)/*
@@ -397,7 +397,7 @@ stages:
397397
- task: CopyFiles@2
398398
inputs:
399399
contents: '$(INSTALL_DIR)/**'
400-
targetFolder: $(Build.ArtifactStagingDirectory)/antimony-MacOS10.15-python
400+
targetFolder: $(Build.ArtifactStagingDirectory)/antimony-MacOS12-python
401401
condition: eq(variables.BuildType, 'Release')
402402
displayName: Copy Install Tree to Staging Area
403403
- task: CopyFiles@2
@@ -408,7 +408,7 @@ stages:
408408
condition: eq(variables.BuildType, 'Release')
409409
displayName: Copy Pip Wheels to Staging Area
410410
- publish: $(Build.ArtifactStagingDirectory)
411-
artifact: antimony-MacOS10.15-python
411+
artifact: antimony-MacOS12-python
412412
condition: eq(variables.BuildType, 'Release')
413413
displayName: Publish Pip Wheels Artifacts
414414

@@ -431,7 +431,7 @@ stages:
431431
SOURCE_DIRECTORY: '$(System.DefaultWorkingDirectory)'
432432
INSTALL_DIRECTORY: '$(System.DefaultWorkingDirectory)/install-azure'
433433
MinicondaRoot: '/Miniconda3'
434-
PythonRoot: '$(MinicondaRoot)/envs/py39'
434+
PythonRoot: '$(MinicondaRoot)/envs/py311'
435435
CondaExecutable: '$(MinicondaRoot)/bin/conda'
436436
PythonExecutable: '$(PythonRoot)/bin/python'
437437
PythonLibDir: '$(PythonRoot)/lib'

doc/AntimonyTutorial.htm

+101-6
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ <h2 id="table-of-contents">Table of contents</h2>
5454
<li><a href="#interactions">Interactions</a></li>
5555
<li><a href="#predefined-function-definitions">Predefined Function Definitions</a></li>
5656
<li><a href="#uncertainty-information">Uncertainty Information</a></li>
57-
<li><a href="#sbo-and-cvterms">SBO and CVTerms</a></li>
57+
<li><a href="#annotation-keywords">Annotation Keywords</a></li>
5858
<li><a href="#flux-balance-constraints">Flux Balance Constraints</a></li>
5959
<li><a href="#other-files">Other files</a></li>
6060
<li><a href="#importing-and-exporting-antimony-models">Importing and Exporting Antimony Models</a></li>
@@ -71,6 +71,11 @@ <h2 id="background">Background</h2>
7171
<li>Package and re-use models as modules with defined or implied interfaces.</li>
7272
</ul>
7373
<h2 id="change-log">Change Log</h2>
74+
<p>The 2.14.0 release added the ability to encode algebraic rules, and added ways to add annotations and notes to objects and the model.</p>
75+
<p>The 2.13.4 release changed the default SBML output to L3v2, and added basic unit names as reserved words for better import.</p>
76+
<p>The 2.13.3 release removed the '@' for parsing events, and fixed '-o' interaction parsing.</p>
77+
<p>The 2.13.2 release changed some maintenance features.</p>
78+
<p>The 2.13.1 release added named stoichiometries, the 'rateOf' function, and instituted case senstitivity for predefined elements.</p>
7479
<p>The 2.12 release added the ability to save extra ‘annotation-like’ elements from the ‘distributions’ SBML package, and fixed numerous bugs in cvterm/SBOterm setting.</p>
7580
<p>The 2.11 release quashed all known memory leaks, and added the ability to define synthesis reactions with no id (i.e. ’ -&gt; S1; k1’)</p>
7681
<p>The 2.10 release updated support for distributions to the latest SBML release of that package, updated the default version of SBML to Level 3 version 2, added support for setting cvterms and the SBOterm,</p>
@@ -209,6 +214,18 @@ <h3 id="boundary-species">Boundary Species</h3>
209214
S2 -&gt; S3; k2*S2
210215
S3 -&gt; S4; k3*S3
211216
end</code></pre>
217+
218+
<h3 id="substance-only species">Substance-only Species</h3>
219+
220+
<p>When a species ID shows up in math, it usually means 'the concentration of
221+
the species'. If instead it should be 'the amount of the species', you can
222+
indicate this by using the 'substanceOnly' keyword:</p>
223+
224+
<pre><code> substanceOnly species S1 in C
225+
S1 -> S2; k1*S1/C</code></pre>
226+
227+
<p>In the produced SBML, these species will be flagged hasOnlySubstanceUnits="true"</p>
228+
212229
<h3 id="compartments">Compartments</h3>
213230
<p>For multi-compartment models, or models where the compartment size changes over time, you can define the compartments in Antimony by using the <code>compartment</code> keyword, and designate species as being in particular compartments with the <code>in</code> keyword:</p>
214231
<pre><code>model pathway()
@@ -300,7 +317,7 @@ <h3 id="function-definitions">Function Definitions</h3>
300317
end</code></pre>
301318
<p>This effectively defines S3 to always equal the equation <code>k1*s1^2 + k2*s1 + k3</code>.</p>
302319
<h3 id="annotation">Annotation</h3>
303-
<p>Antimony elements can be annotated with URNs using annotation keywords You can see the <a href="#sbo-and-cvterms">full list</a> below, but in general, you annotate in the following way:</p>
320+
<p>Antimony elements can be annotated with URNs using annotation keywords You can see the <a href="#annotation-keywords">full list</a> below, but in general, you annotate in the following way:</p>
304321
<pre><code>//Species
305322
species Glcin in comp, MgATP in comp
306323

@@ -310,7 +327,38 @@ <h3 id="annotation">Annotation</h3>
310327
&quot;http://identifiers.org/kegg.compound/C00293&quot;
311328
MgATP part &quot;http://identifiers.org/chebi/CHEBI:25107&quot;,
312329
&quot;http://identifiers.org/chebi/CHEBI:15422&quot;</code></pre>
313-
<p>Any Antimony element with an id may be annotated in this way, including the model itself.</p>
330+
331+
<p>Any Antimony element with an id may be annotated in this way, including
332+
the model itself. Inside a model definition, the model itself may be
333+
annotated using the 'model' keyword:</p>
334+
335+
<pre><code> model foo()
336+
model model_entity_is &quot;http://identifiers.org/biomodels.db/BIOMD0000000004&quot;
337+
model description &quot;http://identifiers.org/pubmed/1833774&quot;
338+
model origin &quot;http://identifiers.org/biomodels.db/BIOMD0000000003&quot;
339+
model taxon &quot;http://identifiers.org/taxonomy/8292&quot;
340+
model created &quot;2005-02-08T17:34:02Z&quot;
341+
model modified &quot;2012-12-11T15:30:15Z&quot;
342+
end</code></pre>
343+
344+
You can also define an element's 'notes', using the 'notes' keyword. If
345+
the notes take more than one line, you can group them together using three
346+
tick marks '\`\`\`':
347+
348+
<pre><code> model notes ```
349+
&lt;p&gt;This model represents the inactive forms of CDC-2 Kinase and Cyclin
350+
Protease as separate species, unlike the ODEs in the published paper, in
351+
which the equations for the inactive forms are substituted into the
352+
equations for the active forms using a mass conservation rule
353+
M+MI=1,X+XI=1. Mass is still conserved in this model through the
354+
explicit reactions M&lt;-&gt;MI and X&lt;-&gt;XI. The terms in the
355+
kinetic laws are identical to the corresponding terms in the kinetic
356+
laws in the published paper.&lt;/p&gt;</code></pre>
357+
```
358+
359+
360+
361+
314362
<h3 id="modular-models">Modular Models</h3>
315363
<p>Antimony was actually originally designed to allow the modular creation of models, and has a basic syntax set up to do so. For a full discussion of Antimony modularity, see <a href="#modules">below</a>, but at the most basic level, you define a re-usable module with the ‘model’ syntax, followed by parentheses where you define the elements you wish to expose, then import it by using the model’s name, and the local variables you want to connect to that module</p>
316364
<pre><code># This creates a model &#39;side_reaction&#39;, exposing the variables &#39;S&#39; and &#39;k1&#39;:
@@ -731,6 +779,24 @@ <h3 id="rate-rules">Rate Rules</h3>
731779
<pre><code>S1&#39; = V1*(1 - S1)/(K1 + (1 - S1)) - V2*S1/(K2 + S1)</code></pre>
732780
<p>Note that unlike initializations and assignment rules, formulas in rate rules may be self-referential, either directly or indirectly.</p>
733781
<p>Any symbol may have only one rate rule or assignment rule associated with it. Should it find more than one, only the last will be saved.</p>
782+
783+
<h3 id="algebraic-rules">Algebraic Rules</h3>
784+
785+
<p>Algebraic rules are defined as equations that are always true, but do
786+
not declare which variable or variables should be adjusted to ensure that
787+
they are true. Algebraic rules have somewhat limited support in some
788+
simulators, and are not supported by Tellurium, so they are provide by
789+
Antimony solely for users who wish to export the model and use it in
790+
other systems.</p>
791+
792+
<p>To declare an algebraic rule, optionally give it a name, and then declare
793+
&quot;0 = [formula]&quot;:</p>
794+
795+
<pre><code> 0 = S1*k1 - 10
796+
alg2: 0 = S2*k2 - 20
797+
798+
799+
734800
<h3 id="display-names">Display Names</h3>
735801
<p>When some tools visualize models, they make a distinction between the ‘id’ of an element, which must be unique to the model and which must conform to certain naming conventions, and the ‘name’ of an element, which does not have to be unique and which has much less stringent naming requirements. In Antimony, it is the id of elements which is used everywhere. However, you may also set the ‘display name’ of an element by using the ‘is’ keyword and putting the name in quotes:</p>
736802
<pre><code>A.k1 is &quot;reaction rate k1&quot;;
@@ -884,7 +950,7 @@ <h3 id="uncertainty-information">Uncertainty Information</h3>
884950
A.externalParameter = x || {x,y} || function()
885951
A.externalParameter is &quot;http://uri&quot;</code></pre>
886952
<p>Where <code>A</code> may be any symbol in Antimony with mathematical meaning; <code>x</code> and <code>y</code> may both be either a symbol or a value (i.e. <code>A.mean=2.4</code>; <code>A.confidenceInterval={S1, 8.2}</code>); <code>function()</code> may be any mathematical formula; and <code>"http://uri"</code> is a URI that defines the given distribution or externalParameter.</p>
887-
<h3 id="sbo-and-cvterms">SBO and cvterms</h3>
953+
<h3 id="annotation-keywords">Annotation Keywords</h3>
888954
<p>Antimony model elements may also be annotated with their SBO terms and cvterms, using the following syntax:</p>
889955
<pre><code>A.sboTerm = 236 or A.sboTerm = SBO:00000236
890956
A identity &quot;cvterm&quot; or A biological_entity_is &quot;cvterm&quot;
@@ -899,8 +965,37 @@ <h3 id="sbo-and-cvterms">SBO and cvterms</h3>
899965
A occursIn &quot;cvterm&quot; or A container &quot;cvterm&quot;
900966
A hasProperty &quot;cvterm&quot; or A property &quot;cvterm&quot;
901967
A isPropertyOf &quot;cvterm&quot; or A propertyBearer &quot;cvterm&quot;
902-
A hasTaxon &quot;cvterm&quot; or A taxon &quot;cvterm&quot;</code></pre>
903-
<p>Where <code>A</code> is any model element, model name, or function name, and <code>cvterm</code> is a URI like <code>"http://identifiers.org/uniprot/P12999"</code>.</p>
968+
A hasTaxon &quot;cvterm&quot; or A taxon &quot;cvterm&quot;
969+
A created &quot;YYYY-MM-DDThh:mm:ssTZD&quot; where TZD is either Z or +/- HH:MM
970+
A modified &quot;YYYY-MM-DDThh:mm:ssTZD&quot; where TZD is either Z or +/- HH:MM
971+
A creator &quot;creator&quot;
972+
A creator.name &quot;full name&quot;
973+
A creator.givenName &quot;given name&quot;
974+
A creator.familyName &quot;family name&quot;
975+
A creator.organization &quot;organization&quot;
976+
A creator.email &quot;email address&quot;
977+
A notes &quot;notes&quot;</code></pre>
978+
<p>Where <code>A</code> is any model ID or the word 'model' for the model itself, and <code>cvterm</code> is a URI like <code>"http://identifiers.org/uniprot/P12999"</code>. If
979+
there are multiple creators, or multiple modification times, you can
980+
distinguish between them by adding a number:</p>
981+
982+
<pre><code>A creator1.name &quot;Hugh Barrett&quot;
983+
A creator2.name &quot;Nancy Smalls&quot;
984+
A modified1 &quot;2012-12-11T15:30:15Z&quot;
985+
A modified2 &quot;2013-01-15T12:25:55Z&quot;</code></pre>
986+
987+
<p>You can also set the individual components of the 'created' or 'modified'
988+
date by keyword:</p>
989+
990+
<pre><code>A created.year &quot;YYYY&quot;
991+
A created.month &quot;MM&quot;
992+
A created.day &quot;DD&quot;
993+
A created.hour &quot;hh&quot;
994+
A created.minute &quot;mm&quot;
995+
A created.second &quot;ss&quot;
996+
A created.time &quot;hh:mm:ss&quot;</code></pre>
997+
998+
904999
<h3 id="flux-balance-constraints">Flux Balance Constraints</h3>
9051000
<p>In some models, reaction rates are not known specifically, but one can place certain constraints on those reactions, and then apply an objective function (such as ‘maximize growth’) to try to discern a likely set of reaction rates. In SBML, the package that lets you define these constraints and objective functions is known as the ‘Flux Balance Constraints’ package. As of v2.8.0 of Antimony, these constraints can now be defined in Antimony as well, using equalities and inequalities <code>&lt;</code>, <code>&gt;</code>, <code>&lt;=</code>, <code>&gt;=</code>, and <code>==</code>. If we assume that all <code>J</code> variables are reactions, the following definitions are all Flux Balance constraints:</p>
9061001
<pre><code>0 &lt;= J0

doc/AntimonyTutorial.pdf

127 KB
Binary file not shown.

0 commit comments

Comments
 (0)