RMSX Flipbook
RMSX Flipbook is a Galaxy visualization package for RMSX rmsx.json viewer manifests rendered with Molstar.
The npm package is published under @galaxyproject/rmsxflipbook.
It follows the Galaxy visualization XML framework:
public/rmsxflipbook.xmldeclares the visualization, compatiblermsx.jsondatatype, params, and script entry point.src/main.jsreads Galaxy'sdata-incomingpayload from#app.- The selected manifest is fetched from
${root}api/datasets/${dataset_id}/display. - Molstar is installed from npm (
molstar) and bundled at build time.
Viewer Modes
- Structures preserves the original interactive one-row Flipbook layout.
- Heatmap shows one transposed RMSX matrix per logical chain, with slices along the horizontal axis and residues along the vertical axis.
- Analysis aligns RMSD, RMSX, RMSF, and chain-only molecular slices on shared time and residue bounds. Two chain panels sit side by side when the content area is at least 1240 px wide and stack below that threshold. A larger full-assembly row is included for multi-chain manifests.
Analysis uses one Molstar canvas, an orthographic camera, and one shared rotation matrix. DOM slice anchors are unprojected into molecular world space, so resizing or scrolling updates placement without recreating the viewer, and dragging any molecular lane rotates every structure in place. Manifests that predate optional RMSD/RMSF metrics still receive a compact heatmap and structure layout.
Click outside a plot, including its axes or margins, or press Escape to clear the linked selection guides and molecular residue markers. The current slice, rotation and spacing stay in place. Selecting a plot again restores the guides; dragging a molecular lane or using a control preserves the current selection.
Save image downloads a PNG of the visible Structures, Heatmap or Analysis view without the control sidebar. Analysis images include the plots, labels, legends and visible molecular lanes with the current rotation and selection. Clear the selection first for a figure without red guides. The export captures the current viewport and scroll position; it does not include content below the visible area. It uses bundled Molstar rendering and browser canvas APIs, without uploading data or asking for screen-capture permission.
Default Example
Development mode and Playwright use a real RMSX manifest generated by the Galaxy
wrapper from the bundled 1UBQ.pdb and 316-frame mon_sys.xtc trajectory. The
manifest contains nine structural slices, 76 ubiquitin residues, and the
optional Analysis metrics; it replaces the earlier synthetic three-frame
poly-alanine fixture.
The trajectory derives from the TCBG Ubiquitin case study and carries source attribution in the manifest. To refresh the fixture from a newly generated Galaxy output:
npm run fixture -- /path/to/1ubq-mon_sys.rmsx.json
Development
npm install
GALAXY_ROOT=http://127.0.0.1:8080 GALAXY_DATASET_ID=<dataset-id> npm run dev
Build
npm run build
The build writes Galaxy-ready static assets to static/.
Geometry Checks
Append ?layoutDebug=1 in development mode to show panel bounds, molecular
lane centers, and slice-anchor guides. Playwright verifies the Analysis view at
2000x1100, 1440x900, and 552x993, including chart-edge alignment, panel
wrapping, nine distinct clusters per lane, fixed centers after rotation, and
the larger assembly-row hierarchy.
Publish
npm login
npm run build
npm publish --access public
This workspace also works with pnpm login and pnpm publish --access public.
The package runs vite build before packing so the published tarball contains
the Galaxy-ready static/ assets. After publishing, Galaxy can reference the
package from client/visualizations.yml.
Ubiquitin orientation and rotation centers
The ubiquitin unfolding example retains the established 90-degree X rotation: its +Z pulling direction appears downward on screen (-Y), with X horizontal. Each slice (and each Analysis chain lane) rotates around the mass-weighted center of the atoms present in that lane, calculated before mask splitting. The combined assembly uses one common assembly center, preserving chain geometry. Backbone N/C/O atoms therefore receive their respective atomic weights; a C-alpha-only slice has the same pivot as its geometric center. If a legacy PDB contains an unrecognized element, the complete lane retains the geometric center instead of assuming a mass. This does not infer omitted atoms or rerun scientific analysis, and no manifest migration is required.
The browser regression checks all nine ubiquitin slices, a downward side-on unfolding tail, and restoration after rotation reset in Structures and Analysis.
0.0.4 release notes
- Center each structure's rotation on the mass of its displayed atoms, sharing one pivot across its colored representations and preserving complete assemblies.
- Initialize Molstar's anti-aliasing defaults before the first render to prevent intermittent blank structures while shader resources load.
- Verify all nine ubiquitin slices remain visible and unfold downward after a rotation reset. Multi-chain Analysis and legacy manifests retain their existing interface and require no migration.