Installation

Please read the prerequisites section 1. Then download chord-*.tgz. The exact filename will depend on the current version of CHORD, OEChem and gcc. Then decide whether you want to create the database containing CHORD (section 2) to help you learn about CHORD, and/or want to install CHORD into "your_database" (section 3). Then contact license@gnova.com to obtain a license to be installed into CHORD. Then enjoy learning about and using the functions of CHORD.

1. Prerequisites for gNova CHORD

gNova CHORD depends upon PostgreSQL and OEChem and uses the gcc loader to create a shared library for new CHORD PostgreSQL functions.

If your PostgreSQL system is configured to require passwords for access, you will need to know your PostgreSQL superuser database access password (not the system superuser password or the system postgres login password) to complete the installation. As the final step of installation, in order to use CHORD, please contact license@gnova.com to obtain your license key. Minimal help with PostgreSQL and OEChem is available below.

2. Installation of gNova CHORD test database

Follow these instructions to install a database named chord that will contain all the tables and functions necessary to demonstrate the complete functionality of CHORD. For first time users, we recommend building the chord database, since it has little impact on other databases. Once you are familiar with CHORD, you can install these tables and functions into "your_database". If you are already familiar with the functions in CHORD, for example if you are simply upgrading to a newer version of CHORD, you can proceed to the next section if you wish to install CHORD into "your_database".

Create a directory /usr/local/gnova/chord, or whatever directory you wish to contain the installation files. You may need to be the system superuser to do this, but system superuser is not required for the installation as long as the directory is writeable by you. You may need to be the system superuser to copy gnova.so to the postgresql library. Download chord-*.tgz, or copy your previously downloaded chord-*.tgz to the installation directory. Do the following (the file INSTALL-NOTES within the tgz file also contains these installation instructions) :

The OE_DIR and OE_LIB variable may be different in your installation. The location to copy gnova.so may be different in your installation. The install script contains commands that must be run as the postgres superuser, typically postgres. If your postgres installation calls for it, you will have to type in the postgres superuser password, once for each command that requires it in the install script.

Now you have a database named chord that contains all the SQL functionality described in the CHORD documentation. In order to use CHORD, please contact license@gnova.com to obtain your license key. All the functions and tables are installed into a SCHEMA named gnova. They can be accessed as, for example gnova.cansmiles(). Or, you can set your search_path to include the SCHEMA gnova and access them by their unqualified names, for example cansmiles(). You can experiment with this database using your favorite SQL tools, perhaps phpPgAdmin, PgAdmin, psql, or php or other languages. For example:

There is an optional NCI database of structures that you may wish to install. Once the basic gNova CHORD installation is completed, download nci. This table is used in many of the examples in the gNova CHORD documentation. This file is about 3.5Mb and takes about 30 minutes to install since the installation procedure computes the fingerprints and fragment keys.

gunzip < nci_no_keys.sql.gz   | psql --username postgres gnova

3. Installation of gNova CHORD into your database(s)

Once you are familiar with CHORD, you can add the CHORD functions and tables to your database(s). Please review the SQL commands in the file install-grants.sql to ensure that you agree with the functions carried out there. The following commands will install gNova CHORD into "your_database". You should backup and edit install-grants.sql if you wish to limit who can use CHORD. By default, public is granted read and execute access to all CHORD functions and tables. In the directory where you unzipped chord-*.tgz., use the following commands. If you have previously run makelib, for example from step 2 above, you do not need to rerun makelib nor copy gnova.so to the postgresql library. However, if you are upgrading to a newer version of gNova CHORD you must rerun makelib and copy gnova.so to the appropriate postgresql library. Before upgrading to a newer version of CHORD, please uninstall the earlier version, as described in section 4 below.

You will then have all the CHORD functionality in your PostgreSQL database. All the functions and tables are installed into a SCHEMA named gnova. They can be accessed as, for example gnova.cansmiles(). Or, you can set your search_path to include the SCHEMA gnova and access them by their unqualified names, for example cansmiles().

As the final step of installation, in order to use CHORD, please contact license@gnova.com to obtain your license key.

4. Uninstalling gNova CHORD

To uninstall the test database chord after installing it according to section 2 above, simply use the command:

dropdb --username postgres chord

To uninstall gNova CHORD from "your_database" after installing it according to section 3 above, use the following SQL commands:

psql --username postgres "your_database"
Drop Schema gnova Cascade;
\quit

To completely remove gNova CHORD from your system, after the above above steps:

Appendix

The following sections may help you with PostgreSQL and OEChem. It is beyond the scope of this document to give full instructions on installing and configuring these. Consulting services are available from gNova to assist you in installing and configuring PostgreSQL or OEChem.

Installing PostgreSQL

PostgreSQL can be downloaded and easily compiled and installed. There are also rpm package files for many versions of RedHat Linux and Fedora. Some earlier versions of RedHat Linux used PostgreSQL, but called it RedHat database, or rhdb. These are not compatible with CHORD. We recommend you upgrade to newer versions of PostgreSQL, at least version 8.1. CHORD is not compatible with earlier versions of PostgreSQL. Once you have successfully installed PostgreSQL (and OEChem) you can install CHORD, as described above.

Testing OEChem

We have tested CHORD with version 1.4 and 1.5 of OEChem. Earlier versions may not be compatible with CHORD. OEChem can be downloaded from OpenEye. You will have to obtain a license to run OEChem. If you need to verify that OEChem is properly installed, try the following:

echo "CCC" | /usr/local/openeye/bin/smi2mdl -

You should get this:


-OEChem-08090513102D

3 2 0 0 0 0 0 0 0999 V2000
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
2 3 1 0 0 0 0
M END
$$$$

You may have to substitute another directory where smi2mdl is located, if have not installed OEChem in /usr/local/openeye. If you get a warning about a missing license, you may have to set the appropriate environment variables as follows, according to the location where you OEChem is installed:

export OE_DIR=/usr/local/openeye/toolkits
export OE_LICENSE=/usr/local/openeye/etc/oe_license.txt