rgpycrumbs.uma._prepare

Look up a UMA AOTI package, or export it on a miss.

The Click CLI lives in prepare_aoti.py; this is the library path.

Attributes

Classes

Functions

resolve_exporter(→ pathlib.Path)

Locate rgpot scripts/export_uma_aoti.py.

exporter_command(→ list[str])

prepare_uma_aoti(→ Prepared)

Return the package for this system, exporting it on a miss.

Module Contents

rgpycrumbs.uma._prepare.EXPORTER_EXIT[source]
rgpycrumbs.uma._prepare.resolve_exporter(explicit: str | os.PathLike[str] | None = None) → pathlib.Path[source]

Locate rgpot scripts/export_uma_aoti.py.

Order: explicit, $RGPOT_EXPORT_UMA, PATH, then scripts/export_uma_aoti.py in the working directory or a parent (an rgpot checkout).

class rgpycrumbs.uma._prepare.Prepared[source]

Outcome of prepare_uma_aoti().

path: pathlib.Path[source]
key: rgpycrumbs.uma._key.AotiKey[source]
hit: bool[source]
compile_seconds: float | None = None[source]
command: list[str] = [][source]
rgpycrumbs.uma._prepare.exporter_command(key: rgpycrumbs.uma._key.AotiKey, *, python: str, exporter: pathlib.Path, atoms_path: pathlib.Path, device: str, out: pathlib.Path) → list[str][source]
rgpycrumbs.uma._prepare.prepare_uma_aoti(atomic_numbers: collections.abc.Iterable[int], *, charge: int = 0, spin: int | None = None, task: str = 'omol', model: str = 'uma-s-1p1', device: str = 'cpu', molecular_box: float = 0.0, batch_max: int = 0, cache_dir: pathlib.Path | None = None, atoms_path: pathlib.Path | None = None, exporter: pathlib.Path | None = None, python: str | None = None, env: rgpycrumbs.uma._key.ExportEnv | None = None, force: bool = False, dry_run: bool = False) → Prepared[source]

Return the package for this system, exporting it on a miss.

spin=None derives the minimal multiplicity from electron parity. python is the interpreter that runs the exporter (default: this one) and env its probed compiler side (default: probe it). A miss takes the key’s lock, so concurrent callers for one key run the exporter once and the rest return its package. The finished package is checked against the key through its embedded metadata before it is installed.