Bioinformatics Programming
tanimoto_similarities_one_vs_all.py – Python script to calculate Tanimoto Similarities of multiple compounds

We previously provided a Python script to calculate the Tanimoto similarities of multiple compounds against each other. In this article, we are providing another Python script to calculate the Tanimoto similarities of one compound with multiple compounds.
The script tanimoto_similarities_one_vs_all.py is a part of our tanimoto_similarities Python package. The similarities are calculated using RDKit [1]. This script takes multiple compounds as input in the form of sdf format. All the compounds in sdf format are merged together in a single file (here, lig.sdf). The query compound is provided in the form of SMILES.
Availability
The script is available on GitHub under the package ‘tanimoto_similarities‘.
Usage
keep the input sdf file in the same directory or provide a full path to the file in the script. Run the script as shown below:
$ python3 tanimoto_similarities_one_vs_all.py
It will create a new file named ‘sims_vs_all.txt’. This file will contain all calculated similarities.
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.
Further Reading
Bioinformatics Programming
How to calculate drug-likeness using RDKit?

RDKit [1] allows performing multiple functions on chemical compounds. One is the quantitative estimation of drug-likeness also known as QED properties. These properties include molecular weight (MW), octanol-water partition coefficient (ALOGP), number of hydrogen bond donors (HBD), number of hydrogen bond acceptors (HBA), polar surface area (PSA), number of rotatable bonds (ROTB), number of aromatic rings (AROM), structural alerts (ALERTS). (more…)
Bioinformatics Programming
sdftosmi.py: Convert multiple ligands/compounds in SDF format to SMILES?

You can obtain SMILES of multiple compounds or ligands in an SDF file in one go. Here, we provide a simple Python script to do that. (more…)
Bioinformatics Programming
tanimoto_similarities.py: A Python script to calculate Tanimoto similarities of multiple compounds using RDKit.

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. (more…)
You must be logged in to post a comment Login