Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Pre-built packages
## Linux
Use our repositories hosted at [Open Build Service](http://build.opensuse.org).
We have packages for Debian, Ubuntu, CentOS, Fedora, OpenSUSE/SUSE, RHEL,
Scientific Linux. Visit the following page for instructions.
https://software.opensuse.org/download.html?project=home:moose&package=moose
## MacOSX
MOOSE is available via [homebrew](http://brew.sh).
$ brew install homebrew/science/moose
# Building MOOSE from source
To build `MOOSE` from source, you can either use `cmake` (recommended) or GNU `make` based flow.
Download the latest source code of moose from github.
$ git clone -b master https://github.com/BhallaLab/moose-core
## Install dependencies
For moose-core:
- gsl-1.16 or higher.
- libhdf5-dev (optional)
- python-dev
- python-numpy
On Ubuntu-12.04 or higher, these can be installed with:
sudo apt-get install python-dev python-numpy libhdf5-dev cmake libgsl0-dev g++
__NOTE__ : On Ubuntu 12.04, gsl version is 1.15. You should skip `libgsl0-dev` install gsl-1.16 or higher manually.
SBML support is enabled by installing [python-libsbml](http://sbml.org/Software/libSBML/docs/python-api/libsbml-installation.html). Alternatively, it can be installed by using `python-pip`
$ sudo pip install python-libsbml
## Use `cmake` to build moose:
$ cd /path/to/moose-core
$ mkdir _build
$ cd _build
$ cmake ..
$ make
$ ctest --output-on-failure
This will build moose and its python extentions, `ctest` will run few tests to
check if build process was successful.
To install MOOSE into non-standard directory, pass additional argument `-DCMAKE_INSTALL_PREFIX=path/to/install/dir` to cmake.
### Python3
You just need to one command in previous set of instructions to following
cmake -DPYTHON_EXECUTABLE=/opt/bin/python3 ..
### Install
$ sudo make install
## Using gnu-make
__This may or may not work (not maintained by packager)__
You may need to inform make of C++ include directories and library directories
if your installed packages are at non-standard location. For example, if your
have libsbml installed in `/opt/libsbml` and the header files are located in
`/opt/libsbml/include` and lib files are located in `/opt/libsbml/lib`, you can
set the environment variables `CXXFLAGS` and `LDFLAGS` to include these before
calling make:
export CXXFLAGS= -I/opt/libsbml/include
export LDFLAGS= -L/opt/libsbml/lib
### Release build:
cd moose
make BUILD=release
### Debug build:
cd moose
make BUILD=debug
### Python 3K
By default, MOOSE is built for Python 2. In case you want to build MOOSE for
Python 3K, you need to pass the additional flag:
PYTHON=3
like:
make BUILD=release PYTHON=3
## Installation:
For system-wide installation you can run:
sudo make install
## Post installation
Now you can import moose in a Python script or interpreter with the statement:
import moose
If you have installed the GUI dependencies below for running the graphical user
interface, then you can run the GUI by double-clicking on the desktop icon or
via the main-menu. The squid axon tutorial/demo is also accessible via these
routes.
## Local-installation
If you do not have permission to install it in system directories, you can let
it be where it was built or copy the `python` subdirectory of MOOSE source tree
to a location of your choice and add the path to your PYTHONPATH environment
variable. Suppose you have a ~/lib directory where you keep all your locally
built libraries, do:
cp -r {moose-source-directory}/python ~/lib/
and add this to your .bashrc file (if you use bash shell):
export PYTHONPATH="$HOME/lib/python":"$PYTHONPATH"
For other shells, look up your shell's manual to find out how to set environment
variable in it.