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
1cc91806
Commit
1cc91806
authored
Apr 16, 2018
by
SOLIMAN Sylvain
Browse files
conservations handled, doc added, real command
parent
3e5c40d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
lemon.pl
View file @
1cc91806
...
...
@@ -15,6 +15,7 @@
% :- use_module(doc).
:-
use_module
(
counters
).
:-
use_module
(
invariants
).
%! export_lemon_graph(+OutputFile) is det.
...
...
@@ -22,6 +23,12 @@
% exports the current influence graph to OutputFile (adding '.lgf' extension
% if needed)
export_lemon_graph
(
OutputFile
)
:-
biocham_command
,
doc
(
'exports the current influence graph to \\argument{OutputFile} in Lemon
graph format (\\url{http://lemon.cs.elte.hu/trac/lemon}) (adding ".lgf"
extension if needed). Computes the conservation laws of the model in order
to do so.'
),
type
(
OutputFile
,
output_file
),
automatic_suffix
(
OutputFile
,
'.lgf'
,
write
,
FilenameLgf
),
setup_call_cleanup
(
open
(
FilenameLgf
,
write
,
Stream
),
...
...
@@ -34,6 +41,7 @@ export_lemon_graph(OutputFile) :-
%
% exports the current influence graph to the given Stream
export_lemon_stream
(
Stream
)
:-
with_output_to
(
atom
(
_
),
invariants
:
find_pinvar
),
setup_call_cleanup
(
new_graph
(
GraphId
),
(
...
...
@@ -53,8 +61,6 @@ export_lemon_stream(Stream) :-
%! export_lemon_stream(+Id, +Stream) is det.
%
% exports the graph associated to Id to the stream Stream
%
% @tbd export conservation laws
export_lemon_stream
(
Id
,
Stream
)
:-
write
(
Stream
,
'@nodes\nlabel\tspecies\n'
),
set_counter
(
species
,
0
),
...
...
@@ -93,7 +99,18 @@ export_lemon_stream(Id, Stream) :-
)
),
% TODO conservation laws
write
(
Stream
,
'@attributes\n'
).
write
(
Stream
,
'@attributes\nconserv '
),
findall
(
Conserv
,
(
invariants
:
base_mol
(
List
),
atomic_list_concat
(
List
,
','
,
Conserv
)
),
ConservList
),
atomic_list_concat
(
ConservList
,
';'
,
ConservAtom
),
write
(
Stream
,
ConservAtom
),
write
(
Stream
,
';\n'
).
%! reactions(-Reaction, -Uid) is nondet.
...
...
toc.org
View file @
1cc91806
...
...
@@ -45,6 +45,7 @@
- influence_editor.pl
** Influence graph
- influence_graphs.pl
- lemon.pl
* Events
- events.pl
* Importing and Exporting BIOCHAM Models
...
...
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