biocham.pl 2.04 KB
Newer Older
Thierry Martinez's avatar
Thierry Martinez committed
1 2 3
:- module(
  biocham,
  [
Thierry Martinez's avatar
Thierry Martinez committed
4 5
    start/0,
    initialize/0,
Thierry Martinez's avatar
Thierry Martinez committed
6
    biocham_command/0,
Thierry Martinez's avatar
Thierry Martinez committed
7 8
    biocham_command/1,
    library_path/1
Thierry Martinez's avatar
Thierry Martinez committed
9 10
  ]).

Thierry Martinez's avatar
Thierry Martinez committed
11 12 13
:- doc('
  The Biochemical Abstract Machine (Biocham) is a software environment for
  modeling and analyzing biochemical systems.
Thierry Martinez's avatar
Thierry Martinez committed
14
  Biocham is mainly composed of~:
Thierry Martinez's avatar
Thierry Martinez committed
15 16 17 18 19 20 21 22 23 24 25 26 27
  \\begin{itemize}
  \\item a rule-based language for modeling biochemical systems (compatible with
    SBML and SBGN),
  \\item different simulators (Boolean, differential, stochastic),
  \\item a temporal logic based language to formalize the temporal properties of
    a biological system and validate models with respect to such specifications,
  \\item unique features for developing/correcting/completing/reducing/coupling
    models, including the inference of kinetic parameters in high dimension from
    temporal logic constraints.
  \\end{itemize}
  Biocham is a free software protected by the GNU General Public License GPL
  version 2. This is an Open Source license that allows free usage of this
  software.
Thierry Martinez's avatar
Thierry Martinez committed
28
').
Thierry Martinez's avatar
Thierry Martinez committed
29 30 31 32 33 34 35 36

start :-
  about,
  initialize,
  do_arguments.


initialize :-
Thierry Martinez's avatar
Thierry Martinez committed
37
  initialize_library_path,
Thierry Martinez's avatar
Thierry Martinez committed
38
  set_prolog_flag(allow_variable_name_as_functor, true),
Thierry Martinez's avatar
Thierry Martinez committed
39
  prolog_history(enable),
Thierry Martinez's avatar
Thierry Martinez committed
40
  set_counter(item_id, 0),
Thierry Martinez's avatar
Thierry Martinez committed
41
  set_plot_driver(gnu_plot),
Thierry Martinez's avatar
SBML  
Thierry Martinez committed
42 43 44
  set_image_viewer_driver(open_file),
  set_draw_graph_driver(graph_pdf),
  nb_setval(graph_pdf, 0),
Thierry Martinez's avatar
Thierry Martinez committed
45 46
  nb_setval(current_models, []),
  load_biocham('library:initial'),
Thierry Martinez's avatar
Thierry Martinez committed
47
  new_model.
Thierry Martinez's avatar
Thierry Martinez committed
48 49


Thierry Martinez's avatar
Thierry Martinez committed
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
:- dynamic(library_path/1).


initialize_library_path :-
  (
    getenv('BIOCHAMLIB', LibraryPath)
  ->
    true
  ;
    executable_filename(ExecutableFilename),
    absolute_file_name(
      'library/gsl_solver.c',
      LibraryFile,
      [relative_to(ExecutableFilename)]
    ),
    file_directory_name(LibraryFile, LibraryPath)
  ),
  assertz(library_path(LibraryPath)).


Thierry Martinez's avatar
Thierry Martinez committed
70 71
biocham_command :-
  doc('Declares a command for the top-level.').
Thierry Martinez's avatar
Thierry Martinez committed
72 73


Thierry Martinez's avatar
Thierry Martinez committed
74 75 76 77 78
biocham_command(_) :-
  doc('
    With a * : declares a command for the top-level that can take an
    unlimited number of arguments.
    The additional arguments are given as a list in the last parameter.').