Skip to content

Commit

Permalink
update notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
hainm committed Nov 23, 2024
1 parent 98415dd commit f8215fb
Show file tree
Hide file tree
Showing 8 changed files with 163 additions and 601 deletions.
161 changes: 96 additions & 65 deletions examples/notebooks/export_image.ipynb

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions examples/notebooks/mdtraj.ipynb

This file was deleted.

76 changes: 26 additions & 50 deletions examples/notebooks/multiple_ligand_view.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -13,62 +13,58 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" % Total % Received % Xferd Average Speed Time Time Time Current\n",
" Dload Upload Total Spent Left Speed\n",
"100 9810 100 9810 0 0 68409 0 --:--:-- --:--:-- --:--:-- 68601\n",
"curl: (6) Could not resolve host: 5ht3ligs.sdf\n"
]
},
{
"data": {
"text/plain": [
"[<Structure 22 atoms; 1 residues; 24 bonds; NOT parametrized>,\n",
" <Structure 24 atoms; 1 residues; 26 bonds; NOT parametrized>,\n",
" <Structure 25 atoms; 1 residues; 28 bonds; NOT parametrized>,\n",
" <Structure 26 atoms; 1 residues; 29 bonds; NOT parametrized>]"
"[<Structure 22 atoms; 1 residues; 24 bonds; NOT parameterized>,\n",
" <Structure 24 atoms; 1 residues; 26 bonds; NOT parameterized>,\n",
" <Structure 25 atoms; 1 residues; 28 bonds; NOT parameterized>,\n",
" <Structure 26 atoms; 1 residues; 29 bonds; NOT parameterized>]"
]
},
"execution_count": 34,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# !wget https://raw.githubusercontent.com/rdkit/rdkit/master/rdkit/Chem/Subshape/test_data/5ht3ligs.sdf\n",
"!curl https://raw.githubusercontent.com/rdkit/rdkit/master/rdkit/Chem/Subshape/test_data/5ht3ligs.sdf -O 5ht3ligs.sdf\n",
"parms = pmd.rdkit.from_sdf('5ht3ligs.sdf') # require parmed, rdkit\n",
"parms"
]
},
{
"cell_type": "code",
"execution_count": 38,
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6b05d49d9cea423c82989ef4161359f7",
"model_id": "74b824240097468d9ee5abd7add17658",
"version_major": 2,
"version_minor": 0
},
"text/html": [
"<p>Failed to display Jupyter Widget of type <code>VBox</code>.</p>\n",
"<p>\n",
" If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n",
" that the widgets JavaScript is still loading. If this message persists, it\n",
" likely means that the widgets JavaScript library is either not installed or\n",
" not enabled. See the <a href=\"https://ipywidgets.readthedocs.io/en/stable/user_install.html\">Jupyter\n",
" Widgets Documentation</a> for setup instructions.\n",
"</p>\n",
"<p>\n",
" If you're reading this message in another frontend (for example, a static\n",
" rendering on GitHub or <a href=\"https://nbviewer.jupyter.org/\">NBViewer</a>),\n",
" it may mean that your frontend doesn't currently support widgets.\n",
"</p>\n"
],
"text/plain": [
"VBox(children=(NGLWidget(), IntSlider(value=0, max=3)))"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "display_data"
"output_type": "execute_result"
}
],
"source": [
Expand All @@ -87,39 +83,19 @@
},
{
"cell_type": "code",
"execution_count": 39,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"for p in parms:\n",
" view.add_structure(nv.ParmEdTrajectory(p))\n",
"view.show_only([0])"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[(None, None), (None, None), (None, None), (None, None)]"
]
},
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"[(view[i].clear(), view[i].add_licorice()) for i in range(4)]"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -133,9 +109,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
"version": "3.10.14"
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}
195 changes: 0 additions & 195 deletions examples/notebooks/protein_mutation_pdb4amber.ipynb

This file was deleted.

66 changes: 41 additions & 25 deletions examples/notebooks/representations_and_selection_language.ipynb

Large diffs are not rendered by default.

99 changes: 0 additions & 99 deletions examples/notebooks/show_rosetta.ipynb

This file was deleted.

92 changes: 0 additions & 92 deletions examples/notebooks/trajectory_2.ipynb

This file was deleted.

69 changes: 0 additions & 69 deletions examples/notebooks/using_two_screens.ipynb

This file was deleted.

0 comments on commit f8215fb

Please sign in to comment.