Commit 72536bf3 authored by FAGES Francois's avatar FAGES Francois
Browse files

insuffisance des regles de reecritures

parent 38b8056c
......@@ -211,6 +211,7 @@ commands = [
"set_p_m_rate",
"test_rate_independence",
"test_rate_independence_inputs_sinks",
"test_rate_independence_invariants",
"transition",
"tropicalize",
"undefined",
......
......@@ -166,7 +166,14 @@ dfs_no_loop(GraphId, Vertex) :-
),
assertz(seen(Vertex)).
:- dynamic(removableInputs/0).
:- dynamic(restrictionOnTrivialReaction/0).
restrictionOnTrivialReaction.
:- dynamic(noIsolatedReactant/0).
noIsolatedReactant.
:- dynamic(noBetaEmpty/0).
noBetaEmpty. % incorrect otherwise on eliminating d in loop a+b<=>c+d=>e=>c+b
% Elimination of trivial reactions and isolated species with no outgoing fork
simplify(Inputs, Outputs):-
......@@ -200,11 +207,12 @@ trivial_loop(Molecules):-
delete_reaction(Reaction1),
delete_reaction(Reaction2).
% Elimination of trivial reactions with products=reactants apart from inputs and outputs
trivial_reaction(Molecules):-
item([kind:reaction, id: Id, item: Reaction]),
reaction(Reaction, _Kinetics, Reactants, _Inhibitors, Reactants),
forall(member((_*X), Reactants), member(X, Molecules)),
(restrictionOnTrivialReaction -> forall(member((_*X), Reactants), member(X, Molecules)); true),
write('--> removing trivial reaction '), writeln(Reaction),
delete_item(Id).
......@@ -219,7 +227,6 @@ same_reaction:-
write('--> removing double reaction '), writeln(Reaction2),
delete_item(Id2).
:- dynamic(noIsolatedReactant).
% Isolated reactant in one reaction
% to do? eliminates d in c+d=>e=>c+output and does not conclude to rate independence
......@@ -259,10 +266,9 @@ eliminate(M):-
% Warning: Now restricted to GAMMA EMPTY and SAME STOICHIOMETRY
% Elimination of species M isolated in reactions alpha_i =>2 beta_i + M and M (+ gamma) =>1 delta
% if forall i alpha_i\cap\delta=\emptyset and \alpha_i\cap\gamma \= \empty
% by merging reactions resulting in alpha_i (+ gamma) => beta_i + delta
% Elimination of species M isolated in reactions alpha_i =>2 beta_i + M and M =>1 gamma
% if forall i alpha_i\cap\gamma=\emptyset
% by merging reactions resulting in alpha_i => beta_i + gamma
eliminate(M):-
reactions_with_reactant([M], [Reaction1]),
reaction(Reaction1, _, [C*M], _, _Products1), % gamma empty
......@@ -291,7 +297,6 @@ write('--> eliminating '), write(M), write(' reactant only in '), write(Reaction
% Todo: accept reversible reactions with syntax <=>
:- dynamic(noBetaEmpty).
......@@ -380,7 +385,7 @@ eliminate(M):-
delete(Products1, (C*M), Beta),
delete(Products4, (C*M), Beta),
(noBetaEmpty -> Beta=[]),
(noBetaEmpty -> Beta=[]; true),
write('--> eliminating '), write(M), write(' in double loop '), write(Reaction1),
write(' <--> '),write(Reaction2), write(Reaction3), write(' <--> '), writeln(Reaction4),
......
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
prolog("writeln(' Cas problematiques en tete qui montrent l insuffisance des reecritures')").
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
prolog("writeln(' ')").
clear_model.
a+b=>c+d.
c+d=>a+b.
c+d=>e.
e=>c+f.
search_conservations.
test_rate_independence_inputs_sinks.
prolog('writeln("The model is rate independent: composite loop leakage with and-fork")').
prolog('writeln("The model is rate independent: composite loop with and-fork")').
prolog("writeln(' ')").
clear_model.
a+b=>c+d.
c+d=>a+b.
c+d=>e.
e=>c+f+d.
e=>c.
e=>f.
search_conservations.
test_rate_independence_inputs_sinks.
prolog('writeln("Undecided since no: second loop creates synthesis ")').
prolog('writeln("Undecided, since no: composite loop with or-fork ")').
prolog("writeln(' ')").
clear_model.
a+b=>c+d.
c+d=>a+b.
c+d=>e.
search_conservations.
test_rate_independence_inputs_sinks.
prolog('writeln("The model is rate independent: composite loop leakage with or-fork")').
prolog("writeln(' ')").
clear_model.
a+b=>c+d.
c+d=>a+b.
c+d=>e.
e=>c+f.
search_conservations.
test_rate_independence_inputs_sinks.
prolog('writeln("The model is rate independent: composite loop leakage with and-fork")').
prolog("writeln(' ')").
......@@ -24,11 +53,40 @@ clear_model.
a+b=>c+d.
c+d=>a+b.
c+d=>e.
e=>c+d.
e=>f+g.
search_conservations.
test_rate_independence_inputs_sinks.
prolog('writeln("The model is rate independent: composite double loop leakage with composite or-fork")').
prolog("writeln(' ')").
clear_model.
MA(k1) for a+b => b.
MA(k2) for b+c=>d.
search_conservations.
test_rate_independence({b,c}, {d}). % no
prolog('writeln("The model is rate independent: without input a")').
prolog("writeln('%%%%%%%%%%%%%%%%%%%%%%')").
prolog("writeln(' ')").
clear_model.
c+d=>e.
e=>c+f.
search_conservations.
test_rate_independence_inputs_sinks.
prolog('writeln("The model is rate independent: composite loop leakage with and-fork")').
prolog("writeln(' ')").
clear_model.
c+d=>e.
e=>c+f+d.
search_conservations.
test_rate_independence_inputs_sinks.
prolog('writeln("Undecided since no: second loop creates synthesis ")').
prolog("writeln(' ')").
......@@ -76,25 +134,6 @@ test_rate_independence_inputs_sinks. % no
prolog('writeln("The model is rate independent: trivial loop leakage")').
prolog("writeln(' ')").
clear_model.
MA(k1) for a+b => b.
MA(k2) for b+c=>d.
search_conservations.
test_rate_independence({b,c}, {d}). % no
prolog('writeln("The model is rate independent: without input a")').
prolog("writeln(' ')").
clear_model.
a+b=>c+d.
c+d=>a+b.
c+d=>e.
e=>c+d.
e=>f+g.
search_conservations.
test_rate_independence_inputs_sinks.
prolog('writeln("The model is rate independent: composite double loop leakage with composite or-fork")').
prolog("writeln(' ')").
clear_model.
a+b=>c+d.
......@@ -210,15 +249,6 @@ prolog('writeln("Undecided since no: subtle multiple steady states ")').
prolog("writeln(' ')").
clear_model.
a+b=>c+d.
c+d=>a+b.
c+d=>e.
search_conservations.
test_rate_independence_inputs_sinks.
prolog('writeln("The model is rate independent: composite loop leakage with or-fork")').
prolog("writeln(' ')").
......
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