RDKit [1] is a very nice cheminformatics software. It allows us to perform a wide range of operations on chemical compounds/ ligands. We have provided a Python script to perform fingerprinting using Tanimoto similarity on multiple compounds using RDKit.
Introduction
tanimoto_similarities.py script calculates Tanimoto similarities of given molecules in the form of smiles.
Let’s say we have a list of smiles of 15 molecules in a CSV file named ‘smiles.csv’. This file may also consist of other information such as ligand name, serial number, and so on. In that case, you can extract the smiles column from the CSV file. The smiles are available under the column named “SMILES” (or edit the column name in the script as per your file).
Availability
The script is available on GitHub under the package ‘tanimoto_similarities‘.
Requirements
This script requires Python3 and uses RDKit along with some additional packages. Install them using the following commands.
$ conda create -c conda-forge -n my-rdkit-env rdkit
$ conda activate my-rdkit-env
$ pip3 install seaborn
$ sudo apt-get install python3-matplotlib
$ conda install pandas
$ pip3 install numpy
Usage
$ python3 tanimoto_similarities.py
Note: If you still get an error stating “rdkit not found”, then perhaps you have not activated the rdkit environment. Run the conda activate my-rdkit-env
command again and then run the script.
References
- Landrum, G. (2013). Rdkit documentation. Release, 1 (1-79), 4.