Crate metatensor
source ·Expand description
Metatensor
Metatensor is a library providing a specialized data storage format for
atomistic machine learning (think numpy or torch.Tensor, but also
carrying extra metadata for atomistic systems).
The core of the format is implemented in metatensor-core, and exported as a
C API. This C API is then re-exported to Rust in this crate. By default,
metatensor-core is distributed as a shared library that you’ll need to
install separately on end user machines.
Features
You can enable the static feature in Cargo.toml to use a static build of
the C API, removing the need to carry around the metatensor-core shared
library.
[dependencies]
metatensor = {version = "...", features = ["static"]}
Re-exports
- pub use self::errors::Error;
Modules
- Rust definition corresponding to metatensor-core C-API.
- Input/Output facilities for storingTensorMapon disk
Structs
- Reference to a data array in metatensor-core
- Mutable reference to a data array in metatensor-core
- An implementation of theArraytrait without any data.
- Iterator over parameter/TensorBlockRefpairs for all gradients in aTensorBlockRef
- Iterator over parameter/TensorBlockRefMutpairs for all gradients in aTensorBlockRefMut
- A single value inside a label.
- A set of labels used to carry metadata associated with a tensor map.
- Builder forLabels
- Iterator over entries in a set ofLabelsas fixed size arrays
- Iterator overLabelsentries
- Lazily accessed metadata inside aTensorBlock
- A single block, containing both values & optionally gradients of these values w.r.t. any relevant quantity.
- Reference to aTensorBlock
- Mutable reference to aTensorBlock
- TensorMapis the main user-facing struct of this library, and can store any kind of data used in atomistic machine learning.
- Iterator over key/block pairs in aTensorMap
- Iterator over key/block pairs in aTensorMap, with mutable access to the blocks
Traits
- The Array trait is used by metatensor to manage different kind of data array with a single API. Metatensor only knows aboutBox<dyn Array>, and manipulate the data through the functions on this trait.
Functions
- Path where the metatensor shared library has been built