xnn.common.finetune.reference.set_atomic_energies#
- xnn.common.finetune.reference.set_atomic_energies(model, values)[source]#
Set the per-element reference energies of a model.
- Parameters:
model (torch.nn.Module) – A potential (see
get_atomic_energies()for the supported conventions).values (mapping or sequence) –
{Z: E0}with atomic numbers or chemical symbols as keys, or one value per entry of the model’sspecies.
- Raises:
ValueError – If a sequence does not match the model’s species, or an element is outside the model’s reference table.
- Return type:
None