Skip to content

Jupyter view

This MR contains a simple command for viewing structures (in X3D) in a jupyter notebook, based on this recent thread on ase-users. I hadn't noticed that there was also an NGLView version in progress until I started writing the documentation for this.

However, the two approaches are complimentary: the X3D approach should work out-of-the-box without any extra extensions, so is less complicated for those starting out. It can view a single image only (with 3-d capabilities). Heavy users may want to install NGLview if they want more capabilities, such as viewing a trajectory or customizing things.

Tested with python2/python3 on firefox and chromium (both on linux), with this test:

from ase.build import molecule
from ase.visualize import view

atoms = molecule('CH3OH')
view(atoms, viewer='x3d')

Merge request reports