biocham.pl 839 Bytes
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 14
:- doc('
  The Biochemical Abstract Machine (Biocham) is a software environment for
  modeling and analyzing biochemical systems.
').
Thierry Martinez's avatar
Thierry Martinez committed
15 16 17 18 19 20 21 22

start :-
  about,
  initialize,
  do_arguments.


initialize :-
Thierry Martinez's avatar
Thierry Martinez committed
23
  initialize_library_path,
Thierry Martinez's avatar
Thierry Martinez committed
24
  prolog_history(enable),
Thierry Martinez's avatar
Thierry Martinez committed
25 26
  set_counter(item_id, 0),
  new_model.
Thierry Martinez's avatar
Thierry Martinez committed
27 28


Thierry Martinez's avatar
Thierry Martinez committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
:- 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
49
biocham_command.
Thierry Martinez's avatar
Thierry Martinez committed
50 51 52


biocham_command(_).