Differences between revisions 2 and 3
Revision 2 as of 2006-10-25 13:54:45
Size: 3777
Editor: bmb244
Comment:
Revision 3 as of 2006-10-25 14:22:29
Size: 3918
Editor: bmb244
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
 '''NOTE''' This is an additional information for optimized_ali2d_c. If you want to back to the main page, please click optimized_ali2d_c
  • NOTE This is an additional information for optimized_ali2d_c. If you want to back to the main page, please click optimized_ali2d_c

Overview

  • The ali2d_c (original version) is for performing 2-D reference-free alignment of an image series (without CTF correction). For the optimization purpose, the optimized ["ali2d cm"] (modified version) dosen't have x range (sx) and y range (sy) which are for translation search in x and y directions. We also ignore the translation step in this case since we don't have any search direction.BR

Develop Environment

Python

  • Python is a dynamic object-oriented programming language that offers strong support for integration with C++, comes with extensive libraries running on Linux/Unix.

SPARX

  • SPARX (Single Particle Analysis for Resolution eXtension) is emphasis on electron microscopy (EM) structure determination. Extensive library of python scripts perform EM-related computational tasks.

EMAN2

  • EMAN2' is focus on providing single particle reconstruction methods. EMAN consists of C++ library with bindings to the Python programming language. SPARX also relies on the EMAN2 library of fundamental C++ image processing functions.

Before you start

Installation

The 'SPARX' packages are installed under a user-chosen directory. Installation from source is fully compatible with your system. After download the source, the steps are

   mkdir/sparx
   tar zxvf sparx-installer.tar.gz
   cd sparx-installer
   ./install/sparx

The installer does not touch anything outside those two directories, and it works on any linux system. For further question, click HowToInstall or email to mhhohn@lbl.gov .

To update, upload, and remove individual parts

Update for sparx and EMAN2

   cd ~/sparx
   cvs up -dP
   cd ~/sparx/libpy
   cvs up -dP

   cd ~/EMAN2/src/eman2
   cvs up -dP
   cd ~/EMAN2/src/build
   cmake ../eman2
   make && make install

Upload individual parts to CVS

   cvs add filename.py
   cvs ci filename.py 

Remove individual parts to CVS

   rm /user/home/sparx/bin/filename.py 
   cvs remove filename.py
   cvs ci filename.py 

To run Python program

There are two ways to start running Pyton code. First, you can simply type the command on the window sparx and it allows your computer start the sparx console. To use SPARX library, you need to import fuctions first.

   In [1]: from sparx import *

If you want to test one specific function, for example ["info"], in applications.py located in /user/home/sparx/lipbin, then you type on the console like below,

   In [2]: from applications import info
   In [3]: info(''file or parameter name'')

Of course, you don't want to type every single line command on the console. To make an excute pyton file, we need to put below code inside of the file. Make sure that your_python_program has to be same as the file name.

   #! /usr/bin/env python
   import os from EMAN2 
   import * from sparx 
   from optparse import OptionParser import sys
   from your_python_file import your_python_program

   def main():
       # This example recieve one string and one number as input
       progname = os.path.basename(sys.argv[0]) usage = progname + "--num = number"
       parser = OptionParser(usage,version=SPARXVERSION) 
       parser.add_option("num", type="float",default=1, help="  ")
       (options, args) = parser.parse_args() 
       your_python_program(options.num)

   if __name__ == "__main__":
      main()

Once you have an excute *.py file, you need to give it a permision on the Unix terminal.

   chmod u+x 
   source usr/.cshrc

Develop_Environment (last edited 2013-07-01 13:12:24 by localhost)