- Loading:
OrbitronServices::loader() wraps the IO pipeline (io/pipelines/src/lib.rs) to parse source files into SceneGraph instances. The loader records provenance tags and infers covalent bonds via orbitron_backbone::infer_covalent_bonds.
- Scene Backbone:
SceneGraph (immutable, persistent) stores snapshots of atoms, bonds, trajectories, and metadata. The GUI and CLI work exclusively against SceneGraph plus derived render data (RenderSceneData).
- Query & Selection: Expressions parsed by
orbitron-query::parse_expression are evaluated via SelectionProgram inside orbitron-selection-engine. Cached outputs and selection scoring drive the viewer highlights and CLI results.
- Rendering:
orbitron-render::Renderer translates RenderSceneData into GPU draw commands (instanced atoms/bonds, text overlays). Camera control lives in ui/shell/src/camera.rs, but the renderer crate is UI-agnostic.
- Services Layer:
OrbitronServices coordinates loader/analyzer/exporter/renderer operations and abstracts data sources (local or remote). Automation crates and the UI instantiate services instead of touching IO pipelines directly.
- Frontends: The GUI viewer (
ui/shell) embeds the renderer and services within an egui event loop (viewer_loop::ViewerLoop). The CLI and TUI use the same services for headless workflows. Remote file access is just another DataSource (SftpDataSource), so every frontend browses and loads remote files through the same services API.
- External APIs: Downstream tools integrate via
OrbitronServices (Rust), the Python bridge (Orbitron class), or remote SSH/SFTP file access. These surfaces share identical behaviours, so features added in core crates automatically propagate to CLI, GUI, Python, and remote consumers.