Skip to content
Preview.ant@modelscript/antimony 10 diagnostic rules
Parser WASM GLR
Diagnostics 10 rules
DAE Arena Lowering
Simulation Native Solvers
Projections SBML, Modelica
Live ExampleRepressilatorCircuit.ant

Antimony Synthetic Transcriptional Repressilator

Modular human-readable biological network model of the three-gene TetR-LacI-cI synthetic oscillatory circuit.

Playground
Source (15 lines)
1model RepressilatorCircuit()
2  compartment cell = 1.0;
3  species m_LacI in cell, m_TetR in cell, m_cI in cell;
4  species p_LacI in cell, p_TetR in cell, p_cI in cell;
5 
6  alpha = 216.0; alpha0 = 0.216; n = 2.0; beta = 0.2;
7 
8  J_tx_LacI: => m_LacI; alpha0 + alpha / (1 + p_cI^n);
9  J_deg_LacI: m_LacI => ; m_LacI;
10  J_tl_LacI: => p_LacI; beta * m_LacI;
11  J_pdeg_LacI: p_LacI => ; beta * p_LacI;
12 
13  m_LacI = 0.0; m_TetR = 0.5; m_cI = 0.0;
14  p_LacI = 5.0; p_TetR = 0.0; p_cI = 0.0;
15end
Antimony Gene Regulatory Network
represses oscillates «transcriptional» TetR_Module «parameters» p_TetR -| m_cI Hill n = 2.0 «transcriptional» cI_Module «model» p_cI -| m_LacI alpha = 216.0 «transcriptional» LacI_Module «verification» p_LacI -| m_TetR beta = 0.2
Drag to pan · Click % to reset

Antimony Modular Systems Biology (.ant) ​

@modelscript/antimony (languages/antimony) provides native WebAssembly GLR parsing, hierarchical submodel composition and port aliasing (is), rate and assignment rule evaluation, state-triggered event handling, 4th-order Runge-Kutta ODE integration, DAEBuilder lowering, and bidirectional SBML Level 3 / Modelica 3.x projection for Antimony human-readable systems biology models.


Supported Extensions & Standards ​

ExtensionFormatDescription
.antAntimony ModelModular text language (model ... end) for biochemical reactions, compartments, species, events, and submodel imports

Key Capabilities ​

1. Human-Readable Biochemical Reactions & Rules ​

  • Parses concise Antimony syntax:
    • Compartments & Species: compartment cell = 1.0; species S1 in cell = 10.0, $S_ext in cell = 5.0; (including boundary species $).
    • Reactions: J1: S1 + E -> ES; k_on * S1 * E - k_off * ES; with named reaction IDs, stoichiometric weights, and arbitrary kinetic rate laws.
    • Rate & Assignment Rules: x' = k1 * S1 - k2 * x; and totS := S1 + ES;.
    • State Events: E1: at (S1 < 0.5): S1 = 10.0, k1 = 0.2;.

2. Modular Composition (model & is) ​

  • Supports reusable model definitions instantiated as submodels (A: Oscillator();) with shared variable bindings (A.S1 is Cytosol_S1;) and unit declarations (unit mM = 1e-3 mole / litre;).

3. RK4 Solver, DAE Lowering & SBML / Modelica Projection ​

  • Simulates coupled reaction networks and state events (solveAntimony), lowers equations into @modelscript/runtime's DAEBuilder arena, and exports to SBML Level 3 Core (antimonyToSbml) and Modelica 3.x (antimonyToModelica).

Pre-Flight Diagnostics ​

10 rules8 error2 warning

CodeRuleSeverityMessage
M9001empty-antimony-moduleerrorAntimony module '<moduleName>' contains no species, reactions, or rules.
M9002undefined-compartment-in-specieserrorSpecies '<speciesId>' is placed in undeclared compartment '<compartmentId>'.
M9003missing-reaction-rate-lawwarningReaction '<reactionId>' has no kinetic rate expression.
M9004negative-stoichiometric-coefficienterrorSpecies '<speciesId>' in reaction '<reactionId>' has non-positive stoichiometry '<stoichiometry>'.
M9005undefined-rate-law-symbolwarningRate expression in '<reactionId>' references undeclared identifier '<symbol>'.
M9006duplicate-reaction-iderrorReaction identifier '<reactionId>' is defined multiple times in module '<moduleName>'.
M9007circular-submodel-instantiationerrorSubmodel hierarchy contains a cycle involving '<moduleName>'.
M9008conflicting-species-variabilityerrorSpecies '<speciesId>' is declared both 'const' and modified by a rate rule or non-boundary reaction.
M9009negative-compartment-volumeerrorCompartment '<compartmentId>' initialized with non-positive volume '<volume>'.
M9010invalid-event-triggererrorEvent '<eventId>' trigger condition is not a relational/boolean expression.

Generated from languages/antimony/src/errors.ts. All languages →


CLI Usage ​

bash
# Run pre-flight linting on an Antimony model
msx lint Repressilator.ant

# Parse and inspect Antimony model declarations
msx parse Repressilator.ant

Open-Core under the GNU AGPL v3 License; Enterprise Edition (ee/) under the ModelScript Enterprise License. • Pricing • Trademark Policy