Skip to content

Release v0.3.2

Choose a tag to compare

@github-actions github-actions released this 14 Apr 08:33

PyMOL-RS v0.3.2

A Jupyter integration release — an interactive notebook widget brings the full WASM viewer into Jupyter, while Windows plugin fixes improve cross-platform reliability.

image

Highlights

Jupyter Notebook Widget

An anywidget-based widget embeds the PyMOL-RS WASM + WebGPU viewer directly in Jupyter notebooks. The widget ships the WASM binary inline (base64-encoded), so it works in JupyterLab, Jupyter Notebook, VS Code, and Google Colab — anywhere anywidget runs.

from pymol_rs.widget import Viewer

view = Viewer()
view.show()
cmd = view.get_cmd()
cmd.fetch("1CRN")
cmd.show("cartoon")
cmd.color("green", "chain A")

Features:

  • Fire-and-forget commandscmd.fetch(), cmd.show(), cmd.color(), etc. via traitlet sync
  • Synchronous queries — request/response channel for commands that return data
  • Local file loading — load structures from the local filesystem into the browser viewer
  • Picking support — optional click-to-select atoms (Viewer(picking=True))
  • Configurable layoutwidth and height parameters with sensible defaults

Bug Fixes

  • Windows Python plugin loading — Fixed hardcoded Unix assumptions in the Python plugin: Scripts/ vs bin/ for venv paths, ; vs : for path list separators (PYTHONPATH, PYTHONHOME), and python.exe lookup order
  • MSVC delay-load removed — MSVC /DELAYLOAD cannot handle data symbol imports like _Py_NoneStruct (used by PyO3 for Py_None), causing LNK1194 at link time. Removed delay-loading; Python must now be on PATH when the plugin is loaded
  • Web viewer DSS on fetch — Secondary structure assignment now runs automatically after fetch in the web viewer, matching native behavior

Under the Hood

  • CI caching — Rust dependency caching added to all CI workflows (build, test, release)
  • Widget assets in wheels — Release workflow updated to include WASM build artifacts in Python wheel builds
  • Clippy clean — Resolved warnings in web/ and python/ crates

Full Changelog: v0.3.1...v0.3.2