{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 3D Atom Pair fingerprints in the RDKit\n", "\n", "The option to generate 3D atom pair fingerprints by using the molecule's 3D distance matrix instead of the 2D distance matrix has recently been added to the RDKit. The idea is similar to (though not as thorougly developed) as the (DiP)\n", "\n", "The goal here is to probe the behavior of these new fingerprints." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2023-01-28T14:13:24.733753Z", "start_time": "2023-01-28T14:10:55.093706Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2022.09.4\n", "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", "Populating the interactive namespace from numpy and matplotlib\n" ] } ], "source": [ "from rdkit import Chem\n", "from rdkit.Chem import DataStructs\n", "from rdkit.Chem import rdFingerprintGenerator\n", "from rdkit.Chem import AllChem\n", "from rdkit import RDConfig\n", "from rdkit.Chem.Draw import IPythonConsole\n", "IPythonConsole.ipython_3d = True\n", "import py3Dmol\n", "from rdkit.Chem import Draw\n", "import rdkit\n", "print(rdkit.__version__)\n", "%pylab inline\n", "plt.style.use('tableau-colorblind10')\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Generate fingerprints for some literature compounds\n", "\n", "These are some aligned Factor XA ligand structures from the Giangreco overlays set (https://pubs.acs.org/doi/10.1021/ci400020a)." ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2023-01-28T14:14:31.737343Z", "start_time": "2023-01-28T14:14:29.044576Z" } }, "outputs": [], "source": [ "fxa_ms = [x for x in Chem.SDMolSupplier('/scratch/cheminformatics_datasets/AZ_overlays/P00742.sdf') if x is not None]\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The molecules in these datasets are pre-overlayed. :-)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2023-01-28T14:14:31.954429Z", "start_time": "2023-01-28T14:14:31.738898Z" } }, "outputs": [ { "data": { "application/3dmoljs_load.v0": "
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n",
" jupyter labextension install jupyterlab_3dmol