IPython Notebook Viewer

Example

This is an example of the trajectory viewer with PDBID 1F39. Running inside the IPython notebook as a widget, many other options can be controled such as the color scheme, full screen, different representations, and more. This video shows an example of it running inside the notebook.

Usage

To use the trajectory widget in the notebook, start your IPython session with

from mdtraj.html import TrajectoryView, enable_notebook
enable_notebook()

And then at the end of a cell, to render the viewer in the output space, use a

TrajectoryView(your_mdtraj_trajectory)

Requirements

IPython >= 4.0
To install IPython and the notebook with conda, use conda install ipython-notebook ipywidgets.
Modern web browser with WebGL
We’ve had the best luck with Chrome and modern versions of Firefox.
Versions