Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lifeware
biocham
Commits
9cad6166
Commit
9cad6166
authored
Aug 05, 2020
by
Mathieu Hemery
Browse files
Add a present_in_kinetics test and use it to boost check_model
parent
93dc3aa4
Changes
2
Hide whitespace changes
Inline
Side-by-side
kinetics.pl
View file @
9cad6166
...
...
@@ -2,7 +2,8 @@
kinetics
,
[
kinetics
/
4
,
add_coefficient
/
2
add_coefficient
/
2
,
present_in_kinetics
/
2
]
).
...
...
@@ -95,6 +96,19 @@ make_sum([RS * RO | Tail], S, O, Expression, Sum) :-
add_coefficient
(
C
,
1
*
C
).
%! present_in_kinetics(+Molecule, +Kinetics)
%
% Test if the Molecule (or whatever actually) is present in the kinetics
present_in_kinetics
(
Molecule
,
Molecule
)
:-
!.
present_in_kinetics
(
Molecule
,
Kinetics
)
:-
Kinetics
=..
[
_Functor
|
Decomposed
],
present_in_kinetics_sr
(
Molecule
,
Decomposed
).
present_in_kinetics_sr
(
Molecule
,
[
Head
|
Tail
])
:-
present_in_kinetics
(
Molecule
,
Head
),!;
present_in_kinetics_sr
(
Molecule
,
Tail
).
:-
doc
(
'Useful abbreviations for mass action law kinetics (with inhibitors), Michaelis-Menten kinetics, Hill kinetics (with inhibitors).'
).
...
...
models.pl
View file @
9cad6166
...
...
@@ -85,6 +85,7 @@ Coder: T. Martinez
:-
use_module
(
arithmetic_rules
).
:-
use_module
(
doc
).
:-
use_module
(
formal_derivation
).
:-
use_module
(
kinetics
).
:-
use_module
(
reaction_rules
).
:-
use_module
(
util
).
...
...
@@ -1373,14 +1374,21 @@ test_wellformed([Molecule|Tail], Expression_raw for Reaction) :-
;
formal_reactant
(
Molecule
,
Reaction
)
->
present_in_kinetics
(
Molecule
,
Expression
),
test_wf_reactant
(
Molecule
,
Expression
)
;
formal_inhibitor
(
Molecule
,
Reaction
)
->
present_in_kinetics
(
Molecule
,
Expression
),
test_wf_inhibitor
(
Molecule
,
Expression
)
;
!,
test_wf_other
(
Molecule
,
Expression
)
(
\
+
(
present_in_kinetics
(
Molecule
,
Expression
)),
!
;
test_wf_other
(
Molecule
,
Expression
)
)
),
test_wellformed
(
Tail
,
Expression
for
Reaction
).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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