๐ 1M+ Atoms at 60fps
Billboard impostor rendering scales from small molecules to massive protein complexes in real time. Run `megane serve` to stream XTC trajectories from disk over WebSocket โ scrub thousands of frames without loading everything into memory.
๐ Runs Everywhere
Jupyter widget, CLI server, React component, VSCode extension, JupyterLab labextension. Rust parsers (PDB, GRO, XYZ, MOL/SDF, MOL2, CIF, LAMMPS data, XTC, ASE .traj, LAMMPS dump) shared between Python (PyO3) and browser (WASM): parse once, run anywhere.
๐งฉ Visual Pipeline Editor
Build visualization workflows by wiring 11 node types โ load data, filter atoms, adjust styles, generate labels, render coordination polyhedra, overlay vectors. No code required. 7 typed data channels flow through color-coded edges. An AI generator can build pipelines from natural language.
๐ Embed & Integrate
Control the viewer from Plotly via ipywidgets events. Embed in MDX / Next.js docs. React to frame_change, selection_change, and measurement events. Use the framework-agnostic renderer from Vue, Svelte, or vanilla JS.
Start in your environment
megane works everywhere โ pick your entry point.
Python / Jupyter
pip install meganeInteractive widget inside Jupyter notebooks. Build pipelines in Python, display structures inline.
Jupyter Guide โTypeScript / React
npm install megane-viewerDrop <PipelineViewer /> into any React app. Build pipelines with the TypeScript builder API.
React Guide โDocker
docker build -t megane .Serve local structure files and view them instantly in the browser. No code needed.
CLI Guide โVSCode
Install from MarketplaceOpen .pdb, .gro, .xyz, .mol, .cif files directly in VS Code with the megane extension.
VSCode Extension โScale
megane renders over 1 million atoms at 60fps in the browser using GPU-accelerated billboard impostor rendering โ atoms are drawn as screen-aligned quads with a ray-sphere shader, so a single instanced draw call covers the whole structure. No desktop app, no plugin โ just a browser tab.
With the megane serve CLI, multi-GB XTC trajectories stream over a local WebSocket via a binary protocol โ scrub through thousands of frames without reading the whole file into memory. (Other hosts load trajectories fully into memory; see Platform Support.)
Anywhere
One codebase, every environment.
| Environment | How | Install |
|---|---|---|
| Jupyter | anywidget inline viewer | pip install megane |
| Browser | megane serve local server | pip install megane |
| React | <MeganeViewer /> component | npm install megane-viewer |
| VSCode | Custom editor for .pdb, .gro, .xyz, .mol, .sdf, .cif | Extension |
The secret: PDB, GRO, XYZ, MOL/SDF, MOL2, CIF, LAMMPS data, XTC, ASE .traj, and LAMMPS dump parsers are written in Rust and compiled to both PyO3 (Python) and WASM (browser). Parse once, run anywhere.

Visual Pipelines
Wire nodes to build visualization workflows โ no code required.
11 node types across 5 categories: load data (structure, trajectory, streaming, vector), process (filter, modify), overlay (bonds, labels, polyhedra, vectors), and display in a 3D viewport.
7 typed data channels โ particle, bond, cell, label, mesh, trajectory, vector โ flow through color-coded edges. Only matching types can connect.
Pipelines serialize to JSON, so you can save, share, and version-control your visualization recipes.

Integrate
megane is not a walled garden. It fits into your existing workflow.
Plotly โ Click a point on a Plotly FigureWidget to jump to a trajectory frame. Use megane's on_event("frame_change") callback to update Plotly markers in sync.
MDX / Next.js โ Drop <MeganeViewer /> or <Viewport /> into your .mdx documentation. WASM parsing works out of the box with a one-line webpack config.
ipywidgets โ React to frame_change, selection_change, and measurement events. Compose megane with any widget in the Jupyter ecosystem.
Framework-agnostic โ MoleculeRenderer is a plain Three.js class. Mount it in Vue, Svelte, or a vanilla <div>.