Commit 587b8803 authored by FAGES Francois's avatar FAGES Francois
Browse files

produit des cinetiques dans merge reaction

parent 258d214a
......@@ -113,7 +113,7 @@ merge_reactions(Reaction1, Reaction2):-
type(Reaction1, reaction),
type(Reaction2, reaction),
doc('
merges two reaction rules by removing them and replacing them by a new reaction with reactants the sum of reactants, with products the sum of the products, and with kinetics the product of the kinetics.
merges two reaction rules by removing them and replacing them by a new reaction with reactants the sum of reactants, with products the sum of the products, and with kinetics the product of the kinetics (using mass action law kinetics if MA, MAI, MM or Hill kinetics).
'),
reaction(Reaction1, Kinetics1, Reactants1, Inhibitors1, Products1),
reaction(Reaction2, Kinetics2, Reactants2, Inhibitors2, Products2),
......@@ -122,11 +122,10 @@ merge_reactions(Reaction1, Reaction2):-
append(Reactants1,Reactants2,Reactants),
append(Inhibitors1,Inhibitors2,Inhibitors),
append(Products1,Products2,Products),
kinetics_product(Kinetics1, Kinetics2, Kinetics),
add_reaction(Kinetics,Reactants,Inhibitors,Products,false).
kinetics(Reactants1, Inhibitors1, Kinetics1, Kin1),
kinetics(Reactants2, Inhibitors2, Kinetics2, Kin2),
add_reaction(Kin1*Kin2,Reactants,Inhibitors,Products,false).
kinetics_product(Kinetics1, Kinetics2, Kinetics1*Kinetics2). % does not properly work for functions MA, MM, Hill
list_reactions :-
biocham_command,
......
......@@ -31,7 +31,7 @@ test(
test(
'michaelis menten reduction',
[Reactions == ['MA'(1)^2 for 'S'+'E'+'C'=> 'P'+'E'+'C']]
[Reactions == ['E'*'S'*'C' for 'S'+'E'+'C'=> 'P'+'E'+'C']]
) :-
command(load('library:examples/michaelis-menten/mm.bc')),
command(delete_reaction('C'=>'E'+'S')),
......@@ -40,7 +40,7 @@ test(
test(
'michaelis menten reduction C',
[Reactions == ['MA'(1)^2 for 'S'+'E'+'C'=> 'P'+'E'+'C']]
[Reactions == ['E'*'S'*'C' for 'S'+'E'+'C'=> 'P'+'E'+'C']]
) :-
command(load('library:examples/michaelis-menten/mm.bc')),
......
Supports Markdown
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