Standard model outputs¶
In order for multiple simulation engines to be able to exploit atomic properties computing by arbitrary metatensor atomistic models, we need all the models to return data with specific metadata. If your model returns one of the output defined in this documentation, then the model should follow the metadata structure described here.
For other kind of output, you are free to use any relevant metadata structure, but if multiple people are producing the same kind of outputs, they are encouraged to come together, define the metadata they need and add a new section to this page.
Energy¶
Energy is associated with the "energy"
key in the model outputs, and must
have the following metadata:
Metadata |
Names |
Description |
---|---|---|
keys |
|
the energy keys must have a single dimension named |
samples |
|
if doing
|
components |
the energy must not have any components |
|
properties |
|
the energy must have a single property dimension named |
Energy gradients¶
Most of the time when writing an atomistic model compatible with metatensor, gradients will be handled implicitly and computed by the simulation engine using a backward pass. Additionally, it is possible for the model to support explicit, forward mode gradients
The following gradients can be defined and requested with
explicit_gradients
:
“positions” (\(r_j\)) gradients will contain the negative of the forces \(F_j\).
\[\frac{\partial E}{\partial r_j} = -F_j\]
Metadata |
Names |
Description |
---|---|---|
samples |
|
|
components |
|
there must be a single component named |
“strain” (\(\epsilon\)) gradients will contain the stress \(\sigma\) acting on the system, multiplied by the volume \(V\) (sometimes also called the virial of this system)
\[\frac{\partial E}{\partial \epsilon} = V \sigma\]
Metadata |
Names |
Description |
---|---|---|
samples |
|
There is a single gradient sample dimension, |
components |
|
Both |
Energy ensemble¶
An ensemble of energies is associated with the "energy_ensemble"
key in the
model outputs. Such ensembles are sometimes used to perform uncertainty
quantification, using multiple prediction to estimate an error on the mean
prediction.
Energy ensembles must have the following metadata:
Metadata |
Names |
Description |
---|---|---|
keys |
same as Energy |
same as Energy |
samples |
same as Energy |
same as Energy |
components |
same as Energy |
same as Energy |
properties |
|
the energy ensemble must have a single property dimension named
|
Energy ensemble gradients¶
The gradient metadata for energy ensemble is the same as for the energy
output (see Energy gradients).
Features¶
Features are numerical vectors representing a given structure or atom/atom-centered environment in an abstract n-dimensional space. They are also sometimes called descriptors, representations, embedding, etc.
Features can be computed with some analytical expression (for example SOAP power spectrum, atom-centered symmetry functions, …), or learned internally by a neural-network or a similar architecture.
In metatensor atomistic models, they are associated with the "features"
key
in the model outputs, and must adhere to the following metadata:
Metadata |
Names |
Description |
---|---|---|
keys |
|
the features keys must have a single dimension named |
samples |
|
the samples should be named The |
components |
the features must not have any components. |
|
properties |
the features can have arbitrary properties. |
Note
Features are typically handled without a unit, so the "unit"
field of
metatensor.torch.atomistic.ModelOutput()
is mainly left empty.
Features gradients¶
As for the energy, features are typically used with automatic gradient differentiation. Explicit gradients could be allowed if you have a use case for them, but are currently not until they are fully specified.