Prediction

class mlip.typing.prediction.Prediction(energy: float | Array | ndarray | bool | number | bool | int | complex | None = None, forces: float | Array | ndarray | bool | number | bool | int | complex | None = None, hessian: float | Array | ndarray | bool | number | bool | int | complex | None = None, stress: float | Array | ndarray | bool | number | bool | int | complex | None = None, pressure: float | Array | ndarray | bool | number | bool | int | complex | None = None, partial_charges: float | Array | ndarray | bool | number | bool | int | complex | None = None)

Holds data that is a prediction of an MLIP force field model.

As default, everything is None, such that this class can be initialized with any property missing. Units will always be eV for energies and Angstrom for length.

energy

The energy or energies (if multiple graphs in a batch). Can be just a single float or array of shape (n_graphs,).

Type:

float | jax.Array | numpy.ndarray | numpy.bool | numpy.number | bool | int | complex | None

forces

The forces. Will be of shape (n_nodes, 3).

Type:

float | jax.Array | numpy.ndarray | numpy.bool | numpy.number | bool | int | complex | None

hessian

The energy Hessian. Will be of shape (n_nodes, 3, n_nodes, 3) when performing an iterative Hessian calculation (this is the case at inference time), and of shape (n_nodes, R, 3) where R = max(n_atoms_per_graph) * 3 when predicting the (subsampled) Hessian in a single backward pass (only used during training and not inference).

Type:

float | jax.Array | numpy.ndarray | numpy.bool | numpy.number | bool | int | complex | None

stress

The stress tensor. Will be of shape (n_graphs, 3, 3).

Type:

float | jax.Array | numpy.ndarray | numpy.bool | numpy.number | bool | int | complex | None

pressure

The microscopic 0K pressure term. Will be of shape (n_graphs,).

Type:

float | jax.Array | numpy.ndarray | numpy.bool | numpy.number | bool | int | complex | None

partial_charges

The partial charges. Will be of shape (n_nodes,).

Type:

float | jax.Array | numpy.ndarray | numpy.bool | numpy.number | bool | int | complex | None