Release v0.3.1
PyMOL-RS v0.3.1
A customization and Windows release — startup scripts, Python keybindings, and plugin auto-loading give users control over their environment, while Windows-specific fixes bring the platform to full parity.
Highlights
Startup Script (pymolrc)
PyMOL-RS now executes ~/.pymol-rs/pymolrc as PML on launch. The script runs after GPU initialization and plugin loading but before any CLI-specified files, so user defaults (colors, settings, representations) apply to all subsequently loaded structures — matching PyMOL's pymolrc behavior.
Python Keybindings
Plugins can now register keyboard shortcuts from Python via cmd.set_key() and cmd.unset_key(). Hotkey strings (e.g. "ctrl+s", "F5") are parsed on the GUI side into proper winit key codes. Cmd is mapped to Ctrl on macOS for cross-platform consistency. Python callbacks execute on the worker thread when the key is pressed.
Plugin Auto-Loading
Each plugin directory is scanned for a python/ subdirectory at startup. All .py files found there are automatically executed after backend installation, in alphabetical order for deterministic behavior. This enables plugins to ship Python extensions that self-install without user intervention.
New Features
- Configurable paths — Config directory, plugin directory, and pymolrc path are now overridable via environment variables (
PYMOL_RS_CONFIG_DIR,PYMOL_RS_PLUGIN_DIR,PYMOL_RS_PYMOLRC). Defaults remain~/.pymol-rs,~/.pymol-rs/plugins, and~/.pymol-rs/pymolrc - DSSP benchmark — Criterion benchmark for the Kabsch & Sander DSSP implementation alongside the existing PyMolDss benchmark for direct performance comparison
Bug Fixes
- Windows menu bar — The native menu bar (muda) was only initialized for macOS (
init_for_nsapp) but never attached to the window on Windows, resulting in no menu bar. Now callsinit_for_hwndon the winit window handle - Windows path backslashes — Backslashes in file paths from Windows file dialogs and pymolrc loading are now normalized to forward slashes before reaching the command parser, fixing "Unknown file format" errors (fixes #3)
Under the Hood
- Centralized paths — Hardcoded
~/.pymol-rspaths inpymol-guireplaced withpymol_settings::pathsmodule, making all path logic testable and overridable from a single location dirspromoted —dirscrate moved to a workspace dependency
Full Changelog: v0.3.0...v0.3.1