predict_gap#
- mbgdml.predictors.predict_gap(Z, R, entity_ids, entity_combs, model, periodic_cell, **kwargs)[source]#
Predict total \(n\)-body energy and forces of a single structure.
- Parameters:
Z (
numpy.ndarray, ndim:1) – Atomic numbers of all atoms inr(in the same order).R (
numpy.ndarray, ndim:2) – Cartesian coordinates of a single structure to predict.entity_ids (
numpy.ndarray, ndim:1) – 1D array specifying which atoms belong to which entities.entity_combs (
iterable) – Entity ID combinations (e.g.,(53,),(0, 2),(32, 55, 293), etc.) to predict using this model. These are used to slicerwithentity_ids.model (
mbgdml.models.gapModel) – GAP model containing all information need to make predictions.periodic_cell (
mbgdml.periodic.Cell, default:None) – Use periodic boundary conditions defined by this object.
- Returns:
float– Predicted \(n\)-body energy.numpy.ndarray– Predicted \(n\)-body forces.