PyRy3D - Installation


Supported platforms

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.7)
  • BioPython (>= 1.57)
  • Numpy (>= 1.3)

Installing PyRy3D from source on Ubuntu

To install PyRy3D on Ubuntu, you need to:

  1. Download the source distribution.
  2. Unzip the archive. A catalogue with the main program is created.
  3. Make sure Python 2.7 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
  4. Make sure Numpy and BioPython are installed
    sudo apt-get install python-numpy
    sudo apt-get install python-biopython
  5. Make sure the PyRy3D/ file is executable:
    chmod a+x PyRy3D/
  6. Add the path to a directory where you've extracted PyRy3D archive to your PYTHONPATH environment variable. Assuminig you have a PyRy3D folder in your home directory (e.g. /home/your_name/), type:
    export PYTHONPATH
  7. Run PyRy3D: -h

Compiling PyRy3D on Ubuntu

In order to use PyRy3D's --fast option, you need to compile it before running:

  1. Download and install swig (version 2.0 or newer).
  2. Download and install cmake (version 2.8 or newer).
  3. Enter Modules/Simul/cpp subdirectory in PyRy3D directory. Then type in terminal:
  4. Run PyRy3D: -h


Installing PyRy3D from source on Microsoft Windows

To install PyRy3D on Microsoft Windows XP, you need to:

  1. Download the source code.
  2. Unzip the archive. A catalog with the main program is created (it should be named PyRy3D.
  3. Make sure Python 2.5 or a higher version is installed. [download]
  4. Make sure Numpy is installed. [download].
  5. Make sure BioPython is installed. [download].
  6. Change an environment variable:
    Start -> Settings -> Control Panel -> System -> 
    Advanced -> Environment variables
    In 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 pyry3d subdirectory there!)
  7. 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:\PyRy3D\PyRy3D\, where C:\PyRy3D is a direcory where you've unpacked PyRy3D archive.
  8. After this, you can from any location write:
    >>>from pyry3d import *
  9. and also: -h

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 "" file)
        3. Type the following command ("CHIMERA" here is the location where you have your Chimera installed): 
            CHIMERA/bin/chimera --nogui --silent --script " install"
        4. To check if the library was installed correctly, open Chimera, go to Tools -> General Controls -> IDLE and type: 
            import Bio 
            If 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.

Technical details

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.