xnn.common.finetune.reference.predict_energies#

xnn.common.finetune.reference.predict_energies(model, structures, batch_size=32, device=None)[source]#

Energies model predicts for structures, float64 (n,).

Parameters:
  • model (torch.nn.Module) – A potential (bare or wrapped in ForceStressOutput); its cutoff builds the neighbor lists.

  • structures (iterable of dict or AtomicDataset) – The structures.

  • batch_size (int, optional) – Structures per forward pass, by default 32.

  • device (torch.device, optional) – Where to evaluate; by default where the model’s parameters are.

Return type:

Tensor