Project

General

Profile

Processing Server Installation » History » Version 8

Amber Herold, 04/06/2010 01:48 PM

1 1 Amber Herold
h1. Setup Appion programs
2
3
Download Myami.  
4
*TODO: Place link to file here!*
5
Install leginon http://emg.nysbc.org/documentation/leginon/bk02ch04s06.php
6
7
h3. Perform system check:
8
9 8 Amber Herold
In addition to the downloads from our svn repository, there are several other requirements that you will get either from your OS installation source, or from its respective website. The system check in the Leginon package checks your system to see if you already have these requirements.
10 1 Amber Herold
11
cd your_download_area/Leginon-1.6-ALL/Leginon
12
python syscheck.py
13
14
If python is not installed, this, of course will not run. If you see any lines like "*** Failed...", then you have something missing. Otherwise, everything should result in "OK".
15
16
h3. Install the package in each folder with commands like these
17
18
*TODO: move these into a single installer, ask Jim*
19
20
cd /your_download_area/myami/leginon
21
python setup.py install
22
23
cd ../pyami
24
python setup.py install
25
cd ../pyScope
26
python setup.py install
27
cd ../sinedon
28
python setup.py install
29
cd ../numextension
30
python setup.py install
31
cd ../libcv
32
python setup.py install
33
cd ../imageviewer
34
python setup.py install
35
36
h3. python-site-package-path: where the installed python packages went:
37
38
Python installer put the packages you installed to its site-packages directory. This enable all users on the same computer to access them. The easiest way to find where your installed package is called by python is to load a module from the package using interactive python command lines like this:
39
40
    * Start python command line from shell
41
42
      > python
43
44
    * Import a module from the package. Let's try sinedon here. All packages installed through the above setup.py script should go to the same place.
45
46
      python> import sinedon
47
48
    * If the module is loaded successfully, call the module attribute __path__ (two underscrolls before "path" and two underscrolls after) will return the location of the module it is loaded from
49
50
      python> sinedon.__path__
51
52
      RETURNS, For example,
53
      python> <module 'sinedon' from '/usr/lib/python2.5/site-packages/sinedon/__init__.pyc'> 
54
55
      In this case, /usr/lib/python2.5/site-packages/ is your python-site-package-path. If you go to that directory, you will find all the packages you just installed.
56
57
h3. Configure leginon.cfg:
58
59
A skeleton (default) configuration file is available:
60
[python-site-package-path]/Leginon/config/default.cfg
61
62
* Copy default.cfg to leginon.cfg.
63
  cp [python-site-package-path]/Leginon/config/default.cfg [python-site-package-path]/Leginon/config/leginon.cfg
64
65
* Add a directory for images. The rest is optional.
66
67
  Example of the configuration that you should set: (Here we assume your leginon database is named "dbemdata", and Leginon log into the database as a user named "usr_object" with no password set).
68
69
  [Images]
70
  path: your_storage_disk_path/leginon
71
72
h3. Names used in the example installation
73
74
From this point on, you will need to enter database user names for different configuration files and settings. These are NOT Leginon user names but what is required by MySQL database interaction. Consistent names are essential. In the example shown here, the leginon database is called "dbemdata", the project database is called "projectdata". The MySQL user name are the same, "usr_object", and in this case without a password.
75
76
h3. Configure sinedon.cfg:
77
78
*TODO: Consider moving this after we setup Mysql username.*
79
80
Sinedon is designed to be able to interact with multiple databases. It can be configured at global or user level.
81
82
    * An example configuration file is available at:
83
      /your_download_area/Leginon-1.6-ALL/sinedon/examples/sinedon.cfg
84
85
    * Configurations for all users should be placed at the following path:
86
      [python-site-package-path]/sinedon/sinedon.cfg
87
88
    * Modify host,db,user,passwd to what is used. Note that the user here is the MySQL user Leginon uses to communicate with the database for all Leginon users. For Leginon that uses Project database, set the following:
89
90
      [global]
91
      host: your_database_host
92
      user: usr_object
93
      passwd:
94
95
      [projectdata]
96
      db: projectdb
97
98
      [leginondata]
99
      db: leginondb
100
101
    * Add database configuration if you intend to use grid-inserting robot. The Robot2 module uses the database to communicate to the robot. Applications that carries the name "Robot" requires this to be set. In general, using the same database as the general leginon database is fine.
