Automation Interfaces

9.1 CLI (automation/cli)

  • automation/cli/src/main.rs defines the OrbitronCli struct with Clap. Key subcommands:
    • info: prints metadata/JSON summary (OrbitronServices::analyzer).
    • select: compiles a DSL expression and prints matching atom IDs.
    • analyze: groups specialised analysis modules (geometry, population, frequencies).
    • view: launches the GUI (--features gui) or TUI (--tui) viewer, accepts --freq for vibrational data, --select for initial highlights, and --blank to open an empty session.
    • convert, inspect, measure, batch: wrap exporter, task summary, and measurement utilities.
    • smiles, inchi: emit canonical chemical identifiers.
    • render: produce headless image renders.
  • Global flags configure logging, periodic boundary conditions, remote data source, and optional conda-aware environment hints. The CLI activates tracing via tracing_subscriber::EnvFilter and loads OrbitronConfig before merging command-line overrides; environment variables still take precedence if present.

9.2 Terminal UI (automation/tui)

  • Provides a ncurses-style inspector that shares loader/selection logic with the GUI.
  • state.rs holds data similar to UiState but tailored to terminal interactions (panels, filters, selection buffer).
  • Rendering flows through render.rs and panels.rs, which draw textual tables and measurement readouts. Input handling lives in input.rs, translating key events into actions dispatched to analysis.rs and panels.rs.
  • The TUI is especially useful for remote/headless servers where a GPU backend is unavailable; it reuses OrbitronServices with Backend::Headless.