--- id: py3dmol version: "2.5.5" license: MIT license_treatment: permissive maintenance: active --- # py3Dmol — An IPython interface for embedding 3Dmol.js views in Jupyter notebooks License: permissive · Maintenance: active · Downloads: 427.3K/mo ## What it is and what it does py3Dmol is a Jupyter widget that wraps 3Dmol.js to display interactive 3D molecular structures in notebooks. It lets you query structures by PDB ID or load custom molecular data, then style and manipulate them using the 3Dmol.js API—all without needing a running kernel after the cell executes. The viewer renders as static HTML, so notebooks exported to web pages or presentations retain full interactivity. The package has no runtime dependencies beyond Python itself, making it lightweight to install. It's designed for researchers and developers working with protein structures, chemical compounds, and other molecular data in computational notebooks. One-way communication means the notebook cannot programmatically read back viewer state, only send commands to it. Use it for: - Display protein structures from the Protein Data Bank by PDB ID in research notebooks. - Visualize molecular docking results or simulation frames with custom styling and coloring. - Create interactive molecular structure figures for presentations and publications exported from notebooks. - Teach structural biology or chemistry by embedding explorable 3D models directly in course materials. - Inspect and annotate chemical compound structures during drug discovery workflows. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Embeds an interactive 3D molecular viewer in Jupyter notebooks using 3Dmol.js, allowing visualization and manipulation of protein and molecular structures directly in the notebook. Yes, if you work with molecular structures in Jupyter notebooks. Installation is frictionless, maintenance is active, the MIT license is permissive, and there are no known vulnerabilities. The static rendering model makes it reliable for sharing notebooks and exporting to web. Not needed if you don't use Jupyter or don't work with 3D molecular data. ## Install pip install py3dmol uv add py3dmol poetry add py3dmol ## Installing py3Dmol Before you install: Low friction installation with no runtime dependencies. Last release 83 days ago with active maintenance status. License in practice: MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install py3Dmol import py3Dmol view = py3Dmol.view(query='pdb:1ubq') view.setStyle({'cartoon':{'color':'spectrum'}}) view Requires Jupyter notebook environment to display the interactive viewer; static output works in web pages and presentations generated from notebooks. Verify before relying: - Whether the package supports Python 2 in practice given its 2016 origin and the Python 2 classifier—Python 2 reached end-of-life in 2020. - Current state of the upstream 3Dmol.js library and whether breaking changes have occurred since the last py3Dmol release. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 427.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags jupyter 3d molecule viewer, protein structure visualization, molecular structure display, 3dmol jupyter widget, interactive pdb viewer, chemical structure notebook, 3d molecular graphics, jupyter-widget, molecular-visualization, structural-biology [View on SkillFed](https://skillfed.io/packages/py3dmol) · [View on PyPI](https://pypi.org/project/py3dmol/)