102
103
      [robot2]
104
      db: leginondb
105
106
h3. 5.1 Compile FindEM 
107
108
* Goto appion/findem folder to make findem.exe
109
110
* Compile the libraries and binary
111
112
<pre>
113
$ make
114
</pre>
115
116
* Test findem.exe to see if it runs
117
118
<pre>
119
$ make test
120
</pre>
121
122
*WARNING*
123
Only if the first part fails, you must add the path to libg2c.so library file.
124
Otherwise skip to next section.
125
126
* locate libg2c.so library file
127
128
<pre>
129
$ ls /usr/lib/gcc/`uname -i`-redhat-linux/3.4.6/libg2c.so
130
</pre>
131
132
<pre>
133
$ locate libg2c.so
134
</pre>
135
136
* Edit Makefile with location of libg2c.so
137
138
<pre>
139
$ nano Makefile
140
</pre>
141
142
* Example: EXLIBS=-L/usr/lib/gcc/i386-redhat-linux/3.4.6/ -lg2c
143
* Re-compile
144
145
h3. 5.2 Compile Ace2 
146
147
The 64 bit Ace2 binary is already available in the myami/bin directory. 
148
Test it by changing directories to myami/bin and type the following commands:
149
<pre>
150
$ ./ace2.exe -h
151
$ ./ace2correct.exe -h
152
</pre>
153
Notice the help display.
154
155
<pre>
156
If this does not work or you wish to compile it yourself follow the instructions here.
157
NOTE:
158
ace2 typically requires fftw 3.2 or greater. This is significantly faster than 3.1 (which is distributed with CentOS). 
159
There is a FFTW_WISDOM_ONLY flag in Image.m that can be commented in if you are using fftw 3.2 or greater.
160
*TODO: Can we have the make file detect which version is installed?*
161
162
* Goto myami/appion/ace2
163
* compile the libraries and binary
164
* test to see if program runs
165
166
$ make
167
$ ./ace2.exe -h
168
$ ./ace2correct.exe -h
169
$ mv -v ./ace2*.exe ../bin
170
</pre>
171
172
h3. 5.3 Compile Radermacher module 
173
174
* Goto appion/radermacher
175
176
* compile the libraries and binary
177
178
<pre>
179
$ python ./setup.py build
180
</pre>
181
182
* install module globally
183
184
<pre>
185
$ sudo python ./setup.py install
186
</pre>
187
188
* test installed module
189
190
<pre>
191
$ python
192
</pre>
193
194
<pre>
195
>>> import radermacher
196
>>> <Ctrl-D>
197
</pre>
198
199
h3. 5.4 Test Appion 
200
201 3 Amber Herold
If appion is installed locallaly in your home directory (you are the only user that can execute it), 
202
you will need to add myami and appion to the python path.
203
204 1 Amber Herold
* Go into the appion directory
205 2 Amber Herold
206
Open .bashrc in your home directory and edit it at the end of the file:
207 1 Amber Herold
Add the following lines:
208 2 Amber Herold
209
<pre>
210 6 Amber Herold
$ export PYTHONPATH="/your-complete-path-to-myami":"/your-complete-path-to-myami/appion":$PYTHONPATH
211 3 Amber Herold
$ export PATH="/your-complete-path-to-myami/appion/bin":$PATH
212 1 Amber Herold
</pre>
213
214
* Add appion to PYTHONPATH
215
216
<pre>
217 3 Amber Herold
$ export PYTHONPATH="/your-complete-path-to-myami/appion":$PYTHONPATH
218 1 Amber Herold
</pre>
219
220
*TODO: Consider moving appionlib so you only need to set one path.*
221
222 4 Amber Herold
To confirm the changes, open a new terminal and type:
223 5 Amber Herold
<pre>
224 4 Amber Herold
 $ export
225 1 Amber Herold
</pre>
226 6 Amber Herold
227
Look for the PATH and PYTHONPATH in the output. The paths that you entered should be there.
228 4 Amber Herold
229 1 Amber Herold
* Run the test script
230 3 Amber Herold
231
If you have installed appion for all users (the script does not exist yet) or it is local and you have added the paths above, you are ready to run the test.
232 1 Amber Herold
233
<pre>
234
$ ./check.sh
235
</pre>
236
237
*NOTE*
238
You can ignore EMAN, MATLAB, and UCSF Chimera errors at this point