Commit f37eec8e authored by HEMERY Mathieu's avatar HEMERY Mathieu
Browse files

First round of bug correction after previous changes!

parent 9f328085
......@@ -2,7 +2,7 @@
:- begin_tests(aliases).
test('alias', [true(Reactions == [2 * a => c])]) :-
test('alias', [true(Reactions == ['MA'(1) for 2 * a => c])]) :-
clear_model,
command(a + b => c),
command(alias(a = b)),
......
......@@ -523,6 +523,9 @@ sign(+ A, 1, A).
sign(- A, -1, A).
additive_block('_', []). % Notation of empty set in biocham
additive_block(+ A, [+A]).
additive_block(- A, [-A]).
......
......@@ -56,7 +56,8 @@ delete_reaction(Reaction):-
doc('
removes one reaction rule from the current set of reactions.
'),
delete_item([kind: reaction, item: Reaction]).
simplify_reaction(Reaction, ReactionFormated),
delete_item([kind: reaction, item: ReactionFormated]).
delete_reaction_named(Name):-
biocham_command,
......@@ -567,7 +568,9 @@ make_reaction(
->
Body = (Reactants <=> RightSolution)
;
Body = (Reactants + CatalystSolution <=> RightSolution + CatalystSolution)
simplify(Reactants + CatalystSolution, Reactants_full),
simplify(RightSolution + CatalystSolution, Products_full),
Body = (Reactants_full <=> Products_full)
)
;
(
......@@ -575,7 +578,9 @@ make_reaction(
->
Body = (Reactants => RightSolution)
;
Body = (Reactants + CatalystSolution => RightSolution + CatalystSolution)
simplify(Reactants + CatalystSolution, Reactants_full),
simplify(RightSolution + CatalystSolution, Products_full),
Body = (Reactants_full => Products_full)
)
).
......
......@@ -6,7 +6,7 @@
test(
'compound',
[Reactions == [2 * a + 2 * b => 2 * 'a-b']]
[Reactions == ['MA'(1) for 2 * a + 2 * b => 2 * 'a-b']]
) :-
clear_model,
command(add_reaction(2 * a + 2 * b => 2 * a-b)),
......@@ -14,7 +14,7 @@ test(
test(
'catalyst',
[Reactions == [b =[ b + a + c ]=> '_', '_' =[ b + a + c ]=> b]]
[Reactions == ['MA'(1) for 2*b+a+c => b+a+c, 'MA'(1) for b+a+c => 2*b+a+c]]
) :-
clear_model,
add_reaction(a + b + c <=[ b ]=> a + c),
......@@ -31,18 +31,16 @@ test(
test(
'michaelis menten reduction',
[true(Reactions == [(2*'MA'(1) for 'S'=['E'+'C']=>'P')])]
[Reactions == [2*'MA'(1) for 'S'+'E'+'C'=> 'P'+'E'+'C']]
) :-
command(load('library:examples/michaelis-menten/mm.bc')),
command(delete_reaction('C'=>'E'+'S')),
command(merge_reactions('E'+'S'=>'C','C'=>'E'+'P')),
% command(merge_molecules('E','C')),
all_items([kind: reaction], Reactions).
test(
'michaelis menten reduction C',
[true(Reactions == [(2*'MA'(1) for 'S'=['E'+'C']=>'P')])]
[Reactions == [2*'MA'(1) for 'S'+'E'+'C'=> 'P'+'E'+'C']]
) :-
command(load('library:examples/michaelis-menten/mm.bc')),
......
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