ipyspeck 0.8.4 molecular graphics for Jupyter and Streamlit

Drag to rotate · Shift-drag to pan · Scroll to zoom · Drop a PDB, mmCIF, SDF or XYZ file

Use it in Python

The same renderer and settings in Jupyter and Streamlit.

Jupyter · ipyspeck

pip install ipyspeck
from ipyspeck import Speck
w = Speck.from_alphafold("Q8W3K0")
w.apply_preset("cover")
w.save_image("figure.png", width=3000)
w.save_video("movie.mp4", "tour")

Streamlit · stspeck

pip install stspeck
import stspeck
stspeck.speck(**stspeck.fetch_pdb("4HHB"),
              surface=True, surfaceOpacity=0.3,
              preset="glossy", height=500)

Videos

Click one to load it and play its video; Save video in the player downloads the MP4. The clapperboard button in the viewer makes ready-made videos of any structure, and one line in Python does the same. Step-by-step notebooks go from a first video to your own storyboard.

Rendered with ipyspeck, several with the macro depth of field. Click an image to load that scene in the viewer, or open its notebook.