Skip to content

Optional output targets

Status: Accepted.

Contract

Native frames and batches need no converter. ASE, metatomic and torch-sim are first-class optional targets, exposed through oxyz.ase, oxyz.metatomic and oxyz.torch_sim with installation extras ase, metatomic and torch-sim. Remote S3 access uses the separate s3 extra. Base runtime dependencies are NumPy and PyYAML, not these target libraries.

Root package imports must not eagerly import converter libraries. Importing a target without its dependencies raises an informative ImportError naming the extra rather than silently substituting a different output. The core remains unaware of target-library fields, tensors, devices and conventions.

Rationale and trade-offs

Optional extras let users keep a small environment while installing a specific integration deliberately. A dedicated converter owns its target's field mapping, shape restrictions and error surface; shared helpers avoid duplicating common conversion logic without pushing that policy into Rust parsing.

Each target needs its own parity/golden tests and dependency guards. A full development installation cannot alone prove isolation: tests must also exercise missing dependencies and wheel installations with incomplete extras. Targets may reject a native frame that their own representation cannot express; no fake fallback should hide that mismatch.

Evidence

See testing for isolated tiers and lossless core and layering for the shared model.