-
Notifications
You must be signed in to change notification settings - Fork 44
Writing an AdvanceSyn Model Specification (Type 1)
AdvanceSyn Model (ASM) Specification is based on INI file, which is commonly used for software configuration.
In the simplest sense, a ASM file is a set of key-value pairs in the format of "key : value
". For example, ip_address : 100.0.0.1
means that the IP address (ip_address) is set to 100.0.0.1. The main thing to note is that key must be a single string (no spaces in between). For organization purposes, key-value pairs can be grouped into sections. In this case, each key within a section must be unique.
Six sections are defined in ASM (Type 1):
- Specification: Defining the ASM version.
- Identifiers: Providing metadata about the model.
- Objects: Defining the objects / entities in the model.
- Initials: Defining the initial values of each object / entity.
- Variables: Defining changeable variables used in the model.
- Reactions: Defining the reactions / flows between each object / entity in the model.
As an example, we will define a chemical reaction A + B = P + Q
where the rate term can be defined as bAB
. This means that the rate where substrates A and B forms products P and Q is bAB/second
- b(concentration of A)(concentration of B).
Written in ordinary differential equations (ODEs),
dA/dt = -bAB
dB/dt = -bAB
dP/dt = bAB
dQ/dt = bAB
In another words, coefficient b
is a rate variable.
Specification section is used to tell AdvanceSyn Toolkit what specification type or version this ASM file is written under. Yes, it is very likely that we will have different specification versions in future. For example,
[Specification]
type: 1
defines this file as ASM specification type 1.
Identifiers section is for the author(s) to put in descriptions and other details to describe this model. This section is mainly for description and will not be used by AdvanceSyn Toolkit for processing; thus, giving the author(s) rather free rein to describe the model. For example,
[Identifiers]
name: 2 substrates to 2 products
author: Maurice Ling
Objects section defines all the objects (in this case, molecules) used in this model. The key is the molecule name while the value is the corresponding molecule descriptor. For example,
[Objects]
A: molecule A
B: molecule B
P: molecule P
Q: molecule Q
Initials section defines the initial conditions (in this case, initial concentrations of the molecules). For example,
[Initials]
A: 1e-3
B: 1e-3
P: 0.0
Q: 0.0
defines that molecules A and B are 1 mM each while there is no molecules P and Q at the start of the reaction.
Variables section defines the changeable variables used in the model. These variables will be used in define the reactions. In this case, there is only 1 variable, b
, as
[Variables]
b: 100
Reactions section defines the flow or movement within the model. The keys are just unique identifiers in this model. It is the values that are important. For reactions, the values have 2 parts, flow and rate term (or rate law), separated by |
. For example,
[Reactions]
r1: A + B -> P + Q | ${Variables:b} * A * B
defines reaction r1 as A + B -> P + Q
(A and B to produce P and Q). The rate term is ${Variables:b} * A * B
where ${Variables:b}
takes the value of b
in Variable section, resulting in the final rate term as 100 * A * B
in this case.
[Specification]
type: 1
[Identifiers]
name: 2 substrates to 2 products
author: Maurice Ling
[Objects]
A: molecule A
B: molecule B
P: molecule P
Q: molecule Q
[Initials]
A: 1e-3
B: 1e-3
P: 0.0
Q: 0.0
[Variables]
b: 100
[Reactions]
r1: A + B -> P + Q | ${Variables:b} * A * B
Copyright (c) 2018-2022, AdvanceSyn Pte. Ltd.