Introduction¶
In the development and use of DeepSeek Harness (DSH), tasks involving structural analysis often require handling files such as .cif, .res, or .xyz. Reading atomic coordinates only through a text viewer often makes it difficult to intuitively judge cell symmetry, coordination geometry, or electron density peaks. dsh-crystal-viewer provides a native 3D structure visualization window for DSH, aiming to address this pain point and allow users to inspect structures directly within the DSH interface.
Plugin Introduction¶
This is a standalone DSH plugin that provides human users with a window for inspecting crystal and molecular structures inside DeepSeek Harness. It combines an interactive 3D structure renderer (WebGL-based, with no WASM dependencies), a Q-peak (electron density peak) layer, and a real-time parameter panel. The plugin registers as a sidebar or bottom-docked tab via the dsh-better-sidebar API and registers a file previewer so that clicking a file in the file tree directly renders a 3D view.
Core Features¶
The plugin provides the following capabilities:
-
3D Rendering and Display
- Interactive Viewer: Supports mouse interaction and uses WebGL rendering.
- Atom Styles: Supports display modes such as None, Line, Stick, Ball and stick, CPK (space-filling), and Polyhedron (coordination polyhedron).
- Colors and Labels: Supports custom colors, coloring by element, and coloring by family; supports toggling bond-order display and atom labels.
- Cell Controls: Supports rendering the cell/unit lattice box (None, Dashed, Line, Stick) and view controls (Perspective/Parallel projection, background color, outline).
-
Crystallography Features
- Q-peak Layer: Displays unassigned electron density peaks, rendered as an independent model.
- Symmetry Expansion: Based on the file’s SYMM generator and LATT lattice parameters, correctly handles periodic expansion for high-symmetry space groups.
-
Real-time Parameter Panel
- The plugin automatically parses files and displays parameters in real time, including: source file information, refinement parameters (R1, wR2, GooF, etc.), cell parameters, symmetry, element statistics, atom statistics, and Q-peak list.
-
File Integration and Theming
- File Preview: Registered as a file previewer and supports
.res,.ins,.cif,.xyz,.mol, and.pdbformats. - Theme Support: Follows DSH
--dsw-*design tokens and automatically adapts to DSH light/dark themes.
- File Preview: Registered as a file previewer and supports
Installation and Enablement¶
According to the provided materials, no specific installation commands are listed. Users need to obtain the plugin via the project directory page or GitHub repository.
Typical Usage¶
In the DSH interface, users can directly click a structure file in the file tree (such as .cif or .pdb), and the plugin will automatically open the crystal view in a sidebar or bottom-docked tab. Alternatively, developers can manually invoke the window through the tab registration mechanism of the dsh-better-sidebar API.
Use Cases and Notes¶
- Positioning: This is a “viewer” for human users; it does not provide crystallographic calculation capabilities (such as structure solution and refinement) and is only used for visualization and parameter viewing.
- Permissions: The plugin runs under the current DSH process permissions.
- Security: Before installation, check the source code and license (MIT).
Summary¶
For users who need to perform structural analysis or view crystallographic data in DSH, this plugin provides intuitive visual support and an overview of parameters.