Commit 28387295 authored by Thierry Martinez's avatar Thierry Martinez

Numerical simulation

parent 8f2f150b
% MAPK cascade in solution (no scaffold)
%
% adapted from:
% http://www-aig.jpl.nasa.gov/public/mls/cellerator/notebooks/MAPK-in-solution.html
% by Sylvain Soliman <Sylvain.Soliman@inria.fr>
% Nov. 26, 2003
%
% original source:
% Levchenko, A., Bruck, J., Sternberg, P.W. (2000) .Scaffold proteins may
% biphasically affect the levels of mitogen- activated protein kinase
% signaling and reduce its threshold properties. Proc. Natl. Acad. Sci. USA
% 97( 11):5818-5823. http://www.pnas.org/cgi/content/abstract/97/11/5818
RAF + RAFK <=> RAF-RAFK.
RAF~{p1} + RAFPH <=> RAF~{p1}-RAFPH.
MEK~{} + RAF~{p1} <=> MEK~{}-RAF~{p1}.
MEK~{p1} + RAF~{p1} <=> MEK~{p1}-RAF~{p1}.
MEKPH + MEK~{p1} <=> MEK~{p1}-MEKPH.
MEKPH + MEK~{p1,p2} <=> MEK~{p1,p2}-MEKPH.
MAPK~{} + MEK~{p1,p2} <=> MAPK~{}-MEK~{p1,p2}.
MAPK~{p1} + MEK~{p1,p2} <=> MAPK~{p1}-MEK~{p1,p2}.
MAPKPH + MAPK~{p1} <=> MAPK~{p1}-MAPKPH.
MAPKPH + MAPK~{p1,p2} <=> MAPK~{p1,p2}-MAPKPH.
RAF-RAFK => RAFK + RAF~{p1}.
RAF~{p1}-RAFPH => RAF + RAFPH.
MEK~{p1}-RAF~{p1} => MEK~{p1,p2} + RAF~{p1}.
MEK-RAF~{p1} => MEK~{p1} + RAF~{p1}.
MEK~{p1}-MEKPH => MEK + MEKPH.
MEK~{p1,p2}-MEKPH => MEK~{p1} + MEKPH.
MAPK-MEK~{p1,p2} => MAPK~{p1} + MEK~{p1,p2}.
MAPK~{p1}-MEK~{p1,p2} => MAPK~{p1,p2} + MEK~{p1,p2}.
MAPK~{p1}-MAPKPH => MAPK + MAPKPH.
MAPK~{p1,p2}-MAPKPH => MAPK~{p1} + MAPKPH.
present({
RAFK,
RAF,
MEK,
MAPK,
MAPKPH,
MEKPH,
RAFPH
}).
make_absent_not_present.
:- use_module(library(plunit)).
:- begin_tests(initial_state).
test(
'present',
[true(InitialState == [present(a), present(b)])]
) :-
new_model,
command(present({ a, b })),
all_items([model: current_model, kind: initial_state], InitialState).
test(
'absent',
[true(InitialState == [absent(a), absent(b)])]
) :-
new_model,
command(absent({ a, b })),
all_items([model: current_model, kind: initial_state], InitialState).
test(
'undefined',
[true(InitialState == [present(a), absent(b)])]
) :-
new_model,
command(present({ a, b, c })),
command(absent({ b, c, e })),
command(undefined({ c, d, e })),
all_items([model: current_model, kind: initial_state], InitialState).
test(
'make_absent_not_present',
[true(InitialState == [present(a), absent(b)])]
) :-
new_model,
add_rule(a => b),
command(present(a)),
make_absent_not_present,
all_items([model: current_model, kind: initial_state], InitialState).
test(
'make_present_not_absent',
[true(InitialState == [absent(a), present(b)])]
) :-
new_model,
add_rule(a => b),
command(absent(a)),
make_present_not_absent,
all_items([model: current_model, kind: initial_state], InitialState).
:- end_tests(initial_state).
......@@ -9,9 +9,5 @@ test('new_model', [true(Rules == [])]) :-
new_model,
all_items([model: current_model, kind: rule], Rules).
test('mapk') :-
new_model,
command(load(examples/mapk/mapk)).
:- end_tests(models).
......@@ -41,7 +41,7 @@ solve :-
time_final: 100
],
solve(Options, Table),
print(Table).
add_trace(Table).
gather_equations(Equations) :-
......@@ -64,7 +64,8 @@ gather_initial_values(InitialValues) :-
InitialValue,
(
between(0, VariableMax, VariableIndex),
get_initial_state(VariableIndex, InitialValue)
variable(Molecule, VariableIndex),
get_initial_state(Molecule, InitialValue)
),
InitialValues
).
......@@ -77,7 +78,7 @@ gather_initial_parameter_values(InitialParameterValues) :-
InitialParameterValue,
(
between(0, ParameterMax, ParameterIndex),
parameter(ParameterIndex, Parameter),
parameter(Parameter, ParameterIndex),
get_parameter_value(Parameter, InitialParameterValue)
),
InitialParameterValues
......@@ -122,11 +123,12 @@ convert_expression(Value, Value) :-
number(Value),
!.
convert_expression([Molecule], x(VariableIndex)) :-
convert_expression([Molecule], [VariableIndex]) :-
!,
variable(Molecule, VariableIndex).
convert_expression(Parameter, p(ParameterIndex)) :-
atom(Parameter),
!,
(
parameter(Parameter, ParameterIndex)
......
:- use_module(library(plunit)).
:- begin_tests(numerical_simulation).
test('mapk') :-
new_model,
command(load(examples/mapk/mapk)),
numerical_simulation.
:- end_tests(numerical_simulation).
......@@ -57,6 +57,7 @@
** Simulations
*** ODE and stochastic simulations
- numerical_simulation.pl
- numerical_simulation.plt
* Index
+ index
* Bibliography
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment