NGL and NGLView Used by MolForge

Interactive structures and trajectories in notebooks, on the NGL web viewer.

Tool 093 of 100 in the MolForge directory of open-source tools. Every fact below was read from the repository's host on 2026-11-28.

NGL and NGLView, open-source tool for visualisation: Interactive structures and trajectories in notebooks, on the NGL web viewer.

What NGL and NGLView is

NGL is a WebGL-based molecular viewer written in JavaScript that renders structures, trajectories and volumetric data in a browser, with representations such as cartoon, ball-and-stick, surface and isosurface, and a selection language for atoms, residues and chains. NGLView wraps NGL as a Jupyter widget, so the same viewer appears inside a notebook cell and is controlled from Python: representations, colours, camera and frames are set from code and the view updates in place.

The widget accepts files (PDB, mmCIF, GRO, SDF, MOL2 and more), PDB identifiers fetched from the archive, and objects already in memory from MDAnalysis, MDTraj, pytraj, ParmEd, ASE, RDKit or Biopython. Trajectories are streamed frame by frame from Python to the browser, which keeps large simulations usable, and a player widget scrubs through them. Images can be exported as PNG; density maps load from MRC/CCP4, DX and Cube files.

NGLView depends on the Jupyter widget stack, and mismatched versions of ipywidgets, JupyterLab and nglview are the most common source of a blank cell.

Features

What it is for

Verified facts

FamilyVisualisation
Language or basisWeb, Jupyter
Repositoryhttps://github.com/nglviewer/nglview (GitHub)
LicenceNo licence detected by GitHub; read the repository before reuse
Main language on GitHubJupyter Notebook
Last commit2026-02-02
Latest releasev4.0 (2025-10-02)
Stars931 on 2026-11-28
Open issues and pull requests48 on 2026-11-28
Repository created2015-11-09
Verified2026-11-28 by MolForge's checking script, against the host's API

Where NGL and NGLView fits

Desktop, notebook and web viewers for molecules, crystals and trajectories. VMD, Jmol/JSmol, py3Dmol and Crystal Toolkit are also widely used.

How MolForge uses NGL and NGLView

NGL renders the 3D views across molforge.ai: protein targets, docking poses and the dashboard's structure viewer.

Test status

No automated rendering test; covered by the manual QA test MF-20.

Questions people ask

Does NGLView work in JupyterLab?
Yes, in both the classic Notebook and JupyterLab, provided the widget front end is installed and compatible with the installed ipywidgets and nglview versions. Version mismatches are the usual cause of an empty output cell, so follow the installation notes for the Jupyter version you run and restart the server after installing.
Can NGLView show molecular dynamics trajectories?
Yes. Functions such as show_mdanalysis and show_mdtraj take a trajectory object and attach a player; frames are sent to the browser on request rather than all at once, so long trajectories remain workable. Representations and selections apply across frames, and the current frame can be changed from Python.
How is NGL different from Mol*?
Both are web viewers. NGL is an earlier JavaScript library with a lightweight API and a Jupyter widget, and it was the viewer on the RCSB PDB site before Mol*. Mol* was developed by the PDBe and RCSB teams with a state-based architecture, native BinaryCIF and volume streaming servers. Their scopes overlap; integration needs usually decide.
Can I save an image from NGLView?
Yes. The render_image method captures the current view as a PNG at a chosen scale factor and transparency, and the image can be displayed or written to disk from Python. For movies, a helper in the contrib module strings frames together with moviepy.
Where is the NGL and NGLView source code?
At https://github.com/nglviewer/nglview (GitHub). This is the address the host reported on the day of verification; renamed repositories are followed to their new home.
Is NGL and NGLView still maintained?
The last commit was pushed on 2026-02-02 and the latest tagged release is v4.0 from 2025-10-02; the repository had 48 open issues and pull requests on 2026-11-28.
Does MolForge use NGL and NGLView?
NGL renders the 3D views across molforge.ai: protein targets, docking poses and the dashboard's structure viewer.

Guides that explain the methods

Other tools in visualisation