Skip to content

Matsulab UI - #551

Closed
mattakamatsu wants to merge 4 commits into
simularium:mainfrom
MatsulabUW:matsulab-ui
Closed

mattakamatsu wants to merge 4 commits into
simularium:mainfrom
MatsulabUW:matsulab-ui

Conversation

@mattakamatsu

Copy link
Copy Markdown

Time Estimate or Size

How long do you expect it to take a reviewer to review this PR?
Alternately, is this PR xsmall, small, medium, large, or xlarge?

Problem

What is the problem this work solves, including
Link to story or ticket

Solution

What I/we did to solve this problem

with @pairperson1

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • This change requires updated or new tests

Change summary:

  • Tidy, well formulated commit message
  • Another great commit message
  • Something else I/we did

Steps to Verify:

  1. A setup step / beginning state
  2. What to do next
  3. Any other instructions
  4. Expected behavior
  5. Suggestions for testing

Screenshots (optional):

Show-n-tell images/animations here

Keyfiles (delete if not relevant):

  1. main file/entry point
  2. other important file

Thanks for contributing!

mattakamatsu and others added 4 commits August 27, 2026 21:54
Dark graphite chrome with phalloidin-orange accent; viewport-first
layout with collapsible rail sections, floating camera cluster, and a
transport bar whose scrubber paints streaming-cache coverage.

Also fixes stock harness bugs: scrubber wired to gotoTime (was bound to
a nonexistent handler), duration readout no longer NaN (totalSteps was
never set), and loading a file now clears the client-simulator badge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Library: SimulariumController.playbackSpeed (frames advanced per render
tick) read by the viewport animate loop through a fractional-step
accumulator, so 0.25x-4x playback works for both slow motion and
fast-forward.

Bench app: speed select in the transport bar plus keyboard control -
space play/pause, arrows step one frame (shift = 10), home/end jump,
[ ] cycle speed presets. Key handling falls back to event.code for
environments that deliver empty key values, and the controller is
exposed on window for console debugging.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
simulariumio's built-in SmoldynConverter reads `listmols` output only, which
renders point molecules as spheres (viz_type 1000). Filaments are polylines and
need viz_type 1001 agents whose vertices live in the flat `subpoints` array, so
Smoldyn `printFilaments` output has had no path into the viewer until now.

`tools/smoldyn_filaments_to_simularium.py` does that conversion. It infers
dimensionality from the coordinate count (2D runs are embedded at z=0), resolves
parent links so branch generations can be coloured, and optionally colours by
capped vs growing barbed end instead.

It also handles a scaling trap that is easy to hit and hard to diagnose:
TrajectoryConverter does not centre or scale data on its own — each simulator's
converter is expected to call the helpers itself. Sub-micron coordinates left at
world scale sit at ~0.5 units while the viewer camera is at z=120, so the scene
renders empty with no error. The script calls center_fiber_positions() and
center_and_scale_agent_data(), and scales box_size to match.

tools/README.md documents the whole path for someone new: clone this branch,
build a Python venv, convert an output file, run the viewer with `npm run dev`,
and drag the .simularium onto the page. simulariumio is stock upstream, so no
lab fork is needed for the Python side.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Converting the actin compression baseline (43 MB, 351 frames, growing from 3 to
3,606 filaments) did not finish in 8 minutes. Cost scales with agent-frames --
frames x filaments per frame -- and grows faster than linearly, so in a branching
run where filament count rises exponentially the last few frames dominate the
whole conversion.

Adds --stride N (keep every Nth frame) and --max-time T (drop frames after T),
applied before anything else touches the data. The script now prints its frame
and agent-frame counts and warns above 50,000 agent-frames, so the failure mode
is visible up front rather than as an apparent hang.

Measured on that baseline: --stride 10 gives 36 frames / 19,340 agent-frames in
4 seconds (2.4 MB output), --stride 5 gives 13 seconds, and no stride does not
complete. README documents the tradeoff with those numbers and recommends
starting at --stride 10.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mattakamatsu
mattakamatsu requested a review from a team as a code owner September 16, 2026 01:10
@mattakamatsu
mattakamatsu requested review from ShrimpCryptid and meganrm and removed request for a team September 16, 2026 01:10
@mattakamatsu
mattakamatsu deleted the matsulab-ui branch September 16, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant