Tutorials

This section provides tutorials on getting started with NanoVer. We assume familiarity with setting up simulations in whichever framework you’re running with NanoVer.

Many of the tutorials for NanoVer are written as Jupyter notebooks, and thus require that you have Jupyter installed in your NanoVer conda environment (see the installation instructions below).

For useful tips on how to explore the functionality of NanoVer in Jupyter notebooks, please refer to the Tips for using NanoVer in Jupyter section below.

Installing Jupyter

The tutorials use Jupyter notebooks, NGLView for visualising trajectories, and, while not strictly necessary, assumes you have the NanoVer iMD-VR application installed (see Installing the iMD-VR client). Install Jupyter notebooks and NGLView with conda:

# Assuming NanoVer is installed in a conda environment named "nanover",
# change the name otherwise.
conda activate nanover
conda install jupyter
conda install nglview

If you wish to access the Jupyter notebooks via JupyterLab, installing JupyterLab before NGLView should install the correct dependencies for NGLView automatically (i.e. replacing conda install jupyter with conda install jupyterlab in the installation instructions above). If JupyterLab is installed outside of your conda environment, you will need to install ipywidgets in your NanoVer conda environment following these instructions.

Tips for using NanoVer in Jupyter

NanoVer provides a set of libraries that define a range of objects (classes, functions, etc.) that can be used to perform interactive molecular dynamics simulations. The Jupyter notebook interface provides useful tools to navigate these libraries and their functionality, making it easier to find the resources you need without digging through the documentation.

Explore NanoVer objects using Jupyter notebooks.

The GIF above demonstrates how to use Jupyter to explore and understand objects in NanoVer:

  • Use ⇥ (the Tab key) mid-way through typing to list options such as available functions within a class and select the desired option for autocompletion:

    e.g. selecting the OpenMMSimulation.from_xml_path() function for importing simulation files

  • Use ⇥ to list the functionality of objects:

    e.g. pressing ⇥ after typing example_sim. to see the functionality associated with this instance

  • Use the help() function to get information about objects, which can be used on

    • Instances of objects (e.g. example_sim)

    • The objects themselves (e.g. OpenMMSimulation)

Both ⇥ and help() provide useful information about the objects and their functionality. When using ⇥, the object’s type is displayed next to it, making it easy to tell which functions, instances etc. are available to a particular object. The help() function prints the docstrings associated with the object, which can also be found in the modules section of this documentation.

Further reading

For more details, look at the documentation for the individual modules.