Installation notes for dbCCP4i

Version of 19th April 2007

Contents

Introduction
Requirements
Installation and setup for Linux
Installation and setup for Windows
Applications
Directory Structure
Compatibility with CCP4i
Known Issues

Introduction

dbCCP4i is a "database handler" system for interacting with CCP4i project databases. It consists of the "dbccp4i" program plus a number of supporting applications, principally a visualiser program called "dbviewer" for looking at project history data.

dbccp4i is a small server application that is intended to run in background and act as a single point of access to the database for external programs (referred to as client applications).

A recent CCP4 Newsletter article gives an overview of the project aims as well as describing the components and their relationships in more detail: www.ccp4.ac.uk/newsletters/newsletter45/articles/ccp4_bioxhit.html

Requirements

Basic requirements

dbCCP4i is written in Python and requires this to be installed on your system. It has been developed using version 2.4 so this is the recommended version (it is possible that it may work with older versions however this is untested). If you don't already have a suitable version of Python then one is available from the CCP4 website (see below) or directly from the Python website: www.python.org

dbCCP4i also requires that you have a recent version of the CCP4 suite (version 6.0 or better is recommended) installed on your system, and that the ccp4.setup file has been appropriately configured and sourced. The CCP4 software suite can be obtained via the CCP4 download pages: www.ccp4.ac.uk/download.php

To run the Tcl "dbconsole" application and the "dbviewer" application Tcl/Tk version 8.4 (or better) is also required. This is the recommended version for running CCP4i so you may already have this installed on your system; if not then you can get a suitable version from the CCP4 website or directly from the Tcl Developer Exchange: www.tcl.tk/

The "dbviewer" application also requires the Graphviz package. Recent versions of Linux appear to come with Graphviz as one of the packages on the installation discs, otherwise you can download and install the most recent version from the Graphviz website: www.graphviz.org
Version 2.2 or better is recommended. If you already have Graphviz installed then you can check the version by running "dot -V" at the command line.

Additional optional requirements for the SQLite database

dbCCP4i is designed to use the CCP4i project database "out of the box" and so doesn't need any additional packages to do this.

However it also has the option to use an embedded SQLite database backend. In order to enable this functionality the following additional packages are required:

See also the installation notes (under development).

Note: the SQLite database is not required for the basic operation of dbCCP4i with the CCP4i databases, and has not be significantly tested.

Installation and setup for Linux

To install and set up dbCCP4i on a Linux system, the following steps are required:

  1. Ensure that you have the required packages installed, and that the CCP4 environment has been set up.
  2. Unpack the "dbccp4i" directory.
    There is no requirement for this to be in a particular place.
  3. Copy the "dbccp4i.setup-dist" file (if your shell environment is C-shell) or "dbccp4i.setup-bash" (if it is Bash) in the "etc" subdirectory to"dbccp4i.setup".
  4. Edit the setting of the DBCCP4I_MASTER environment variable in "dbccp4i.setup", to point to the directory that dbccp4i was unpacked into (i.e. not the the dbccp4i directory but the one above it)
  5. Source the edited dbccp4i.setup file to set up the environment.

dbCCP4i and its applications should then be ready to use. A simple test is to run one of the "console" applications; there are also a number of test scripts in the "test" subdirectory: see the tests.html document.

Installation and setup for Windows

To install and set up dbCCP4i on a Windows system, the following steps are required:

  1. Ensure that you have the required packages installed, and that the CCP4 environment has been set up.
  2. Unpack the "dbccp4i" folder.
    There is no requirement for this to be in a particular place.
  3. Execute the "winbatch.py" Python script in the "etc" folder. You can do this by starting a command prompt (go to Start/All Programs/Accessories/Command prompt) and then moving to the "dbccp4i\etc" folder, then do "python winbatch.py -dbccp4i_top DBCCP4I_TOP", where DBCCP4I_TOP is the absolute path of the "dbccp4i" folder.
    This will generate a set of batch files that allow you to run the various applications (dbccp4i, dbviewer and so on).

dbCCP4i and its applications should then be ready to use. A simple test is to run one of the "console" applications; there are also a number of test scripts in the "test" subdirectory: see the tests.html document.

Applications

A number of applications are available:

Under Windows these can be run from the command prompt using the batch files "dbconsole.bat", "dbconsole_py.bat", "dbviewer.bat" and "starKey.bat", which should have been generated as part of the installation process.

Directory Structure

The following directories can be found in the installation:

application
Source code for the client applications (the consoles, viewer and starKey)
bin
UNIX shell script launchers for the handler and client applications
ClientAPI
Client API libraries (and supporting libraries) for Tcl and Python client applications
dbccp4i
Source code for the handler
doc
Documentation in HTML and text; start from INDEX.html
etc
Setup files
icons
Icons used by client applications
test
Various test scripts (see tests.html)
tools
Development utilities

Compatibility with CCP4i

Both CCP4i and dbCCP4i use the same system for accessing project and job database formats and standards, so there should be no problem running them interchangeably.

However: the current release version of CCP4i (1.4.4) doesn't use dbCCP4i and does not have the facility to simultaneously share the database resources with dbCCP4i at runtime. It does however have some simple fail-safe mechanisms to try and prevent corruption of data in the user's project databases in the event of "competition" between processes for those databases.

dbCCP4i for its part is intended to fail-safe when it detects unexpected changes to the database resources while it is running, for example if CCP4i is running at the same time.

Therefore it is likely that there may be some unexpected run-time behaviour if CCP4i and dbCCP4i are running simultaneously, though this should not result in damage to data the recommendation for this version is to try and avoid running them simultaneously.

Known Issues

dbCCP4i should now work under both Linux and Windows, however it has not been extensively tested on the Windows platform (particularly the SQLite backend).