Development Branch Installation

In a virtualenv::
pip install -r pgd/requirements.txt

Master Branch Installation

This is a manual installation guide for the Protein Geometry Database

Install dependencies

The following packages are required to run Protein Geometry Database. Either install these with your system’s package manager or from Pip (recommended). Note that system packages may not have the correct version.

The process for installing “py2cairo” was recently reported to be:

  1. Install libcairo2-dev via apt-get
  2. Install simplejson via pip to virtualenv
  3. Retrieve py2cairo from
  4. Run touch ChangeLog
  5. Run ./ from that checkout
  6. Run ./waf configure –prefix=foo where foo is the absolute location of the virtualenv
  7. Run ./waf build
  8. Run ./waf install
  9. Open a python interpreter and confirm that the cairo module can be imported

Get the Code

  1. Make sure you have Git installed.

  2. Either download and unpack the “latest release”:, or check it out from the repository:

    git clone


  1. In the project root, you’ll find a default-settings file called Copy it to

  2. If you want to use another database engine besides the default SQLite (not recommended for production), edit, and edit the following lines to reflect your wishes:

    1 DATABASE_ENGINE = ''   # <-- Change this to 'mysql'
    2 DATABASE_NAME = ''     # <-- Change this to a database name, or a file for SQLite
    3 DATABASE_USER = ''     # <-- Change this (not needed for SQLite)
    4 DATABASE_PASSWORD = '' # <-- Change this (not needed for SQLite)
    5 DATABASE_HOST = ''     # <-- Change this (not needed if database is localhost)
    6 DATABASE_PORT = ''     # <-- Change this (not needed if database is localhost)
  3. Initialize Database:

    ./ syncdb
  4. Everything should be all set up! Run the development server with:

    ./ runserver

Importing Data

See the importing data section for instructions on how to import data.

Additional configuration for production servers:

Deploying a production server requires additional setup steps.

  1. Change your SECRET_KEY to unique (and hopefully unguessable) strings in your

  2. Ensure the server has the ability to send emails or you have access to an SMTP server. Set EMAIL_HOST, EMAIL_PORT, and DEFAULT_FROM_EMAIL in For more complicated outgoing mail setups, please refer to the django email documentation.

  3. Follow the django guide to deploy with apache. Here is an example mod_wsgi file:

    1  import os
    2  import sys
    4  path = '/var/lib/django/pgd'
    5  if path not in sys.path:
    6      sys.path.append(path)
    8  os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
    10 import django.core.handlers.wsgi
    11 application = django.core.handlers.wsgi.WSGIHandler()
  4. If New Relic support is required, modify the WSGI file according to the New Relic documentation. On zeus, the New Relic configuration file is /etc/newrelic.ini.