Interactive, GPU-accelerated visualization for materials science, in the browser, your editor and your notebooks. Drop in a CIF, POSCAR, MD trajectory or CHGCAR and explore it in 3D, or build your own web UI from the same components: crystal structures, trajectories, volumetric data, band structures, phase diagrams, convex hulls, periodic tables and a full 2D/3D plotting library.
Try it in your browser → No install, just drag a file onto any viewer.
| VS Code / Cursor | Right-click any structure or trajectory file → MatterViz: Open. Install from the VS Code Marketplace or Open VSX. Works over Remote SSH. Settings and file formats |
| JupyterLab | Double-click files in the JupyterLab file browser (HDF5 and JSON via right-click → Open With → MatterViz): pip install matterviz-jupyterlab. Details |
| Jupyter / Marimo | Notebook widgets for pymatgen and ASE objects via pymatviz |
| Svelte apps | npm add matterviz and import components (quick start below) |
| React, Vue, HTML | Prebuilt custom elements like <mv-structure> and <mv-trajectory>, no build step needed. Guide |
| Command line | pnpm snapshot renders structure images in batch; pnpm movie scripts camera flights through MD trajectories into MP4/WebM. Run either with --help from a repo checkout |
There's much more in the docs: XRD, IR/Raman spectra, NEB reaction paths, symmetry elements, slab and interface builders, and 2D/3D scatter, histogram, violin, sunburst and Sankey plots.
npm add matterviz<script>
import { PeriodicTable, Structure, Trajectory } from 'matterviz'
</script>
<!-- structures: CIF, POSCAR, (ext)XYZ, pymatgen/ASE/OPTIMADE JSON, PDB, ... (also .gz) -->
<Structure source="/structures/TiO2.cif" style="height: 500px" />
<!-- trajectories: extXYZ, ASE .traj, HDF5, LAMMPS, XDATCAR, vasprun.xml, ... -->
<Trajectory source="/traj/md-run.xyz.gz" auto_play />
<!-- heatmap of any elemental property -->
<PeriodicTable heatmap_values={{ H: 10, He: 4, Li: 8, Fe: 3, O: 24 }} />Every viewer also accepts parsed data (structure, trajectory, band_structs, ...), handles drag-and-drop and has built-in export (PNG, SVG, CIF, POSCAR, JSON, GLB, video). Each viewer lists its keyboard shortcuts in its info pane.
Not using Svelte? The same components ship as custom elements:
<mv-structure source="/TiO2.cif" style="height: 500px"></mv-structure>
<script
type="module"
src="https://cdn.jsdelivr.net/npm/matterviz/dist/elements/matterviz-elements.js"
></script>- Live demos: every component with its source code and a documented props table
- Use without Svelte: React, Vue and plain HTML
- Connect to external APIs: fetch structures from OPTIMADE databases
- Changelog: breaking changes and migration notes for each release
MatterViz builds on three.js, threlte, d3, Svelte and Vite, with element data and photos from many generous sources. See the full acknowledgements.
Use citation.cff or cite the Zenodo record:
@software{riebesell_matterviz_2022,
title = {matterviz: visualization toolkit for materials informatics},
author = {Riebesell, Janosh and Evans, Matthew},
date = {2026-11-10},
year = {2026},
doi = {10.5281/zenodo.17094509},
url = {https://github.com/janosh/matterviz},
note = {10.5281/zenodo.17094509 - https://github.com/janosh/matterviz},
urldate = {2026-11-10}, % optional, replace with your date of access
version = {0.9.0}, % replace with the version you use
}






