Skip to content

Instantly share code, notes, and snippets.

@ptosco
Created January 8, 2020 11:47
Show Gist options
  • Save ptosco/3fb93b7c09dac15b6d355eb0ad29f532 to your computer and use it in GitHub Desktop.
Save ptosco/3fb93b7c09dac15b6d355eb0ad29f532 to your computer and use it in GitHub Desktop.
Different ways to fragment a molecule on some bonds
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from rdkit import Chem\n",
"from rdkit.Chem.Draw import IPythonConsole, MolsToGridImage"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"I have put explicit bonds in the SMILES definition to facilitate comprehension:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"mol = Chem.MolFromSmiles(\"O-C-C-C-C-N\")\n",
"mol1 = Chem.Mol(mol)\n",
"mol2 = Chem.Mol(mol)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcIAAACWCAYAAABNcIgQAAAM+klEQVR4nO3de3CVdX7H8Q+BXEhIArhc0hgCSZwIJKw0yJDqOGyaDrLVsozkD7eAuw4mVnbCjLU9YXRJ2pmWk6psWIvjQdIVaHGaUAoMFzUa7cRMFwENUBgtGTBBkEDCLVdy+/aPgChlBcLJOcTf+zXzzDDwnN/zPfzB+5zn/E4YYmYmAAAcFRLsAQAACCZCCABwGiEEADiNEAIAnEYIAQBOI4QAAKcRQgCA0wghAMBphBAA4DRCCABwGiEEADiNEAIAnEYIAQBOI4QAAKcRQgCA0wghAMBphBAA4DRCCABwGiEEADiNEAIAnEYIAQBOI4QAAKcRQgCA0wghAMBphBAA4DRCCABwGiEEADiNEAIAnEYIAQBOI4QAAKcRQgCA0wghAMBphBAA4DRCCABwGiEEADiNEAIAnEYIAQBOI4QAAKcRQgCA0wghAMBphBAA4DRCCABwGiEEADiNEAIAnEYIAQBOI4QAAKcRQ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Z/8qTZ1qPXTiGEuIkhZvz8Ity9WlpatGbNGhUXFysuLk4ej0cLFy5USMh3fzpgeXm5li5dqpSUFK1bt05TpkwJ0sSB19TUpLCwMEVHRwd7FGBQIoQYFJqbm/X6669r5cqVSkhI0IoVK7RgwQKdPn1aS5cu1bvvvqsVK1bohRde0NChQ2++IABcQQgxqDQ2Nurll1/WmjVrlJSUpLq6OmVmZsrn8ykxMTHY4wEYhAghBqWGhgbt3r1bUVFRysnJCfY4AAYxQggAcBr/HyEAwGmEEADgNEIIAHAaIQQAOI0QAgCcRggBAE4jhAAApxFCAIDTCCEAwGmEEADgNEIIAHAaIQQAOI0QAgCcRggBAE4jhAAApxFCAIDTCCEAwGmEEADgNEIIAHAaIQQAOI0QAgCcRggBAE4jhAAApxFCAIDTCCEAwGmEEADgNEIIAHAaIQQAOI0QAgCcRggBAE4jhAAApxFCAIDTCCEAwGmEEADgNEIIAHAaIQQAOI0QAgCcRggBAE4jhAAApxFCAIDTCCEAwGmEEADgNEIIAHAaIQQAOI0QAgCcRggBAE4jhAAApxFCAIDTCCEAwGmEEADgNEIIAHAaIQQAOI0QAgCcRggBAE4jhAAApxFCAIDTCCEAwGmEEADgNEIIAHAaIQQAOI0QAgCc9n8RG3wFimKkXwAAAABJRU5ErkJggg==\n",
"text/plain": [
"<rdkit.Chem.rdchem.Mol at 0x14c205f0bdf8>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mol1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`Chem.FragmentOnBonds()` will fragment all specified bond indices <i>at once</i>, and return a single molecule with all specified cuts applied. By default, `addDummies=True`, so empty valences are filled with dummy atoms:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"mol1_f = Chem.FragmentOnBonds(mol1, (0, 2, 4))"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSU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chem.rdchem.Mol at 0x14c24f02ce40>"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mol1_f"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This molecule can be split into individual fragments using `Chem.GetMolFrags()`:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAlgAAAGQCAYAAAByNR6YAAAVzklEQVR4nO3de7zVdb3n8fcG5CYImuhx5GYoKkLIbYuacfJWWpoX5DGPxDOWDHh5kD06j471aJrp1JkeNo+ZkmrEnNFTTOgMeDyWzTmT5eStBHQ7mpMoopIpiCBeCJG9Ye/5Qy11AEE/7L3ZPJ9/ydpr7fXZsL57vdbvu9bPhra2trYAAFCmW0cPAADQ1QgsAIBiAgsAoJjAAgAoJrAAAIoJLACAYgILAKCYwAIAKCawAACKCSwAgGICCwCgmMACACgmsAAAigksAIBiAgsAoJjAAgAoJrAAAIoJLACAYgILAKCYwAIAKCawAACKCSwAgGICCwCgmMACACgmsAAAigksAIBiAgsAoJjAAgAoJrAAAIoJLACAYgILAKCYwAIAKCawAACKCSwAgGICCwCgmMACACgmsAAAigksAIBiAgsAoJjAAgAoJrAAAIoJLACAYgILAKCYwAIAKCawAACKCSwAgGICCwCgmMACACgmsAAAigksAIBiAgsAoJjAAgAoJrAAAIoJLACAYgILAKCYwAIAKCawAACKCSwAgGICCwCgmMACACgmsAAAigksAIBiAgsAoJjAAgAoJrAAAIoJLACAYgILAKCYwAIAKCawAACKCSwAgGICCwCgmMACACgmsAAAigksAIBiAgsAoJjAAgAoJrAAAIoJLACAYgILAKCYwAIAKCawAACKCSwAgGICCwCgmMACACgmsAAAigksAIBiAgtoN21tbR09AnRa1kfXIrCAXe6BBx7IrFmzcsIJJ2Tq1Kl56aWXOnok6DSsj65JYAG7RHNzc2644YYce+yxOeaYY7Ju3bpceumleeKJJ9LY2JgHH3ywo0eEDmN9dH0CCyi1ev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Q2NmbYsGEFE9MZdL63eewa1kfHEVhAlzBv3rxccsklOffcc3PNNde8p4/Sr169Oj/84Q/z/e9/P1/+8pdzxBFHZOLEidlnH2fo7aq66hb6O1kf7U9gAV3G0qVLc95556W1tTULFy7MUUcdtUO3a2pqyrXXXpt58+Zl1KhRmTVrVqZPn95pzncEFayP9tX5TnoD8B4deeSRWbRoUcaNG5fJkyfnhhtu2OZ1m5ubs3Dhwhx//PE57rjj8uKLL+bWW29NU1NTZs6c6cmDLsf6aF+OYAFd0ra2RFatWpUf/OAHufrqq9OtW7dceOGFueyyyzJkyJAOnhjaj/Wx6wksoMt65JFHct555yVJrrjiitx666255ZZbMnHixMyePTtTp05Nz549O3hK6BjWx64lsIAubf369Zk1a1ZWrFiRwYMH5/Of/3yOO+64jh4LOgXrY9cRWMAeoa1t9z17Pexq1kc9gQUAUMynCAEAigksAIBiAgsAoJjAAgAoJrAAAIoJLACAYgILAKCYwAIAKCawAACKCSwAgGICCwCgmMACACgmsAAAigksAIBiAgsAoJjAAgAoJrAAAIoJLACAYgILAKCYwAIAKCawAACKCSwAgGICCwCgmMACACgmsAAAigksAIBiAgsAoJjAAgAoJrAAAIoJLACAYgILAKCYwAIAKCawAACKCSwAgGICCwCgmMACACgmsAAAigksAIBiAgsAoJjAAgAoJrAAAIoJLACAYgILAKCYwAIAKCawAACKCSwAgGICCwCgmMACACgmsAAAigksAIBiAgsAoJjAAgAoJrAAAIoJLACAYgILAKCYwAIAKCawAACKCSwAgGICCwCgmMACACgmsAAAigksAIBiAgsAoJjAAgAoJrAAAIoJLACAYgILAKCYwAIAKCawAACKCSwAgGICCwCgmMACACgmsAAAigksAIBiAgsAoJjAAgAoJrAAAIoJLACAYgILAKCYwAIAKCawAACKCSwAgGICCwCgmMACACgmsAAAigksAIBiPTp6AOjkGjp6AAB2P45gAQAUE1gAAMUEFgBAMYEFAFBMYAEAFBNYAADFBBYAQDGBBQBQTGABABQTWAAAxQQWAEAxgQUAUExgAQAUE1gAAMUEF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\n",
"text/plain": [
"<PIL.Image.Image image mode=RGBA size=600x400 at 0x14C206763B38>"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"MolsToGridImage(Chem.GetMolFrags(mol1_f, asMols=True))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`Chem.FragmentOnSomeBonds()` will fragment according to all permutations of `numToBreak` bonds at a time (`numToBreak` defaults to 1), and return tuple of molecules with `numToBreak` cuts applied. By default, `addDummies=True`, so empty valences are filled with dummy atoms:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"mol2_f_tuple = Chem.FragmentOnSomeBonds(mol2, (0, 2, 4))"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(<rdkit.Chem.rdchem.Mol at 0x14c24f0cd190>,\n",
" <rdkit.Chem.rdchem.Mol at 0x14c24f0cd240>,\n",
" <rdkit.Chem.rdchem.Mol at 0x14c24f0cd030>)"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mol2_f_tuple"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcIAAACWCAYAAABNcIgQAAAPRElEQVR4nO3df1DV9Z7H8Rc/lBDlgoWhdP2Z5uWHqUBaKhR6M1hIdzdoLPFWa9puju2400bjlD+mkq5Z/pjKY7WT3rmbEZbpXX/B3dIOA1lqoICCYuKvm/gjJVERzmf/8FrakoLBOcDn+Zg5f3i+3/P9vJlhfJ7D98sXL2OMEQAAlvL29AAAAHgSIQQAWI0QAgCsRggBAFYjhAAAqxFCAIDVCCEAwGqEEABgNUIIALAaIQQAWI0QAgCsRggBAFYjhAAAqxFCAIDVCCEAwGqEEABgNUIIALAaIQQAWI0QAgCsRggBAFYjhAAAqxFCAIDVCCEAwGqEEABgNUIIALAaIQQAWI0QAgCsRggBAF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0tObOnauEhAQPTgxcX/t+CwugWd10002aPXu2tm7dqtLSUkVERGjVqlU6fvy4MjIy1Lt3b23evFlZWVlyOp1EEG0CnwgB3JC6ujrNnz9fc+fOVUBAgPr06aM5c+YoKSnJ06MBTUIIAfwqBw8eVE1NjQYMGNBuLhKCXQghAMBqnCMEAFiNEAIArEYIAQBWI4QAAKsRQgCA1QghAMBqhBAAYDVCCACwGiEEAFiNEAIArEYIAQBWI4QAAKsRQgCA1QghAMBqhBAAYDVCCACwGiEEAFiNEAIArEYIAQBWI4QAAKsRQgCA1QghAMBqhBAAYDVCCACwGiEEAFiNEAIArEYIAQBWI4QAAKsRQgCA1QghAMBqhBAAYDVCCACwGiEEAFiNEAIArEYIAQBWI4QAAKsRQgCA1QghAMBqhBAAYDVCCACwGiEEAFiNEAIArEYIAQBWI4QAAKsRQgCA1QghAMBqhBAAYDVCCACw2v8BfrfBJHFYDMUAAAAASUVORK5CYII=\n",
"text/plain": [
"<rdkit.Chem.rdchem.Mol at 0x14c24f0cd190>"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mol2_f_tuple[0]"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcIAAACWCAYAAABNcIgQAAARAElEQVR4nO3de1SU9b7H8TcXBRQUTe20vJCmIOAtQYRl5jmkZRdNRTjtvLRV0A0VVHuXtjqWtdfZy3N2uTaYgZinFYnUUJ6y1WUfL7XVdAZRAvECKWreSkVUNCVk5vzhJXWrgQEz4+/z+q/hmef5mq55z/ObZ3g8HA6HAxEREUN5OnsAERERZ1IIRUTEaAqhiIgYTSEUERGjKYQiImI0hVBERIymEIqIiNEUQhERMZpCKCIiRlMIRUTEaAqhiIgYTSEUERGjKYQiImI0hVBERIymEIqIiNEUQhERMZpCKCIiRlMIRUTEaAqhiIgYTSEUERGjKYQiImI0hVBERIymEIqIiNEUQhERMZpCKCIiRlMI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
"<rdkit.Chem.rdchem.Mol at 0x14c24f0cd240>"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mol2_f_tuple[1]"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcIAAACWCAYAAABNcIgQAAAP30lEQVR4nO3df1DVdb7H8ReCKIkKqaXSbpYp/kwRc7akBPFXkl0roalubu42sFkX77TTpdnWzbQf2LQmm9WltC3vNVc0zbVMF3JN8QdXMVLwRyoampagKGgKwnnfPyoT11IMzgE/z8cMM3rO98cbZzhPvt/zPV/9zMwEAICjmvh6AAAAfIkQAgCcRggBAE4jhAAApxFCAIDTCCEAwGmEEADgNEIIAHAaIQQAOI0QAgCcRggBAE4jhAAApxFCAIDTCCEAwGmEEADgNEIIAHAaIQQAOI0QAgCcRggBAE4jhAAApxFCAIDTCCEAwGmEEADgNEIIAHAaIQQAOI0QAgCcRggBAE4jhAAApxFCAIDTCCEAwGmEEADgNEIIAHAaIQQAOI0QAgCcRggBAE4jhAAApxFCAIDTCCEAwGmEEADgNEIIAHAaIQQAOI0QAgCcRggBAE4jhAAApxFCAIDTCCEAwGmEEADgNEIIAHAaIUSjZGbasWOH9u3b5+tRADRyhBCNztKlSzVgwAANHDhQXbt21QsvvKCqqipfjwWgkSKEaDSys7MVHR2tu+++W/369VN+fr4WLFig119/XZGRkdqwYYOvRwTQCBFCNHhr165VbGysYmNjFR4ersLCQqWnp6t9+/aKi4vTli1bFB0draioKE2YMEEnTpzw9cjwmirp45ek2B5SqyAp+Cop6gFpye4fFvF8KcW2kCZuqrnq6TXS9S2kOeXeHRkNDiFEg7V+/XqNGjVK0dHRCgsL07Zt25Senq6OHTvWWK5169ZKS0vTxx9/rOXLl6tPnz5asWKFj6b2Ho/Ho/nz56t///6Kjo7WmjVrfD2Sl3mk934jjX5DGvWK9MVR6eBGadwV0oO3SrN2X3ALgEQI0QBt2bJFCQkJ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jRACAJxGCAEATiOEAACnEUIAgNMIIQDAaYQQAOA0QggAcBohBAA4jRACAJxGCAEATiOEAACnEUIAgNMIIQDAaYQQAOA0QggAcBohBAA4jRACAJxGCAEATiOEAACn/T+2WqqoPkiSQQAAAABJRU5ErkJggg==\n",
"text/plain": [
"<rdkit.Chem.rdchem.Mol at 0x14c24f0cd030>"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mol2_f_tuple[2]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Finally, you can manually cut bonds using `Chem.RWMol.RemoveBonds`:"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"rwmol = Chem.RWMol(mol)\n",
"for b_idx in sorted([0, 2, 4], reverse=True):\n",
" b = rwmol.GetBondWithIdx(b_idx)\n",
" rwmol.RemoveBond(b.GetBeginAtomIdx(), b.GetEndAtomIdx())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"And then call `Chem.GetMolFrags()` to get sanitized fragments where empty valences were filled with implicit hydrogens:"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAlgAAAGQCAYAAAByNR6YAAALVUlEQVR4nO3cf6jddR3H8dfdnYjp5vTO1XLlMv0jk8L6K1KkDSPMVND0j2U0GyFJv4xVNpZTSiN1FIbKREPKIsuMQshCIazwV/4R9Edm5u+BtlyJZe7enf5w4hYzp752zrnz8YAD93y/38/hfe/lwJPv93vOxGAwGAQAgJo5ox4AAGBPI7AAAMoEFgBAmcACACgTWAAAZQILAKBMYAEAlAksAIAygQUAUCawAADKBBYAQJnAAgAoE1gAAGUCCwCgTGABAJQJLACAMoEFAFAmsAAAygQWAECZwAIAKBNYAABlAgsAoExgAQCUCSwAgDKBBQBQJrAAAMoEFgBAmcACACgTWAAAZQILAKBMYAEAlAksAIAygQUAUCawAADKBBYAQJnAAgAoE1gAAGUC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ACAMoEFAFAmsAAAygQWAECZwAIAKBNYAABlAgsAoExgAQCUCSwAgDKBBQBQJrAAAMoEFgBAmcACACgTWAAAZQILAKBMYAEAlAksAIAygQUAUCawAADKBBYAQJnAAgAoE1gAAGUCCwCgTGABAJT9F8cpDEj+kIf8AAAAAElFTkSuQmCC\n",
"text/plain": [
"<PIL.Image.Image image mode=RGBA size=600x400 at 0x14C206763550>"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"MolsToGridImage(Chem.GetMolFrags(rwmol, asMols=True))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment