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
f3cb2489
Commit
f3cb2489
authored
Apr 22, 2020
by
FAGES Francois
Browse files
traceinformation
parent
7c43f53f
Changes
2
Hide whitespace changes
Inline
Side-by-side
rate_independence.pl
View file @
f3cb2489
...
...
@@ -67,7 +67,7 @@ rate_independence_reduction(Inputs, Outputs):-
doc
(
'Reduces the current reaction model while preserving rate independence for computing \\argument{Outputs} species from \\argument{Inputs} species.'
),
simplify
(
Inputs
,
Outputs
),
!,
writeln
(
'Reduced
model:
'
),
writeln
(
'Reduced'
),
list_model
.
rate_independence_reduction_inputs_sinks
:-
...
...
@@ -185,6 +185,7 @@ writeln('--------- iterate ---------'), list_model,
trivial_reaction
:-
item
([
kind
:
reaction
,
id
:
Id
,
item
:
Reaction
]),
reaction
(
Reaction
,
_Kinetics
,
Reactants
,
_Inhibitors
,
Reactants
),
write
(
'trivial reaction: '
),
writeln
(
Reaction
),
delete_item
(
Id
).
% Elimination of doublon reactions with same reactants and products
...
...
@@ -196,6 +197,7 @@ same_reaction:-
item
([
kind
:
reaction
,
id
:
Id2
,
item
:
Reaction2
]),
Id
\
=
Id2
,
reaction
(
Reaction2
,
_
,
Reactants
,
_
,
Products
),
write
(
'double reaction: '
),
writeln
(
Reaction2
),
delete_item
(
Id2
).
...
...
@@ -219,6 +221,7 @@ simpl(M):-
(
Reactions
=
[
Reaction1
]
% M catalyst not produced elsewhere
->
write
(
'Isolated catalyst: '
),
write
(
M
),
write
(
' in '
),
writeln
(
Reaction1
),
delete_reaction
(
Reaction1
),
reaction
(
Reaction1
,
Kinetics1
,
Reactants1
,
Inhibitors1
,
Products1
),
member
((
C
*
M
),
Reactants1
),
...
...
@@ -249,7 +252,8 @@ simpl(M):-
\
+
reaction
(
Reaction2
,
_
,
Products1
,
_
,
_
)
)
),
!,
write
(
'Isolated species: '
),
write
(
M
),
write
(
' in '
),
writeln
(
Reaction1
),
delete_reaction
(
Reaction1
),
forall
(
...
...
@@ -275,7 +279,8 @@ simpl(M):-
member
((
S
*
M
),
Products4
),
delete
(
Products4
,
(
S
*
M
),
Beta
)
;
Reactions
=
[]
Reactions
=
[],
Reaction4
=
' '
),
...
...
@@ -344,6 +349,7 @@ simpl(M):-
delete_reaction
(
Reaction4
)
)
),
write
(
'Isolated species in loops: '
),
write
(
M
),
write
(
' in '
),
writeln
(
Reaction1
),
writeln
(
Reaction2
),
writeln
(
Reaction3
),
writeln
(
Reaction4
),
delete_reaction
(
Reaction1
),
delete_reaction
(
Reaction2
),
...
...
rate_independence_test.bc
View file @
f3cb2489
prolog('writeln("%%%%%%%% DIVERGING SYLVAIN %%%%%%%%%")').
clear_model.
a=>b.
b=> a+c.
list_model.
test_rate_independence_inputs_sinks.
prolog('writeln("ANSWER DIV ")'). prolog('writeln("============")').
clear_model.
a=>b.
b=> a+c.
d=> a.
list_model.
test_rate_independence_inputs_sinks.
prolog('writeln("ANSWER DIV ")'). prolog('writeln("============")').
clear_model.
a=>b.
b=>2*a.
a=>c.
list_model.
test_rate_independence_inputs_sinks.
prolog('writeln("ANSWER DIV ")'). prolog('writeln("============")').
clear_model.
a=>b.
b=>c.
c=>2*a.
b=>d.
list_model.
test_rate_independence_inputs_sinks.
prolog('writeln("ANSWER DIV ")'). prolog('writeln("============")').
prolog('writeln("%%%%%%%% WRONG ANSWER %%%%%%%%%")').
prolog('writeln("%%%%%%%% UNDECIDED %%%%%%%%%")').
...
...
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