Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

ReadMe.md

GOLD and Multiprocessing

Introduction

This repo contains a script, gold_multi.py, which is designed to illustrate how to use the CSD Docking API and the standard Python multiprocessing module to parallelize GOLD docking. Also included is a simple example system to demonstrate the operation of the script.

On a multi-core workstation, this approach should be suitable for docking some hundreds or thousands of ligands depending on the rigour of the docking protocol used; please consult the GOLD USer Guide for information about speed/accuracy tradeoffs in GOLD. Note that the script is not useful for running GOLD on an HPC compute cluster or on the Cloud: the CCDC provides the GOLD Cluster and GOLD Cloud tools for those use-cases. For further details, please contact support@ccdc.cam.ac.uk.

As ever when using multiprocessing techniques, increasing the number processes will at some point begin to degrade performance as available cores are saturated. At what point this happens will depend on the machine and the workload and thus can only really be determined by experimentation. A default of six was selected as the script was developed on an eight-core workstation and this seemed to give decent performance while leaving cores for other processes.

The script is designed to be as simple as possible in order to not obscure the mechanisms of parallelization. Thus, for example, configuration of the docking is taken entirely from the GOLD conf file. There is also the limitation that only a single input file of ligands is accepted. In addition, the implementation of error-handling and logging is rather lightweight. If a proper application was required then these matters could be addressed.

The script writes output to the directory specified in the GOLD configuration file, and the results can be inspected by loading the GOLD conf file in Hermes as normal (see the Hermes User Guide for details). A bestranking.lst file is also written, which records the best-scoring pose for each molecule. Other output normally written by GOLD is not created, although this could be implemented if necessary.

The script partitions the input ligand file into chunks and uses the Docking API and multiprocessing to dock these chunks in parallel using named subdirectories for their output. The solution files for the chunks are then copied to the main output directory and the full bestranking.lst file compiled from the partial chunk versions. The intermediate subdirectories are currently kept, but the script could easily be modified to delete them or use anonymous temporary directories if disk usage was to be an issue.


Requirements

Licensing Requirements

CSD-Discovery, CSD-Enterprise and Research Partner suites would all be sufficient.

Instructions on Running

To run the script, an environment with the CCDC Python API installed must be active. Further information is available in the API installation notes.

The script is designed to be run from the command line only (and not, for example, from within Hermes). The path to a GOLD configuration file may be provided as a command argument; if no argument is provided, it is assumed there will be a file gold.conf in the current working directory.

On Windows, the command would be (in the folder where this archive was unzipped)...

> python.exe .\gold_multi.py

On Linux or MacOS, an equivalent would be (first making the script executable)...

$ chmod u+x ./gold_multi.py

$ ./gold_multi.py

In either case, add the option --help to show more information.

usage: gold_multi.py [-h] [--n_processes N_PROCESSES] [conf_file]

positional arguments:
  conf_file             GOLD configuration file (default='gold.conf')

optional arguments:
  -h, --help            show this help message and exit
  --n_processes N_PROCESSES
                        No. of processes (default=6)

Note on the input files provided

The example target provided (see the directory target/) is SYK tyrosine kinase (5LMA).

The ligands in input.sdf were built from SMILES. If the name is a PDB code, it means the SMILES corresponded to the crystallographic ligand from that structure (with conventional ionization states assigned). If the name has a suffix, the SMILES is a manually-generated analogue. Note that not all these ligands can be correctly cross-docked into 5LMA, as there are induced-fit effects in SYK that GOLD cannot reproduce.

For feedback or to report any issues please contact support@ccdc.cam.ac.uk