mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-04 21:54:27 +08:00
Updates notebooks
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Example complicated lactam analysis."
|
||||
"Example complicated lactam analysis using multiple cores. Note that the cores need to be used in order of least to most specific here as the first core matched will be used to form the RGroups."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -849,12 +849,20 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"This is not the fastest thing on the planet, you will note that it gets slower as more items get added, this is due to the internal processing every five molecules..."
|
||||
"To use RGroupDecomposition:\n",
|
||||
" \n",
|
||||
" 1. construct the class on the core rg = RGroupDecomposition(cores)\n",
|
||||
" 2. Call rg.Add( mol ) on the molecules. If this returns -1, the molecule is not\n",
|
||||
" compatible with the core\n",
|
||||
" 3. After all molecules are added, call rg.Process() to complete the rgroup\n",
|
||||
" decomposition.\n",
|
||||
" \n",
|
||||
"This is not the fastest thing on the planet, you will note that it gets slower as more items get added, this is due to the internal processing every five molecules...\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"execution_count": 5,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
@@ -866,25 +874,56 @@
|
||||
"Added cores\n",
|
||||
"Added 100 99 99\n",
|
||||
"Added 200 199 199\n",
|
||||
"Added 300 299 299\n"
|
||||
"Added 300 299 299\n",
|
||||
"Added 400 399 399\n",
|
||||
"Added 500 499 499\n",
|
||||
"Added 600 599 599\n",
|
||||
"Added 700 699 699\n",
|
||||
"Added 800 799 799\n",
|
||||
"Added 900 899 899\n",
|
||||
"Added 1000 999 999\n",
|
||||
"Added 1100 1099 1099\n",
|
||||
"Added 1200 1199 1199\n",
|
||||
"Added 1300 1299 1299\n",
|
||||
"Added 1400 1399 1399\n",
|
||||
"Added 1500 1499 1499\n",
|
||||
"Added 1600 1599 1599\n",
|
||||
"Added 1700 1699 1699\n",
|
||||
"Added 1800 1799 1799\n",
|
||||
"Added 1900 1899 1899\n",
|
||||
"Added 2000 1999 1999\n",
|
||||
"Added 2100 2099 2099\n",
|
||||
"Added 2200 2199 2199\n",
|
||||
"Added 2300 2299 2299\n",
|
||||
"Added 2400 2399 2399\n",
|
||||
"Added 2500 2499 2499\n",
|
||||
"Added 2600 2599 2599\n",
|
||||
"Added 2700 2699 2699\n",
|
||||
"Added 2800 2799 2799\n",
|
||||
"Added 2900 2899 2899\n",
|
||||
"Added 3000 2999 2999\n",
|
||||
"Added 3100 3099 3099\n",
|
||||
"Added 3200 3199 3199\n",
|
||||
"Added 3300 3299 3299\n",
|
||||
"Added 3400 3399 3399\n",
|
||||
"Added 3500 3499 3499\n",
|
||||
"Added 3600 3599 3599\n",
|
||||
"Added 3700 3699 3699\n",
|
||||
"Added 3800 3799 3799\n",
|
||||
"Added 3900 3899 3899\n",
|
||||
"Added 4000 3999 3999\n",
|
||||
"Added 4100 4099 4099\n",
|
||||
"Added 4200 4199 4199\n",
|
||||
"Added 4300 4299 4299\n",
|
||||
"Added 4339 to RGroup Easy Decomposition out of 4340\n",
|
||||
"Added 4339 to RGroup Stereo Decomposition out of 4340\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"RDKit ERROR: [11:11:41] SMILES Parse Error: syntax error for input: 'CANONICAL_SMILES'\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ename": "KeyboardInterrupt",
|
||||
"evalue": "",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
||||
"\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
|
||||
"\u001b[0;32m<ipython-input-6-3952488741ae>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0mcount\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 13\u001b[0m \u001b[0midx1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmaxEasy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmax\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmaxEasy\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mrg_easy\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAdd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mm\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 14\u001b[0;31m \u001b[0midx2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmaxStereo\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmax\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmaxStereo\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mrg_stereo\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAdd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mm\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 15\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mcount\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0;36m100\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 16\u001b[0m \u001b[0;32mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Added\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcount\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmaxEasy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmaxStereo\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
||||
"\u001b[0;31mKeyboardInterrupt\u001b[0m: "
|
||||
"RDKit ERROR: [10:56:01] SMILES Parse Error: syntax error for input: 'CANONICAL_SMILES'\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -911,7 +950,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"execution_count": 6,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
@@ -922,7 +961,7 @@
|
||||
"True"
|
||||
]
|
||||
},
|
||||
"execution_count": 7,
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -936,12 +975,15 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Rendering this many molecules is pretty taxing for the current system, this takes a while."
|
||||
"Rendering this many molecules is pretty taxing for the current system, this takes a while.\n",
|
||||
"\n",
|
||||
"It is useful to disable logging here. When making RGroup renderings there \n",
|
||||
"are a lot of sanitization warnings."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"execution_count": 7,
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
@@ -951,6 +993,17 @@
|
||||
"rdBase.DisableLog(\"rdApp.*\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The RGroupDecomposition code is quite compatiable with the python pandas integration.\n",
|
||||
"Calling rg.GetRGroupsAsColumns() can be sent directly into a pandas table.\n",
|
||||
"\n",
|
||||
"**n.b.** You need to call PandasTools.ChangeMoleculeRendering(frame) to allow the molecules\n",
|
||||
"to be rendered properly."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user