Skip to content

Single-structure UMA runs use fairchem's default inference settings - #52

Merged
niklashoelter merged 1 commit into
masterfrom
feat/single-structure-default-inference
Oct 28, 2026
Merged

niklashoelter merged 1 commit into
masterfrom
feat/single-structure-default-inference

Conversation

@niklashoelter

Copy link
Copy Markdown
Owner

Single-structure UMA runs (optimize, smiles, or optimize_single_structure without a calculator) now load the Fairchem calculator with fairchem's default inference settings. Sequential runs over many structures keep "batch".

Why

Benchmark on catalyst (Quadro RTX 6000), d4rev, single ASE optimizations:

Run "batch" default settings
ibuprofen, first 54 s 43 s
ibuprofen, same molecule again 39 s 10.8 s
atorvastatin 202–219 s 159–169 s
12 different molecules in a row (sequential) 27 s 56–61 s

Energies agree within 0.1 meV. The default settings are faster while the composition stays the same, but they drop their compiled model at every new composition. That is why sequential runs keep "batch".

Changes

  • load_calculator(config, single_structure=False): single_structure=True selects fairchem's default settings for Fairchem and is ignored by ORB and SevenNet.
  • optimize_single_structure requests the single-structure calculator when it loads one itself. _optimize_sequential keeps the shared "batch" calculator.
  • The calculator cache keys on the flag for Fairchem only, so ORB and SevenNet still load one model.

Testing

  • Full suite: 776 passed, 1 skipped.
  • New tests cover the loader settings for both loaders and both modes, which calculator each path requests, and that ORB loads once.
  • gpuma optimize --smiles <ibuprofen> with the default d4rev model on cuda:3 returned ok and converged: true. fairchem logs that it runs in a reduced-precision (TF32) mode; on these Turing GPUs that has no numerical effect.

optimize/smiles (one structure) now load the Fairchem calculator with
fairchem's default settings, which are faster for one long optimization.
Sequential runs over many structures keep "batch", since the default
settings drop their compiled model at every new composition. ORB and
SevenNet share one cached calculator for both cases.
@niklashoelter
niklashoelter merged commit a7929cf into master Oct 28, 2026
1 check passed
@niklashoelter
niklashoelter deleted the feat/single-structure-default-inference branch October 28, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant