xnn.common.benchmark.energy.build_e0_lookup#
- xnn.common.benchmark.energy.build_e0_lookup(atomic_energies, species=None, dataset=None)[source]#
Build a
Z-indexed E0 lookup tensor from a configured value.- Parameters:
atomic_energies (Any) – The configured reference energies.
Nonedisables subtraction (returnsNone)."average"/"mean"fits E0s fromdataset. Otherwise a{Z: E0}/{symbol: E0}dict, a list aligned withspecies, a single number, or the string form of any of these (parsed bycoerce_per_species()).species (Any, optional) – Atomic numbers or chemical symbols the values are aligned with, needed only for the list / scalar forms (a dict carries its own species).
dataset (AtomicDataset or torch.utils.data.Subset or None, optional) – Benchmark dataset used to fit E0s when
atomic_energiesis"average".
- Returns:
A lookup tensor of length
MAX_Z, orNonewhen subtraction is disabled.- Return type:
torch.Tensor or None
- Raises:
ValueError – If
"average"is requested without a dataset, or a list/scalar form is given withoutspecies.