Macs in Chemistry

Insanely great science


ChemRPS a Chemical Registration and Publishing System

Whilst there are many commercial packages for creating structure searchable chemical databases there is little in the way of Open Source packages, in particular a solution that provides a web front end. There is the RDKit PostgreSQL cartridge however installing PostgreSQL and building the database is probably a step to far for those unfamiliar with the use of the command line.

I recently came across ChemRPS whilst this uses the same RDKit PostgreSQL cartridge a search engine (API) and a preconfigured webserver with register/search web pages including structure editor Ketcher from EPAM, the installation comes as a Docker image which should make things much easier. They also provide a demo system for you to try out by simply uploading an SDFile here. Only up to 100 SDFile records will be registered but this is ample to try out the system.

To run the system locally you first need to install Docker, detailed installation instructions for the Mac are here

Requires macOS version 10.13 or newer, and Mac hardware must be a 2010 or a newer model, with Intel’s hardware support for memory management unit (MMU) virtualization, including Extended Page Tables (EPT) and Unrestricted Mode.

Once installed simply double click on the to get it started. You should then see the Docker icon in your tool bar, meaning it is accessible from the Terminal


You check all is working by typing the command below in the Terminal, and you should get the following response.

sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete 
Digest: sha256:fc6a51919cfeb2e6763f62b6d9e8815acbf7cd2e476ea353743570610737b752
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64)
3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.

Click the Docker menu item to see Preferences and other options.

Building ChemRPS

To download the Docker image you first need to install git a software version control system. If you use the Xcode command line tools you probably already have it installed. To check type:-

git --version
git version 2.21.0

If you don’t have it installed already, it will prompt you to install it. It is also part of the GitHub for desktop install.

When git installed correctly Clone the chemrps repository

git clone chemrps

Then, change into the newly created directory

cd chemrps/

Then run the following command (it is important that you do this from inside the chemrps directory – the “-s” after “sudo” ensures that the current directory is used by “sudo”)

sudo -s ./build

This will create all necessary ChemRPS Docker images to your system and may take a while for the initial setup, the result should look like this


You can then start the ChemRPS Docker image with the Terminal command

sudo -s ./run
Creating network "chemrps_default" with the default driver
Creating chemrps_php_1      ... done
Creating chemrps_database_1 ... done
Creating chemrps_api_1      ... done
Creating chemrps_web_1      ... done

To check that the system is all up and running type

docker container list

You should see


If all is working you now be able to view the database using your web browser, it should be running at this URL http://localhost:8080/index.html, it should look like the image below.


This is currently an empty database and you need to populate it with structures from an SDFile. To do this you use the prebuilt registration page http://localhost:8080/registersdfile.html.

It should look like this


Click on the "Browse" button and navigate to the SDFile you want to use, you will be asked to select a unique ID for each compound, this is used as part of the registration process to avoid duplicates. ID must be present in all SDFile records. The value for a given ID inside the uploaded SDFile must be unique. In addition the value must not be present in the ChemRPS database.


You will then be presented with the registration results as shown below,


You can now return to the search page http://localhost:8080/index.html to run a structure based search. The type of search that is run is defined using the radio button options below the sketcher window. The system uses the open source chemical structure editor Ketcher.

Ketcher is written in pure Javascript, it incorporates high performance, good portability and light weight. You will not need any Java or Flash plugins to use it in your browser. Ketcher is completely free and open-source, while also available on a commercial basis.


To bring the whole ChemRPS stack down, use the down script: Execute the following command from within the chemrps root folder:

sudo -s ./down

Bulk upload of structure

If you have the system running you first need to close it down using

sudo -s ./down

Navigate to the bulksdfileloadconsole folder

cd  bulksdfileloadconsole

Copy the SDFile you want to register to the /sdfile folder

Then edit the config file and specify the SDFile name and the external SDFile fieldname that should be used as COMPOUND_ID during registration

sudo -s ./build

Every time you register a new SDFile, i.e. place a SDFile inside the ./sdfile folder and edit the config file to specify the SDFile name and the COMPOUND_ID fieldname, you need to rebuild the bulksdfileconsole image by running the build script. If you just copy/edit and use the run command the changes you did are ignored.

If you would like to find out more email

Open Source Antibiotics Demo

OpenSourceAntibiotics is a consortium of researchers interested in open ways to discover and develop new, medicines for bacterial infections. All the work is done in the public domain and one of the key requirements was the need to share chemical structures, whilst a freely accessible spreadsheet allows people to download the structures in SMILES format it is not particularly user friendly and there is no way to undertake structure based searching. The Mur Ligase programme now has several hundred compounds to search so a freely accessible search facility was a key requirement.


As a test project we have worked with Hans-Juergen Himmler to provide a demonstration.

The search page can be found here, feel free to run a few searches and provide feedback on what you think might be the most important things to implement next.