Skip to content

perf: accumulate ANI2xt forward energies in float64 (draft — needs torchani verification)#96

Draft
isayev wants to merge 1 commit into
mainfrom
perf/ani2xt-fp64
Draft

perf: accumulate ANI2xt forward energies in float64 (draft — needs torchani verification)#96
isayev wants to merge 1 commit into
mainfrom
perf/ani2xt-fp64

Conversation

@isayev

@isayev isayev commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Workstream W8 (lowest priority, cosmetic). Draft — see verification caveat.

ANI2xt's energy_shifts buffer is float64 but the forward accumulated atom_energies/self_energies in float32, immediately downcasting it. This accumulates them in float64 so the buffer is used at full precision and absolute energies are clean. The AEV and per-element networks stay float32.

This does NOT change conformer rankings — per-atom self-energies depend only on atom counts and cancel exactly in energy differences within a molecule (confirmed by the round-3 analysis). It only cleans up absolute energies.

⚠️ Verification caveat

I could not verify this locally: torchani (required even to construct ANI2xt) is not installed in the dev environment, and no fast test exercises this forward. Dtype-promotion and import were checked (f32 networks + f64 self-energies → f64 total; module imports clean), but the actual energy values were not run. Do not merge until the CI [ani] job (or a maintainer with torchani) runs the ANI2xt SPE/thermo tests and confirms energies are unchanged within tolerance. Kept as a draft for that reason. Low value — fine to close if not worth the verification effort.

… energies)

The energy_shifts buffer is float64 but the forward accumulated atom_energies /
self_energies in float32 (coords dtype), immediately downcasting it. Accumulate
in float64 so the buffer is used at full precision and absolute energies are
clean. Ranking is unchanged: per-atom self-energies depend only on atom counts
and cancel exactly in conformer energy differences. The AEV and per-element
networks remain float32.

NOTE: cannot be verified in this environment (torchani, required to construct
ANI2xt, is not installed and no fast test exercises this forward). Gated on the
CI [ani] job / a torchani-equipped review before merge -- hence draft.
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