agedi.api.prediction

Force-field prediction using a trained regressor.

Functions

predict(→ List[ase.Atoms])

Predict energies and forces for input structures using a trained force-field.

Module Contents

agedi.api.prediction.predict(diffusion: Agedi, structures: Sequence[ase.Atoms], *, batch_size: int = 64, cutoff: float | None = None) List[ase.Atoms]

Predict energies and forces for input structures using a trained force-field.

The model must have been trained with force_field=True (i.e. it must have a regressor_model attached). The predicted energy and forces are attached to the returned Atoms objects via an SinglePointCalculator.

Parameters:
  • diffusion – A trained Agedi model with a force-field regressor (trained with --force_field).

  • structures – Input ASE Atoms objects to run predictions on.

  • batch_size – Number of structures per inference batch. Defaults to 64.

  • cutoff – Neighbour-list cutoff in Å. When None (default), the cutoff is read from the model’s representation automatically.

Returns:

The input structures with a SinglePointCalculator attached containing the predicted energy and/or forces.

Return type:

List[Atoms]

Raises:

ValueError – If the model does not have a force-field regressor.