Files
Jungfraujoch/frontend
leonarski_f 2df1d8a2ad Mol* viewer: aaredb's structure-viewer setup, on a black stage
The owner's verdict on the screenshots: aaredb (gitea.psi.ch/mx/aaredb, the PSI MX group's own
structure viewer) has it right, so its Mol* setup is taken over, files copied from
frontend/src/components/Structure at 8ece2c2 into frontend/src/components/structure:
- createPlugin.ts: headless DefaultPluginSpec plugin, manual camera reset; background black (owner)
  instead of aaredb's 0x0d1a26.
- MolstarCanvas.tsx: fresh canvas per mount, one-tick StrictMode deferral, resize, WebGL context-loss
  recovery, the Coot control profile wired.
- cootControls.ts / cootTrackball.ts: Coot mouse language - left drag rotates (Coot 0.9.8 trackball),
  right drag zooms, middle drag pans, middle click recentres on a residue, scroll clips the slab,
  shift+scroll zooms (camera sync and residue pick left out: no split view here).
- loadModel.ts: cartoon coloured by chain from a palette clear of the map colours, polymer sticks and
  waters built hidden, ligands as ball-and-stick; display modes cartoon / sticks / both and a waters
  switch; reads mmCIF too, and gives the atom coordinates for carving.
- loadMaps.ts: isosurface wireframe meshes at ABSOLUTE levels from the full cell's mean and RMS,
  2Fo-Fc steel blue, Fo-Fc green/red at +/-sigma, not pickable; plus the anomalous map as a magenta
  +sigma mesh in the same style.
- densityCrop.ts: the density worker's crop to the model's box + 6 A, the 4.5 A carve of the 2Fo-Fc map
  around the atoms (never a difference map) and the CCP4 encoding, applied to the broker's one-cell map.
The panel and defaults follow aaredb's StructureView: map rows with switch and sigma slider (2Fo-Fc 1.0,
0.5-4 by 0.1; Fo-Fc 3.0, 1-8 by 0.5; anomalous 4.0, 1-8 by 0.5), debounced sigma updates, model mode
buttons, a controls legend. This replaces the camera-following 10 A map sphere: aaredb's equivalent is
the carved map with the scroll-driven clip slab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu
(cherry picked from commit 5763b619fe4ec9999ac790960a5eb033f511c546)
2026-10-22 20:18:51 +02:00
..
2026-07-11 07:19:11 +02:00
2026-06-23 20:29:49 +02:00
2024-10-05 13:14:49 +02:00
2025-11-28 12:47:35 +01:00
2026-06-23 20:29:49 +02:00
2026-06-16 14:13:29 +02:00
2024-10-05 13:14:49 +02:00
2024-10-05 13:14:49 +02:00
2024-10-05 13:14:49 +02:00

Jungfraujoch Frontend

Building

To build web interface:

cd frontend_ui
npm install
npm run openapi
npm run build

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the dist folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

npm run openapi

npm audit findings

npm audit currently reports 17 advisories (3 high, 13 moderate, 1 low). All of them live in build-time tooling and never reach the production bundle shipped to the browser. Summary of the chains:

Source dep Vulnerable transitives When it runs
@redocly/cli @opentelemetry/*, dompurify (via redoc), ws (via simple-websocket), js-yaml, protobufjs, @babel/core npm run redocly / redocly4broker — static OpenAPI HTML generation
vite esbuild@0.27.x Dev server and dep pre-bundling. Production build uses Rollup.
vite-plugin-svgr @babel/core, js-yaml (via cosmiconfig) Vite build plugin
openapi-typescript-codegen js-yaml npm run openapi — TS client generation

Notes on the high-severity items:

  • esbuild GHSA-gv7w-rqvm-qjhr is a Deno-specific RCE via NPM_CONFIG_REGISTRY; GHSA-g7r4-m6w7-qqqr is an arbitrary-file-read in the dev server on Windows. Neither applies to a Linux build of the production bundle.
  • ws GHSA-96hv-2xvq-fx4p only matters when simple-websocket opens a socket, which happens during docs generation, not at runtime.

npm audit fix cannot resolve any of these without downgrading @redocly/cli (no real fix) or jumping vite to a major that switches the bundler to Rolldown.