Introduction¶
In the DSH Web file browser, the default text preview is often not intuitive enough for biomolecular or small-molecule files. The dsh-file-explorer-preview-molstar plugin overrides the default preview behavior and provides interactive 3D model rendering for formats such as .cif and .pdb.
About the Plugin¶
This is a DSH Web plugin maintained by wolfsonliu. It is built on the Mol* technology stack and provides visualization support for structural biology data in the file browser, replacing the original plain-text display.
Core Features¶
- 3D Viewer: Built on
molstar, usingPluginContextand a minimal canvas, without the full Mol* UI. - Representation and Color: Supports representation presets such as Auto, Cartoon, Ball & Stick, and Molecular surface. Color options include default, by chain, and by entity.
- Interaction Controls: Supports camera reset and spin toggling, and follows DSH dark/light background switching.
- Status Bar: Shows the format badge and statistics for the number of atoms, residues, and chains.
- Localization: The toolbar and status bar support switching between Chinese and English.
- Large File Handling: Supports text files larger than 2 MiB (
text-largetype) and binary.bciffiles, obtaining raw bytes throughreadRawFile.
Installation and Enabling¶
To install this plugin, make sure the dsh-file-explorer core plugin is installed and enabled (v0.1.0 or later).
dsh plugin --profile web add github:wolfsonliu/dsh-file-explorer-preview-molstar
dsh web
Typical Usage¶
- Select a
.cif,.pdb, or other supported file in the file browser. - The preview panel renders an interactive 3D model.
- Open the model using the “Open with…” option in the menu.
- Rotate the model using the “spin toggle” feature.
Notes¶
- Browser Requirement: A WebGL-capable browser is required.
- Permissions: Read-only preview; editing is not supported.
- File Scope: Trajectories and maps (
.dcd,.nc,.map) are not supported. - Dependency Version: Must be used with
dsh-file-explorerv0.1.0 or later.
Summary¶
By integrating the Mol* engine, this plugin significantly enhances the visualization experience in DSH Web for handling structural biology data. Developers can view the source code or submit issues in the GitHub repository.