Commit 20c18df4 authored by Thierry Martinez's avatar Thierry Martinez
Browse files

Graph editor

parent c117f67e
...@@ -36,7 +36,7 @@ biocham_silent(_). ...@@ -36,7 +36,7 @@ biocham_silent(_).
generate_doc :- generate_doc :-
set_plot_driver(plot_png), set_plot_driver(gnu_plot_png),
set_counter(plot_png, 0), set_counter(plot_png, 0),
generate_doc(doc), generate_doc(doc),
generate_doc(devdoc). generate_doc(devdoc).
...@@ -835,6 +835,10 @@ write_command(begin, enumerate, Doc) :- ...@@ -835,6 +835,10 @@ write_command(begin, enumerate, Doc) :-
nb_setval(opened_li, false), nb_setval(opened_li, false),
write(Doc, '<ol>'). write(Doc, '<ol>').
write_command(begin, example, Doc) :-
!,
write(Doc, '</div><div class="example"><div><strong>Example.</strong> ').
write_command(item, Argument, Doc) :- write_command(item, Argument, Doc) :-
!, !,
close_opened_li(Doc), close_opened_li(Doc),
...@@ -852,11 +856,9 @@ write_command(end, enumerate, Doc) :- ...@@ -852,11 +856,9 @@ write_command(end, enumerate, Doc) :-
close_opened_li(Doc), close_opened_li(Doc),
write(Doc, '</ol>'). write(Doc, '</ol>').
write_command(example, Argument, Doc) :- write_command(end, example, Doc) :-
!, !,
write(Doc, '</div><div><strong>Example.</strong> '), write(Doc, '</div></div><div>').
atom_chars(Argument, ArgumentChars),
write_doc_chars(ArgumentChars, Doc).
write_command(Command, _Argument, _Doc) :- write_command(Command, _Argument, _Doc) :-
throw(error(unknown_command(Command))). throw(error(unknown_command(Command))).
......
:- module(
graph_editor,
[
new_graph/0,
delete_graph/1,
set_graph_name/1,
list_graphs/0,
select_graph/1,
dot/0,
export_dot/1,
add_vertex/1,
delete_vertex/1,
add_attribute/2,
delete_attribute/2,
add_edge/1,
delete_edge/1,
list_edges/2
]
).
:- devdoc('').
#!/bin/sh #!/bin/sh
brew install swi-prolog gsl libsbml brew install swi-prolog gsl libsbml gnuplot
...@@ -9,14 +9,18 @@ ...@@ -9,14 +9,18 @@
numerical_simulation :- numerical_simulation :-
biocham_command, biocham_command,
doc('performs a numerical simulation up to 20s.'), doc('
performs a numerical simulation up to 20s.
\\begin{example}
'),
biocham_silent(clear_model), biocham_silent(clear_model),
biocham(a => b), biocham(a => b),
biocham(present(a)), biocham(present(a)),
biocham(list_reactions),
biocham(list_ODE),
biocham(numerical_simulation), biocham(numerical_simulation),
biocham(plot), biocham(plot),
doc('
\\end{example}
'),
numerical_simulation(20). numerical_simulation(20).
......
...@@ -12,7 +12,16 @@ list_ODE :- ...@@ -12,7 +12,16 @@ list_ODE :-
biocham_command, biocham_command,
doc(' doc('
returns the set of ordinary differential equations returns the set of ordinary differential equations
and initial concentrations (one line per molecule).'), and initial concentrations (one line per molecule).
\\begin{example}
'),
biocham_silent(clear_model),
biocham(a => b),
biocham(present(a)),
biocham(list_ODE),
doc('
\\end{example}
'),
compute_ode, compute_ode,
print_ode. print_ode.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
plot/0, plot/0,
set_plot_driver/1, set_plot_driver/1,
gnu_plot/0, gnu_plot/0,
plot_png/0, gnu_plot_png/0,
export_plot/1, export_plot/1,
export_plot_to_png/1 export_plot_to_png/1
] ]
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
plot :- plot :-
biocham_command, biocham_command,
doc('plots the current trace.'), doc('plots the current trace.'),
doc('\\example'),
get_plot_driver(Driver), get_plot_driver(Driver),
Driver. Driver.
...@@ -31,7 +30,7 @@ gnu_plot :- ...@@ -31,7 +30,7 @@ gnu_plot :-
execute_plot(['-persist', 'plot.plot']). execute_plot(['-persist', 'plot.plot']).
plot_png :- gnu_plot_png :-
count(plot_png, Index), count(plot_png, Index),
format(atom(Filename), 'plot~d.png', [Index]), format(atom(Filename), 'plot~d.png', [Index]),
export_plot_to_png(Filename), export_plot_to_png(Filename),
......
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