Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lifeware
biocham
Commits
f37eec8e
Commit
f37eec8e
authored
Nov 25, 2019
by
HEMERY Mathieu
Browse files
First round of bug correction after previous changes!
parent
9f328085
Changes
4
Hide whitespace changes
Inline
Side-by-side
aliases.plt
View file @
f37eec8e
...
...
@@ -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)),
...
...
arithmetic_rules.pl
View file @
f37eec8e
...
...
@@ -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
]).
...
...
reaction_editor.pl
View file @
f37eec8e
...
...
@@ -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
)
)
).
...
...
reaction_editor.plt
View file @
f37eec8e
...
...
@@ -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')),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment