Table of contents
- PyRy3D runs on both Windows and UNIX.
Using the installation instructions below, we have successfully run PyRy3D on Ubuntu (ver. >= 8.10) and Microsoft Windows.
PyRy3D requires the following dependencies:
- Python (>= 2.5)
- BioPython (>= 1.57)
- Numpy (>= 1.3)
Installing PyRy3D from source on Ubuntu
To install PyRy3D on Ubuntu, you need to:
- Download the source distribution.
- Unzip the archive. A catalogue with the main program pyry3d.py is created.
- Make sure Python 2.5 or a higher version is installed. Make sure you have in "System -> Administration -> Software Sources" checked option "Community-maintained Open Source Software (universe)". Then type in terminal:
sudo apt-get install python sudo apt-get install python-dev
- Make sure Numpy and BioPython are installed
sudo apt-get install python-numpy sudo apt-get install python-biopython
- Make sure the PyRy3D/pyry3d.py file is executable:
chmod a+x PyRy3D/pyry3d.py
- Add the path to a directory where you've extracted PyRy3D archive to your PYTHONPATH environment variable. Assuminig you have a
PyRy3Dfolder in your home directory (e.g. /home/your_name/), type:
PYTHONPATH=$PYTHONPATH:/home/your_name/PyRy3D export PYTHONPATH
- Run PyRy3D:
Compiling PyRy3D on Ubuntu
In order to use PyRy3D's --fast option, you need to compile it before running:
- Download swig (version 2.0 or newer).
- Download cmake (version 2.8 or newer).
- Enter Modules/Simul/cpp subdirectory in PyRy3D directory. Then type in terminal:
- If the compilation fails, try to change one line in Modules/Simul/cpp/Makefile and repeat step 3:
from: SWIG = ../../../swig/bin/swig to: SWIG = swig
- Run PyRy3D:
Installing PyRy3D from source on Microsoft Windows
To install PyRy3D on Microsoft Windows XP, you need to:
- Download the source code.
- Unzip the archive. A catalog with the main program pyry3d.py is created (it should be named PyRy3D.
- Make sure Python 2.5 or a higher version is installed. [download]
- Make sure Numpy is installed. [download].
- Make sure BioPython is installed. [download].
- Change an environment variable:
Start -> Settings -> Control Panel -> System -> Advanced -> Environment variablesIn the field Environment variables for user YOUR_NAME*, click **New, and next in the field Variable name type PYTHONPATH, and in the field Variable value type the full path to the directory with PyRy3D (e.g.
C:\PyRy3D\). Don't add the
- Add the path to the Python interpreter to the environment variable
PATH, as the value
C:\Python25. If there is something already, add a semicolon, and the new value then, e.g.:
C:\somethingalreadythere\;C:\Python25\. Moreover, add
C:\PyRy3Dis a direcory where you've unpacked PyRy3D archive.
- After this, you can from any location write:
>>>from pyry3d import *
- and also:
PyRy3D GUI installation
- The graphical user interface that we developed for PyRy3D is an extension to a popular molecular viewer, called UCSF Chimera. It is not a standalone program, so in order to use it, you must first install the viewer.
STEP 1: Download and install UCSF Chimera, version 1.9 or higher. You can find the software here.
- PyRy3D, as well as the PyRy3D Chimera Extension, extensively uses the BioPython library - a very popular set of programming tools that facilitates working with biological data. In order for the extension to work, you have to download BioPython and install it. If you work on Linux, you have to do it in a specific way - even if you already have BioPython installed on your system.
STEP 2: Download BioPython 1.63 here and unpack it. Do not install it yet.
- UCSF Chimera comes with its own Python copy. In order to use BioPython within Chimera, you need to install the library using Chimera's Python copy.
STEP 3: Install BioPython 1.63 using Chimera's Python copy: 1. Open the terminal. 2. Change your working directory to the previously unpacked BioPython folder (it must contain the "setup.py" file) 3. Type the following command ("CHIMERA" here is the location where you have your Chimera installed):
CHIMERA/bin/chimera --nogui --silent --script "setup.py install"4. To check if the library was installed correctly, open Chimera, go to Tools -> General Controls -> IDLE and type:
import BioIf it doesn't return any exception, it means BioPython is installed correctly.
- Installing the Extension itself is very simple. All that needs to be done is placing the folder containing the plugin in the right directory. PyRy3D machinery is already included in the plugin's directories.
STEP 4: Place the "PyRy3D_Extension" folder in share directory, located in the main UCSF Chimera installation directory. It might also be necessary to compile PyRy3D available in the package, using instructions from the sections above.
- uses a number of other Python libraries, which are briefly covered in the following:
- Time-critical calculations involving float values are done by the C-based NumPy library (not Numeric).
- For parsing PDB files, superposition, and neighbor search, the PDB package from BioPython is used. In particular, the modules PDB parser, NeighborSearch, and Superimposer are imported. However, there are a few binary files that require compilation (e.g. KDTree), which is why the library cannot be delivered as source.