|
| 1 | +# NGLView Jupyter Notebook in OOD |
| 2 | + |
| 3 | +## Getting Started |
| 4 | +You can run NGLView in a Jupyter Notebook in OOD by going to the URL [ood.hpc.nyu.edu](http://ood.hpc.nyu.edu) in your browser and selecting `NGLView Jupyter Notebook` from the `Interactive Apps` pull-down menu at the top of the page. As you can see below, once you've used it and other interactive apps they'll show up on your home screen under the `Recently Used Apps` header. |
| 5 | + |
| 6 | +:::note |
| 7 | +Be aware that when you start from `Recently Used Apps` it will start with the same configuration that you used previously. If you'd like to configure your NGLView Jupyter Notebook session differently, you'll need to select it from the menu. |
| 8 | +::: |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +## Configuration |
| 13 | + |
| 14 | +You can select the number or cores, amount of memory, GPU type (if any) and CUDA version, amount of time, optional Slurm options, and the root directory. |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | +:::warning |
| 19 | +If you select home as the root directory, be careful not to go over your quota. You can find your current usage with the `myquota` command. Please see our [Storage documentation](../03_storage/01_intro_and_data_management.mdx) for details about your storage options. |
| 20 | +::: |
| 21 | + |
| 22 | +## NGLView Jupyter Notebook running in OOD |
| 23 | + |
| 24 | +After you hit the `Launch` button you'll have to wait for the scheduler to find you node(s) to run on: |
| 25 | + |
| 26 | + |
| 27 | +Then you'll have a short wait for the Jupyter Notebook itself to start up.<br /> |
| 28 | +Once that happens you'll get one last form that will allow you to: |
| 29 | +- open a terminal window on the compute node your NGLView Jupyter Notebook session is running on |
| 30 | +- go to the directory associated with your Session ID that stores output, config and other related files for your session |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +Then after you hit the `Connect to NGLView Jupyter` button you'll be able to use NGLView commands in a Jupyter Notebook. |
| 35 | + |
| 36 | +### NGLView Jupyter Notebook example |
| 37 | + |
| 38 | +Please enter the following into the first Jupyter Notebook cell and run it by hitting `shift`+`enter`: |
| 39 | +```python |
| 40 | +import nglview as nv |
| 41 | +view = nv.show_structure_file(nv.datafiles.PDB) |
| 42 | +view |
| 43 | +``` |
| 44 | + |
| 45 | +You should get output like this: |
| 46 | + |
0 commit comments