Skip to content

Commit

Permalink
exclude notebooks from execution during build
Browse files Browse the repository at this point in the history
  • Loading branch information
janash committed Jul 2, 2024
1 parent beae433 commit 3eb4609
Show file tree
Hide file tree
Showing 3 changed files with 652 additions and 51 deletions.
3 changes: 3 additions & 0 deletions biochemist-python/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ author: The Molecular Sciences Software Institute
# See https://jupyterbook.org/content/execute.html
execute:
execute_notebooks: force
exclude_patterns:
- "EC_class_ligands_search.ipynb"
- 'binding_site_investigation.ipynb'

# Define the name of the latex output file for PDF builds
latex:
Expand Down
232 changes: 217 additions & 15 deletions biochemist-python/chapters/EC_class_ligands_search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "7f7f7135",
"metadata": {},
"outputs": [],
Expand All @@ -116,10 +116,28 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"id": "e331ecd9",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['1AQ7', '1AUJ', '1AZ8', '1BJV', '1BTW', '1BTX', '1BTZ', '1C1S', '1C1T', '1C2D']\n"
]
},
{
"data": {
"text/plain": [
"180"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# There will be three components to the query, which will be labeled q1, q2 and q3.\n",
"\n",
Expand Down Expand Up @@ -165,10 +183,28 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"id": "b4d77b9e",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"There are 112 ligands for EC Number 3.4.21.4 in this list. Here is a list of the first 10 ligands.\n"
]
},
{
"data": {
"text/plain": [
"['0CA', '0CB', '0KV', '0ZG', '0ZW', '0ZX', '0ZY', '10U', '11U', '12U']"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"molResultL = list(query(\"mol_definition\"))\n",
"print(\"There are\",len(molResultL), \"ligands for EC Number\", ECnumber, \"in this list. Here is a list of the first 10 ligands.\")\n",
Expand Down Expand Up @@ -203,7 +239,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"id": "ffb3d082",
"metadata": {},
"outputs": [],
Expand All @@ -214,7 +250,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"id": "9cbf3513",
"metadata": {},
"outputs": [],
Expand All @@ -226,10 +262,21 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"id": "b7043e37",
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"200"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# check to see that the file downloaded properly. A status code of 200 means everything is okay.\n",
"\n",
Expand All @@ -238,7 +285,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"id": "096a56da",
"metadata": {},
"outputs": [],
Expand All @@ -254,10 +301,146 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"id": "c9d9c2e4",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"@<TRIPOS>MOLECULE\n",
"11U\n",
" 59 61 0 0 0\n",
"SMALL\n",
"NO_CHARGES\n",
"\n",
"@<TRIPOS>ATOM\n",
" 1 C1 2.4220 0.4070 0.3360 C.2 1 11U_ideal 0.0000\n",
" 2 O1 2.0060 -0.6420 0.7800 O.2 1 11U_ideal 0.0000\n",
" 3 C2 3.8690 0.5350 -0.0630 C.3 1 11U_ideal 0.0000\n",
" 4 N1 4.5590 -0.7380 0.1810 N.3 1 11U_ideal 0.0000\n",
" 5 C3 5.9760 -0.6510 -0.1970 C.3 1 11U_ideal 0.0000\n",
" 6 C4 6.7790 -0.0680 0.9670 C.3 1 11U_ideal 0.0000\n",
" 7 C5 8.2550 0.0240 0.5730 C.3 1 11U_ideal 0.0000\n",
" 8 C6 8.7810 -1.3740 0.2400 C.3 1 11U_ideal 0.0000\n",
" 9 C7 7.9780 -1.9570 -0.9250 C.3 1 11U_ideal 0.0000\n",
" 10 C8 6.5020 -2.0480 -0.5310 C.3 1 11U_ideal 0.0000\n",
" 11 N2 1.5890 1.4580 0.1990 N.am 1 11U_ideal 0.0000\n",
" 12 C9 0.1600 1.4690 0.5420 C.3 1 11U_ideal 0.0000\n",
" 13 C10 -0.5770 0.4580 -0.2980 C.2 1 11U_ideal 0.0000\n",
" 14 O2 0.0270 -0.2120 -1.1080 O.2 1 11U_ideal 0.0000\n",
" 15 C11 -0.3710 2.8880 0.2460 C.3 1 11U_ideal 0.0000\n",
" 16 C12 0.9140 3.7560 0.2780 C.3 1 11U_ideal 0.0000\n",
" 17 C13 1.9600 2.7850 -0.3250 C.3 1 11U_ideal 0.0000\n",
" 18 N3 -1.9070 0.2990 -0.1490 N.am 1 11U_ideal 0.0000\n",
" 19 C14 -2.6230 -0.6850 -0.9660 C.3 1 11U_ideal 0.0000\n",
" 20 C15 -4.0860 -0.6660 -0.6070 C.ar 1 11U_ideal 0.0000\n",
" 21 C16 -4.5620 -1.4980 0.3910 C.ar 1 11U_ideal 0.0000\n",
" 22 C17 -5.9000 -1.4810 0.7270 C.ar 1 11U_ideal 0.0000\n",
" 23 C18 -6.7750 -0.6300 0.0520 C.ar 1 11U_ideal 0.0000\n",
" 24 C19 -8.2130 -0.6110 0.4050 C.2 1 11U_ideal 0.0000\n",
" 25 N4 -9.0280 0.1840 -0.2270 N.2 1 11U_ideal 0.0000\n",
" 26 N5 -8.6890 -1.4350 1.4020 N.pl3 1 11U_ideal 0.0000\n",
" 27 C20 -6.2910 0.2030 -0.9560 C.ar 1 11U_ideal 0.0000\n",
" 28 C21 -4.9490 0.1800 -1.2800 C.ar 1 11U_ideal 0.0000\n",
" 29 H1 3.9330 0.7860 -1.1220 H 1 11U_ideal 0.0000\n",
" 30 H2 4.3400 1.3220 0.5260 H 1 11U_ideal 0.0000\n",
" 31 H3 4.4590 -1.0250 1.1430 H 1 11U_ideal 0.0000\n",
" 32 H4 6.0800 -0.0050 -1.0690 H 1 11U_ideal 0.0000\n",
" 33 H5 6.4040 0.9280 1.2050 H 1 11U_ideal 0.0000\n",
" 34 H6 6.6750 -0.7130 1.8390 H 1 11U_ideal 0.0000\n",
" 35 H7 8.8270 0.4390 1.4030 H 1 11U_ideal 0.0000\n",
" 36 H8 8.3590 0.6690 -0.2990 H 1 11U_ideal 0.0000\n",
" 37 H9 8.6770 -2.0190 1.1120 H 1 11U_ideal 0.0000\n",
" 38 H10 9.8320 -1.3090 -0.0410 H 1 11U_ideal 0.0000\n",
" 39 H11 8.3530 -2.9520 -1.1620 H 1 11U_ideal 0.0000\n",
" 40 H12 8.0820 -1.3110 -1.7970 H 1 11U_ideal 0.0000\n",
" 41 H13 6.3980 -2.6930 0.3420 H 1 11U_ideal 0.0000\n",
" 42 H14 5.9300 -2.4630 -1.3600 H 1 11U_ideal 0.0000\n",
" 43 H15 0.0300 1.2400 1.6000 H 1 11U_ideal 0.0000\n",
" 44 H16 -1.0720 3.2080 1.0170 H 1 11U_ideal 0.0000\n",
" 45 H17 -0.8360 2.9240 -0.7390 H 1 11U_ideal 0.0000\n",
" 46 H18 1.1770 4.0280 1.3010 H 1 11U_ideal 0.0000\n",
" 47 H19 0.8020 4.6440 -0.3440 H 1 11U_ideal 0.0000\n",
" 48 H20 2.9630 3.0560 0.0040 H 1 11U_ideal 0.0000\n",
" 49 H21 1.9020 2.7930 -1.4130 H 1 11U_ideal 0.0000\n",
" 50 H22 -2.3900 0.8350 0.4990 H 1 11U_ideal 0.0000\n",
" 51 H23 -2.5040 -0.4370 -2.0200 H 1 11U_ideal 0.0000\n",
" 52 H24 -2.2160 -1.6780 -0.7780 H 1 11U_ideal 0.0000\n",
" 53 H25 -3.8840 -2.1590 0.9100 H 1 11U_ideal 0.0000\n",
" 54 H26 -6.2690 -2.1270 1.5090 H 1 11U_ideal 0.0000\n",
" 55 H27 -9.9700 0.1960 0.0040 H 1 11U_ideal 0.0000\n",
" 56 H28 -8.0820 -2.0270 1.8720 H 1 11U_ideal 0.0000\n",
" 57 H29 -9.6310 -1.4220 1.6330 H 1 11U_ideal 0.0000\n",
" 58 H30 -6.9630 0.8640 -1.4820 H 1 11U_ideal 0.0000\n",
" 59 H31 -4.5730 0.8240 -2.0610 H 1 11U_ideal 0.0000\n",
"@<TRIPOS>BOND\n",
" 1 1 11 am\n",
" 2 11 17 1\n",
" 3 11 12 1\n",
" 4 1 2 2\n",
" 5 1 3 1\n",
" 6 16 17 1\n",
" 7 15 16 1\n",
" 8 12 15 1\n",
" 9 12 13 1\n",
" 10 13 18 am\n",
" 11 13 14 2\n",
" 12 18 19 1\n",
" 13 19 20 1\n",
" 14 20 28 ar\n",
" 15 20 21 ar\n",
" 16 27 28 ar\n",
" 17 23 27 ar\n",
" 18 23 24 1\n",
" 19 22 23 ar\n",
" 20 24 25 2\n",
" 21 24 26 1\n",
" 22 21 22 ar\n",
" 23 3 4 1\n",
" 24 4 5 1\n",
" 25 5 10 1\n",
" 26 5 6 1\n",
" 27 9 10 1\n",
" 28 8 9 1\n",
" 29 7 8 1\n",
" 30 6 7 1\n",
" 31 3 29 1\n",
" 32 3 30 1\n",
" 33 17 48 1\n",
" 34 17 49 1\n",
" 35 16 46 1\n",
" 36 16 47 1\n",
" 37 15 44 1\n",
" 38 15 45 1\n",
" 39 12 43 1\n",
" 40 18 50 1\n",
" 41 19 51 1\n",
" 42 19 52 1\n",
" 43 28 59 1\n",
" 44 27 58 1\n",
" 45 25 55 1\n",
" 46 26 56 1\n",
" 47 26 57 1\n",
" 48 22 54 1\n",
" 49 21 53 1\n",
" 50 4 31 1\n",
" 51 5 32 1\n",
" 52 10 41 1\n",
" 53 10 42 1\n",
" 54 9 39 1\n",
" 55 9 40 1\n",
" 56 8 37 1\n",
" 57 8 38 1\n",
" 58 7 35 1\n",
" 59 7 36 1\n",
" 60 6 33 1\n",
" 61 6 34 1\n",
"\n"
]
}
],
"source": [
"# Now we use these commands to read the file and make sure it downloaded properly. As an alternative, we\n",
"# could go to the ligands folder in our Jupyter desktop and click on res11U.mol2 to make sure it looks correct.\n",
Expand Down Expand Up @@ -290,7 +473,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 9,
"id": "b85d927b",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -330,10 +513,29 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 10,
"id": "8b9106d8",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"There are 173 structures from EC Number 1.1.1.1 that have bound ligands with molecular weights between 400 and 700).\n",
"There are 11 unique ligands for structures with EC Number 1.1.1.1 in this list. Here is a list of the 11 ligands.\n"
]
},
{
"data": {
"text/plain": [
"['022', 'APR', 'CHD', 'CND', 'COD', 'NAD', 'NAI', 'NAJ', 'PAD', 'TAD', 'WKZ']"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"### Solution\n",
"\n",
Expand Down
Loading

0 comments on commit 3eb4609

Please sign in to comment.