Commit 08502566 authored by Mathieu Hemery's avatar Mathieu Hemery
Browse files

Protect split_bidir. against convoluted parameters

parent 9cad6166
......@@ -69,7 +69,9 @@ split_bidirectional_reaction(Expression for Reactant => Product) :-
(
ode:substitute_functions(Expression, Expr),
distribute(Expr, DistExpr),
DistExpr = Up - Down
DistExpr = Up - Down,
models:formal_product(P, Reactant => Product),
present_in_kinetics(P, Down)
->
delete_reaction(Expression for Reactant => Product),
add_reaction(Up for Reactant => Product),
......
......@@ -1330,6 +1330,15 @@ formal_reactant(Mol, Reactants => _Products) :- !,
is_present(Mol, Reactants).
%! formal_product(+Molecule, +Reaction)
formal_product(Mol, _Reactants/_Inhibtors => Products) :- !,
is_present(Mol, Products).
formal_product(Mol, _Reactants => Products) :- !,
is_present(Mol, Products).
%! formal_catalyst(+Molecule, +Reaction)
formal_catalyst(Mol, Reactants => Products) :- !,
......
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