agedi.api.prediction¶
Force-field prediction using a trained regressor.
Functions¶
|
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 aregressor_modelattached). The predicted energy and forces are attached to the returnedAtomsobjects via anSinglePointCalculator.- Parameters:
diffusion – A trained
Agedimodel with a force-field regressor (trained with--force_field).structures – Input ASE
Atomsobjects 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
SinglePointCalculatorattached containing the predicted energy and/or forces.- Return type:
List[Atoms]
- Raises:
ValueError – If the model does not have a force-field regressor.