Created
September 9, 2016 22:37
-
-
Save ptosco/abbab6e39f9d3bd03676f06ecd331bd9 to your computer and use it in GitHub Desktop.
BondStereo example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"import sys\n", | |
"import os\n", | |
"from rdkit import Chem\n", | |
"from rdkit.Chem import AllChem\n", | |
"from rdkit.Chem.Draw import IPythonConsole" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"m = Chem.MolFromSmiles('[C@H](Cl)(Br)(F)')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcIAAACWCAYAAABNcIgQAAAJ/UlEQVR4nO3df0zV9R7H8ddBIyGg\n2pUKK6hNfphkBjjlGP3Y1ZzkwctWtnZdPxgr51AgOwrr7sJt2uQeA/yRrdakjW65aunkXrwa3Zo/\nWA1Tp1w4hjUaJakxs0jAY3zvH5WlrtsvPV/i/XxsbJyzw9nLP9zT7+dwjh7HcRwBAGBUhNsDAABw\nEyEEAJhGCAEAphFCAIBphBAAYBohBACYRggBAKYRQgCAaYQQAGAaIQQAmEYIAQCmEUIAgGmEEABg\nGiEEAJhGCAEAphFCAIBphBAAYBohBACYRggBAKYRQgCAaYQQAGAaIQQAmEYIAQCmEUIAgGmEEABg\nGiEEAJhGCAEAphFCAIBphBAAYBohBACYRggBAKYRQgCAaYQQAGAaIQQAmEYIAQCmEUIAgGmEEABg\nGiEEAJhGCAEAphFCAIBphBAAYNpItwcAYXP8EXkOPvf97ZhadaQWa6wkDazU1NY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EIIADCNEAIATCOEAADTCCEAwDRCCAAwjRACAEwjhAAA0wghAMA0QggAMI0QAgBM\nI4QAANMIIQDANEIIADCNEAIATBvp9gDAsmkZ17k9ATCPEAIuijp1zO0JgHkcjQIATCOEAADTCCEA\nwDRCCAAwjRACAEwjhAAA0wghAMA0QggAMI0QAgBMI4QAANMIIQDANEIIADCNEAIATCOEAADT+G+Y\nABdN/OMctycA5nkcx3HcHgEAgFu4IgTCoft5rXv4r+o66+7MykOalenKIgDfIoRA2MzVnxv+rrHf\n3ex+XuseztO7z23S5AQ3dwG28csygFsSpmn8uG+/735e6xYv1j8Xj9HffIt10NVhgC1cEQJu6W7S\nf5WnPyVI6pbU/qJUeUgVHJUCYUUIgbB5Uf/wvXjmXeOe+MGNuUojgkDYEUIgbM56jVCdenexV83v\nFWrWGBdnAcbxGiHgmuv0hyS3NwAghIBr/qPgv7MUz9Ug4CqORoGwOfc1wszKQ9+8daLbnUUA+GQZ\nAIBxHI0CAEwjhAAA0wghAMA0QggAMI0QAgBMI4QAANMIIQDANEIIADCNEAIATCOEAADTCCEAwDRC\nCAAwjRACAEwjhAAA0wghAMA0QggAMI0QAgBMI4QAANMIIQDANEIIADCNEAIATCOEAADTCCEAwDRC\nCAAwjRACAEwjhAAA0wghAMA0QggAMI0QAgBMI4QAANMIIQDANEIIADCNEAIATCOEAADTCCEAwDRC\nCAAwjRACAEwjhAAA0wghAMA0QggAMI0QAgBM+x/UvKKtTJnjaAAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<rdkit.Chem.rdchem.Mol at 0x1c3945de8f0>" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"m" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"0" | |
] | |
}, | |
"execution_count": 4, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"AllChem.Compute2DCoords(m)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"mb = Chem.MolToMolBlock(m, includeStereo = True)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"\n", | |
" RDKit 2D\n", | |
"\n", | |
" 4 3 0 0 0 0 0 0 0 0999 V2000\n", | |
" -0.0000 -0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n", | |
" -1.2990 0.7500 0.0000 Cl 0 0 0 0 0 0 0 0 0 0 0 0\n", | |
" -0.0000 -1.5000 0.0000 Br 0 0 0 0 0 0 0 0 0 0 0 0\n", | |
" 1.2990 0.7500 0.0000 F 0 0 0 0 0 0 0 0 0 0 0 0\n", | |
" 1 2 1 0\n", | |
" 1 3 1 0\n", | |
" 1 4 1 6\n", | |
"M END\n", | |
"\n" | |
] | |
} | |
], | |
"source": [ | |
"print(mb)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcIAAACWCAYAAABNcIgQAAAKA0lEQVR4nO3df0zV9R7H8ddBI1Gg\n2hULK6hNfiWZAU45Rj92NYd58LIVW7uuH4yVNZSjdlTW3YXbtCEQIDPbbQ3b6PZ76eRevJreGimr\nYeqUC8ewRsMkNWYWiYDxvX9UVrpuP9TzJd/Px8bGOTucvfzDPf1+jufgcRzHEQAARoW5PQAAADcR\nQgCAaYQQAGAaIQQAmEYIAQCmEUIAgGmEEABgGiEEAJhGCAEAphFCAIBphBAAYBohBACYRggBAKYR\nQgCAaYQQAGAaIQQAmEYIAQCmEUIA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Fo1HgAvN4PLrnnnvU3t6ue++9V3fffbdmzpyp\ntra2048ZGBhQcXGxBgcHtWDBAt15550aGhrSVVddRQSBC4wQAiEyZswYlZaWqrW1VZGRkbr55psV\nCATU29ur8PBwxcbGqq+vT+Hh4VqwYIHCwvjrCYQCR6OAS7Zu3apFixbpscce0/333+/2HMAs/skJ\nuGTGjBnKzMzUjh073J4CmEYIAQCmEUIAgGmEEABgGiEEAJhGCAEAphFCAIBphBAAYBohBACYRggB\nAKYRQgCAaYQQAGAaIQQAmEYIAQCmEUIAgGkj3R4AWDYj7Tq3JwDmEULARRGnjrk9ATCPo1EAgGmE\nEABgGiEEAJhGCAEAphFCAIBphBAAYBohBACYRggBAKYRQgCAaYQQAGAaIQQAmEYIAQCmEUIAgGmE\nEABgGr+GCXDR5D/muT0BMM/jOI7j9ggAANzCFSEQCt3Pqe6hv6rrjLvTSw9pTroriwB8ixACITNP\nf24o14TvbnY/p7qHcvTesxs1NdbNXYBt/GcZwC2xMzQx5dvvu59T3dKl+ufS8fqbb6kOuDoMsIUr\nQsAt3Vv1X+XoT7GSuiW1vyCVHlIJR6VASBFCIGRe0D98L/z4rpQnfnBjnpKJIBByhBAImTNeI1Sn\n3lvqVfP7BZoz3sVZgHG8Rgi45jr9Id7tDQAIIeCa/yj47wzFcDUIuIqjUSBkzn6NML300Ddvneh2\nZxEAPlkGAGAcR6MAANMIIQDANEIIADCNEAIATCOEAADTCCEAwDRCCAAwjRACAEwjhAAA0wghAMA0\nQggAMI0QAgBMI4QAANMIIQDANEIIADCNEAIATCOEAADTCCEAwDRCCAAwjRACAEwjhAAA0wghAMA0\nQggAMI0QAgBMI4QAANMIIQDANEIIADCNEAIATCOEAADTCCEAwDRCCAAwjRACAEwjhAAA0wghAMA0\nQggAMI0QAgBMI4QAANMIIQDANEIIADCNEAIATCOEAADT/geX+qKnw2bg8gAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<rdkit.Chem.rdchem.Mol at 0x1c394848670>" | |
] | |
}, | |
"execution_count": 7, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Chem.MolFromMolBlock(mb)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"mbWithParity = mb.replace('C 0 0 0', 'C 0 0 1')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcIAAACWCAYAAABNcIgQAAAKA0lEQVR4nO3df0zV9R7H8ddBI1Gg\n2hULK6hNfiWZAU45Rj92NYd58LIVW7uuH4yVNZSjdlTW3YXbtCEQIDPbbQ3b6PZ76eRevJreGimr\nYeqUC8ewRsMkNWYWiYDxvX9UVrpuP9TzJd/Px8bGOTucvfzDPf1+jufgcRzHEQAARoW5PQAAADcR\nQgCAaYQQAGAaIQQAmEYIAQCmEUIAgGmEEABgGiEEAJhGCAEAphFCAIBphBAAYBohBACYRggBAKYR\nQgCAaYQQAGAaIQQAmEYIAQCmEUIAgGmEEABgGiEEAJhGCAEAphFCAIBphBAAYBohBACYRggBAKYR\nQgCAaYQQAGAaIQQAmEYIAQCmEUIAgGmEEABgGiEEAJhGCAEAphFCAIBphBAAYBohBACYRggBAKYR\nQgCAaYQQAGAaIQQAmEYIAQCmjXR7ABAyxx+W58Cz39+OrFFHUpEmSFL/ak1vbdNf0v+ubLf2hVL/\nEeW3dmnvGXdPujZVdeMudWUS4BZCCBMOHJmuhK5UNaY7p0O36WOPEvbr+xiaM1a16fHyuj0DcBlH\nozBgkyq6pJrUH1/tZcd3qEZ+VRx3bVhItLS06MSJE27PAIYtrghx8Tu+Qc9G5qnjrBO/CSpKcr75\ntj/Uo0JjYGBAVVVVSkpKUmlpqdtzgGGJEMKGUYnmjj+3bdumJ598UuvWrVNaWpry8/MVFxf3g0d8\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/jOI7j9ggAANzCFSEQCt3Pqe6hv6rrjLvTSw9pTroriwB8ixACITNP\nf24o14TvbnY/p7qHcvTesxs1NdbNXYBt/GcZwC2xMzQx5dvvu59T3dKl+ufS8fqbb6kOuDoMsIUr\nQsAt3Vv1X+XoT7GSuiW1vyCVHlIJR6VASBFCIGRe0D98L/z4rpQnfnBjnpKJIBByhBAImTNeI1Sn\n3lvqVfP7BZoz3sVZgHG8Rgi45jr9Id7tDQAIIeCa/yj47wzFcDUIuIqjUSBkzn6NML300Ddvneh2\nZxEAPlkGAGAcR6MAANMIIQDANEIIADCNEAIATCOEAADTCCEAwDRCCAAwjRACAEwjhAAA0wghAMA0\nQggAMI0QAgBMI4QAANMIIQDANEIIADCNEAIATCOEAADTCCEAwDRCCAAwjRACAEwjhAAA0wghAMA0\nQggAMI0QAgBMI4QAANMIIQDANEIIADCNEAIATCOEAADTCCEAwDRCCAAwjRACAEwjhAAA0wghAMA0\nQggAMI0QAgBMI4QAANMIIQDANEIIADCNEAIATCOEAADT/geX+qKnw2bg8gAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<rdkit.Chem.rdchem.Mol at 0x1c3948488a0>" | |
] | |
}, | |
"execution_count": 9, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Chem.MolFromMolBlock(mbWithParity)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"mbWithParityWithoutBondStereo = mbWithParity.replace('1 4 1 6', '1 4 1 0')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcIAAACWCAYAAABNcIgQAAAHyElEQVR4nO3df6jV9R3H8dfJLC23\nWctCzW6Qv27qWDMY5B9Ru02u/WANdcikxmpGEbtGZTBGu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2XDS9kYmAdwkhDJr5+eHDv8z4/zzdfnfuXXBJnlz1+3x7dJNzQW0+\nLANNGd2VKZ3vPt5+d+5dtCh/WDQmv7h4UfoaHQxqcUUITdm+Ji/kknxvdJLtSTbelyzZlsWWSmFQ\nCSEMmvty/8X3ffhQ5y0feDI/k0UQBp0QwqD5yB5hXs6Ti87JuqeuzEVjGhwLirNHCI05PV/vaHoG\nQAihMX9J75/OzihXg9AoS6MwaD6+Rzh9ybZ3vjqxvZmJAHeWAaA4S6MAlCaEAJQmhACUJoQAlCaE\nAJQmhACUJoQAlCaEAJQmhACUJoQAlCaEAJQmhACUJoQAlCaEAJQmhACUJoQAlCaEAJQmhACUJoQA\nlCaEAJQmhACUJoQAlCaEAJQmhACUJoQAlCaEAJQmhACUJoQAlCaEAJQmhACUJoQAlCaEAJQmhACU\nJoQAlCaEAJQmhACUJoQAlCaEAJQmhACUJoQAlCaEAJT2b9Mes4/Q4EorAAAAAElFTkSuQmCC\n", | |
"text/plain": [ | |
"<rdkit.Chem.rdchem.Mol at 0x1c394848e90>" | |
] | |
}, | |
"execution_count": 11, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"Chem.MolFromMolBlock(mbWithParityWithoutBondStereo)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"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.5.1" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment