@galaxyproject/rmsxflipbook

中文文档
0.0.4发布于 2026/09/12MITES Module零依赖近 30 天下载 9840

RMSX Flipbook Galaxy visualization for rmsx.json viewer manifests rendered with bundled Molstar.

原始使用文档
文档目录8 节
  1. Viewer Modes
  2. Default Example
  3. Development
  4. Build
  5. Geometry Checks
  6. Publish
  7. Ubiquitin orientation and rotation centers
  8. 0.0.4 release notes

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.xml declares the visualization, compatible rmsx.json datatype, params, and script entry point.
  • src/main.js reads Galaxy's data-incoming payload 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.

版本与发布记录

@galaxyproject/rmsxflipbook 共发布 5 个版本,首次发布于 2026/07/16;过去 12 个月发布了 5 个版本。

版本发布日期距今
0.0.4latest2026/09/122 个月前
0.0.32026/09/102 个月前
0.0.22026/07/203 个月前
0.0.12026/07/164 个月前
0.0.02026/07/164 个月前

关于 @galaxyproject/rmsxflipbook 的常见问题

@galaxyproject/rmsxflipbook 是什么?

RMSX Flipbook Galaxy visualization for rmsx.json viewer manifests rendered with bundled Molstar.

如何安装 @galaxyproject/rmsxflipbook?

在项目目录运行 npm install @galaxyproject/rmsxflipbook,或使用 pnpm add / yarn add / bun add。

@galaxyproject/rmsxflipbook 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/galaxyproject__rmsxflipbook 是否存在。

@galaxyproject/rmsxflipbook 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@galaxyproject/rmsxflipbook 可以商用吗?

@galaxyproject/rmsxflipbook 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@galaxyproject/rmsxflipbook 的下载量有多少?

根据 npm 官方下载统计,@galaxyproject/rmsxflipbook 在 2026/10/16 – 2026/11/14 这 30 天内被下载 9,840 次,日均约 328 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@galaxyproject/rmsxflipbook 还在维护吗?

最新版本 0.0.4 发布于 2026/09/12(2 个月前);至今共发布 5 个版本,其中过去 12 个月发布了 5 个;首次发布于 2026/07/16。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。