-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
75 lines (37 loc) · 3.54 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Generates Matlab ODE files, from a chemical-equation-style file.
I. USAGE WITH BINARIES:
Using the command line, place yourself inside the folder ODEgen; to generate the Matlab code, the command is: “_build/main.native file_name.txt”
e.g.: _build/main.native text/G.txt
II.USAGE:
"make clean" for cleanup
"make" to generate executable "ODEgen"
"./ODEgen filename.txt" to generate the code for the specified file; !FILE MUST HAVE EXTENSION .TXT
Matlab code generated in Matlab_code directory, executable in Matlab via the "main.m" file
OPTIONS:
To display compilation options, two possibilities:
a) using binaries: "_build/main.native -help"
b) user compiled: "./ODEgen -help"
To generate a scaled model, the command is: "./ODEgen -scale species_name factor filename.txt" (replace ./ODEgen with _build/main.native if using precompiled binaries), where "species_name" is the name of the species to scale, and "factor" denotes the scaling factor. OBS: both "species_name" and "factor" are STRINGS (e.g., ./ODEgen -scale "a" "10" filename.txt)
III. FILE FORMAT:
The .txt file must contains four sections (each section is preceded by the keyword, in this order): EQN, PARAMS, INIT and UNSCALABLE
EQN: contains declarations of the reactions, of one of the forms :
(coeff_1 "*" )? react_1 + (coeff_2 "*" )? react_2 +... -> (coeff_1 "*" )? prod_1 + (coeff_2 "*" )? prod_2 +... ; rate ("=" expression | value)?
(coeff_1 "*" )? react_1 + (coeff_2 "*" )? react_2 +... <-> (coeff_1 "*" )? prod_1 + (coeff_2 "*" )? prod_2 +... ; rate1 ("=" expression | value)?; rate2 ("=" expression | value)?
(coeff_1 "*" )? react_1 + (coeff_2 "*" )? react_2 +... => (coeff_1 "*" )? prod_1 + (coeff_2 "*" )? prod_2 +... ; rate ("=" expression | value)?
(coeff_1 "*" )? react_1 + (coeff_2 "*" )? react_2 +... <=> (coeff_1 "*" )? prod_1 + (coeff_2 "*" )? prod_2 +... ; rate1 ("=" expression | value)?; rate2 ("=" expression | value)?
Different types of arrows: "->" mass action, ireversible
"<->" mass action, reversible
"=>" rate law, the reaction velocity is specified by the user, ireversible
"<=>" rate law, the reaction velocity is specified by the user, reversible
PARAMS: contains parameter declarations of the form "param = value | expression"
INIT: contains initial conditions of the form "species = concentration"
UNSCALABLE: contains the list of species/reaction rates that cannot be scaled (user defined); one species/rate per line
See example files in the "test" folder.
IV. IMPLEMENTATION SPECIFICITIES
1. For the time being, the scaling option only detects and scales reactions having one of the following chemical kinetics:
-> mass-action
-> Michaelis-Menten like (i.e., a Michaelis-Menten factor multiplied/divided by another arithmetic expression)
-> Hill like (i.e., a Hill factor multiplied/divided by another arithmetic expression)
This means that, for example, when trying to scale a species "alpha", a reaction rate of the form "alpha/1+alpha+beta+alpha*beta" will not be scaled by our tool.
2. Mathematical "syntactic sugar" such as operators (e.g., "sqrt") or variables (e.g., "pi") are not yet supported. The user is advised to use the values of these structures instead (e.g., write 3.1415 instead of "pi", and use "x^(1/2)" instead of "sqrt(x)")
3. For reaction rates, it is assumed that the easiest declaration is being used by the user. For example, constants are to be written as such, instead of more complicated expressions: one should write "x=9" instead of "x=2*2+5". Rule of thumb: use arithmetic expressions for variables rather than for parameters.