Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/matterviz-gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ on:
- tests/test_matterviz_build_names.py
- tests/test_matterviz_mapped_surfaces.py
- tests/test_matterviz_plot_adapter.py
- tests/test_matterviz_topology_vendor.py
- tests/test_macos_app_bundle.py
- tools/macos/**
- tests/matterviz_plot_capture_harness.f90
Expand Down Expand Up @@ -95,10 +94,11 @@ jobs:
pnpm check
VITE_MATTERVIZ_PRERELEASE_UPDATER=1 pnpm build

- name: Test frequency viewer interactions
- name: Test native isosurface finishes and frequency viewer interactions
working-directory: frontend/matterviz-viewer
run: |
pnpm exec playwright install --with-deps chromium
pnpm test:scene-export
pnpm test:frequency

- name: Upload frequency viewer failure artifacts
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
bash tests/c/run_matterviz_stream_test.sh

- name: Test MatterViz build contract
run: python3 -m unittest -v tests/test_gui_session_paths.py tests/test_matterviz_build_names.py tests/test_matterviz_mapped_surfaces.py tests/test_matterviz_plot_adapter.py tests/test_matterviz_topology_vendor.py tests/test_macos_app_bundle.py
run: python3 -m unittest -v tests/test_gui_session_paths.py tests/test_matterviz_build_names.py tests/test_matterviz_mapped_surfaces.py tests/test_matterviz_plot_adapter.py tests/test_macos_app_bundle.py

- name: Build Multiwfn with MatterViz frontend
run: |
Expand Down
37 changes: 1 addition & 36 deletions docs/frequency-viewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,7 @@ core sources and the pinned BaneWfn source are unchanged; noGUI dependencies
are unchanged. Existing Multiwfn frequency calculations and spectrum plotting
continue to own their scientific behavior.

The retained MatterViz package already exports `Trajectory`; it does not
export `PhononModeExplorer`. Upstream at
[`59f6b563`](https://github.com/janosh/matterviz/blob/59f6b563527877bbc2cee66affb96a215cc8e000/src/lib/spectral/phonon-modes.ts)
still requires a real-space lattice and divides phonopy eigenvectors by
`sqrt(mass)`. Feeding molecular Cartesian data into that API would be incorrect.
This PR therefore uses the existing native trajectory renderer with a bounded
data adapter. A future MatterViz molecular-mode interface can replace that
adapter without changing the importer or application host. This is not a
claim that the upstream phonon explorer supports molecules today.
The panel passes a lazy frame source to the native MatterViz `Trajectory` component. The adapter uses molecular Cartesian displacements and preserves their relative amplitudes. Playback and frame selection use the upstream controls.

Spectrum broadening, frequency computation, new quantum-output parsers,
CP2K/xTB support and video export are outside this rendering PR.
Expand All @@ -89,30 +81,3 @@ renderer in Chromium. The test covers paused startup, native playback and
scrubbing, mode changes, amplitude validation, camera interaction, import
failure recovery and closing/reopening the viewer. Python is only needed to
regenerate the documented cclib fixtures.

## Camera compatibility patch

The retained renderer clears `camera_target` and `camera_zoom` on every new
structure object. A trajectory provides a new object each frame, so native
zoom was lost during playback and mode switching. The focused `r25.freq1`
backport adds upstream's `Structure.structure_series_key` contract and shares
it with `StructureViewport` to retain the native reset baseline. This viewer
passes its dataset as the key; changing files mounts a fresh scene, while
changing modes/amplitude preserves camera position, zoom and reset state.

Source design: MatterViz
[`59f6b563`, Structure.svelte](https://github.com/janosh/matterviz/blob/59f6b563527877bbc2cee66affb96a215cc8e000/src/lib/structure/Structure.svelte)
and `StructureViewport.svelte`. This is a small compatibility adaptation to
the retained renderer, not a wholesale cherry-pick of the newer session system.
Callers that omit the key retain existing behavior. A caller must use a new key
when topology changes; coordinate-only frames may share one.

Apply `vendor/patches/matterviz-0.4.2-multiwfn.d8719d12.r25.freq1.patch` with
`patch -p1` inside the extracted `r25.reps2` package. Only the two Svelte files,
their declarations and the package version change. The Python vendor replay
test verifies byte-identical contents against the new archive and checks the
complete changed-file allowlist. SHA-256 of `r25.freq1.tgz`:

```text
0f24494f31d94479a78c741958a5929cbc68efcc7af63db31f8603ecd70bf9fa
```
2 changes: 2 additions & 0 deletions docs/representation-workbench.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Representation workbench

This document describes the former customized MatterViz 0.4.2 viewer. The current viewer uses the upstream structure and surface controls. [Current viewer documentation](../frontend/matterviz-viewer/README.md)

The workbench uses VMD's representation model: a list of independently visible
representations, with one editor for the selected representation. Each Rep owns
its data source, drawing method, material, and periodic display. Camera, lighting,
Expand Down
Loading
Loading