Skip to content

Settings

Unified settings schema with 40+ configurable properties that apply across all deployment targets.

Source: src/lib/settings.ts

Overview

All configurable options are defined in a central settings.ts file with types, descriptions, min/max values, and defaults. The same schema is used by the web app, VSCode extension, desktop app, and Jupyter widget.

Settings by Category

Atom Display

SettingTypeDefaultDescription
atom_radiusnumber0.4Atom sphere radius (A)
sphere_segmentsnumber16Sphere quality (more = smoother)
color_modestring"element"Coloring: element, coordination, wyckoff, custom
color_scalestring"Jmol"Color scale for element coloring
show_image_atomsbooleantrueDisplay PBC image atoms

Bond Display

SettingTypeDefaultDescription
show_bondsbooleantrueDisplay bonds
bond_thicknessnumber0.15Bond cylinder radius
bonding_strategystring"distance"Strategy: distance, electronegativity, VESTA

Labels

SettingTypeDefaultDescription
show_site_labelsbooleanfalseDisplay atom labels
show_indicesbooleanfalseShow atom index numbers
label_colorstring"white"Label text color
label_sizenumber14Label font size (px)
label_offsetnumber[][0, 0]Label position offset

Camera

SettingTypeDefaultDescription
camera_projectionstring"perspective"Projection: perspective, orthographic
camera_fovnumber50Field of view (degrees)
zoom_minnumber1Minimum zoom distance
zoom_maxnumber1000Maximum zoom distance
rotation_dampingnumber0.2Rotation smoothing factor
auto_rotatebooleanfalseAuto-rotation mode

Lattice / Cell

SettingTypeDefaultDescription
show_cellbooleantrueDisplay unit cell wireframe
show_cell_vectorsbooleantrueDisplay lattice vector arrows
cell_opacitynumber1.0Cell edge opacity

Lighting

SettingTypeDefaultDescription
ambient_lightnumber0.5Ambient light intensity
directional_lightnumber0.8Directional light intensity
depth_cueingnumber0Fog effect strength (0 = off)

Controls

SettingTypeDefaultDescription
rotation_speednumber1.0Mouse rotation sensitivity
zoom_speednumber1.0Scroll zoom sensitivity
pan_speednumber1.0Middle-click pan sensitivity

Trajectory

SettingTypeDefaultDescription
trajectory_fpsnumber10Playback speed (frames/second)
trajectory_auto_playbooleanfalseAuto-play on load
trajectory_display_modestring"structure"Layout mode

Symmetry

SettingTypeDefaultDescription
symprecnumber0.01Symmetry tolerance (A)
symmetry_algorithmstring"moyo"Backend: moyo, spglib

Atom Manipulation

SettingTypeDefaultDescription
keyboard_step_sizenumber0.1Arrow key move distance (A)
frozen_atom_indicatorstring"ring"Visual: ring, crosshatch, dimmed

Platform Contexts

Settings can be scoped to specific deployment contexts:

ContextDescription
webBrowser-based web app
editorVSCode extension
notebookJupyter / Marimo widget
allApplies everywhere (default)

Settings Schema

Each setting is defined with:

typescript
{
  key: string           // Setting identifier
  type: "number" | "string" | "boolean"
  default: any          // Default value
  description: string   // Human-readable description
  min?: number          // Minimum (for numbers)
  max?: number          // Maximum (for numbers)
  options?: string[]    // Valid values (for enums)
  context?: string[]    // Platform contexts
}

Persistence

  • Web app — settings stored in localStorage
  • Desktop app — settings persisted via Tauri IPC (survives restarts)
  • VSCode — settings in VSCode workspace/user config
  • Jupyter — settings passed as widget props

Released under the MIT License.