Skip to content

Trajectory Playback

This tutorial covers loading and playing molecular dynamics (MD) trajectories and optimization paths.

Supported Formats

FormatExtensionsDescription
Extended XYZ.extxyzMulti-frame XYZ with lattice and per-atom properties
XYZ.xyzSimple multi-frame Cartesian coordinates
ASE Trajectory.trajASE native binary format
HDF5.hdf5, .h5Hierarchical Data Format (multi-frame)
XDATCARXDATCARVASP MD trajectory
Compressed.gz, .zipAny of the above, compressed

Loading a Trajectory

Drag and Drop

Drop a trajectory file onto the viewer. CatGo auto-detects the format and switches to trajectory mode.

File Picker

Use the Import button to browse for trajectory files.

From Optimization

After running a structure optimization, you can export the full optimization trajectory as a multi-frame extXYZ file, then reload it for analysis.

Playback Controls

Buttons

ButtonAction
Play / PauseStart or pause playback
PreviousGo back one frame
NextAdvance one frame
FPS sliderAdjust playback speed

Keyboard Shortcuts

KeyAction
SpacePlay / Pause
APrevious frame
DNext frame
Ctrl+AJump to first frame
Ctrl+DJump to last frame
JBack 10 frames
LForward 10 frames
PageUpBack 25 frames
PageDownForward 25 frames
0-9Jump to percentage (0 = start, 5 = halfway, 9 = end)
+ / =Increase playback speed
-Decrease playback speed
FToggle fullscreen

Display Modes

The trajectory viewer supports multiple visualization layouts:

ModeDescription
Structure + Scatter3D viewer alongside energy/force plots (default)
Structure + Histogram3D viewer with property distribution
Structure onlyFull-size 3D viewer
Scatter onlyEnergy/force plots only
Histogram onlyProperty distribution analysis

Plot Interaction

When the scatter plot is visible:

  • Hover over a data point to preview that frame in the 3D viewer
  • Click a data point to jump to that frame
  • Plots show per-frame properties like energy, max force, volume, and temperature (when available in the trajectory metadata)

Information Pane

Press I to view trajectory metadata:

  • File info (name, size, format)
  • Frame count and indexing status
  • Current structure info (atom count, formula, volume, density)
  • Energy range across frames
  • Force range across frames
  • Volume change metrics

Large Trajectory Handling

CatGo uses intelligent loading strategies for large files:

File SizeStrategy
Small (<25 MB text, <50 MB binary)Load all frames into memory
Large (>25 MB text, >50 MB binary)Indexed loading — frames loaded on demand

For indexed trajectories:

  • Frame byte offsets are pre-computed for fast seeking
  • Only the current frame (plus a few prefetched frames) is in memory
  • Plot metadata is extracted without loading full structures

Performance Settings

SettingDefaultDescription
max_frames_in_memory1000Max frames kept in memory
prefetch_frames5Frames pre-loaded ahead of current
chunk_size1000Frames processed at once during parsing
cache_parsed_datatrueCache parsed frames for reuse

Tips

  • Use extXYZ for rich data — The extXYZ format supports per-frame and per-atom properties (energy, forces, stress, charges), which CatGo can plot.
  • Loop playback is enabled by default. Disable it in settings for one-shot viewing.
  • Pause on hover — Enable this setting to automatically pause when you hover over the controls, making it easier to interact with the UI.
  • Hidden elements persist — If you hide an element type, it stays hidden across all frames.

Released under the MIT License.