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 metatensor_sys as c_api;
Modules§
- errors
- io
- Input/Output facilities for storing
crate::TensorMap
andcrate::Labels
on disk
Structs§
- Array
Ref - Reference to a data array in metatensor-core
- Array
RefMut - Mutable reference to a data array in metatensor-core
- Empty
Array - An implementation of the
Array
trait without any data. - Error
- Error type used in metatensor
- Gradients
Iter - Iterator over parameter/
TensorBlockRef
pairs for all gradients in aTensorBlockRef
- Gradients
MutIter - Iterator over parameter/
TensorBlockRefMut
pairs for all gradients in aTensorBlockRefMut
- Label
Value - A single value inside a label.
- Labels
- A set of labels used to carry metadata associated with a tensor map.
- Labels
Builder - Builder for
Labels
- Labels
Fixed Size Iter - Iterator over entries in a set of
Labels
as fixed size arrays - Labels
Iter - iterator over
Labels
entries - Lazy
Metadata - Lazily accessed metadata inside a
TensorBlock
- Tensor
Block - A single block, containing both values & optionally gradients of these values w.r.t. any relevant quantity.
- Tensor
Block Data - All the basic data in a
TensorBlockRef
as a struct with separate fields. - Tensor
Block Data Mut - All the basic data in a
TensorBlockRefMut
as a struct with separate fields. - Tensor
Block Ref - Reference to a
TensorBlock
- Tensor
Block RefMut - Mutable reference to a
TensorBlock
- Tensor
Map TensorMap
is the main user-facing struct of this library, and can store any kind of data used in atomistic machine learning.- Tensor
MapIter - Iterator over key/block pairs in a
TensorMap
- Tensor
MapIter Mut - Iterator over key/block pairs in a
TensorMap
, with mutable access to the blocks
Traits§
- Array
- The Array trait is used by metatensor to manage different kind of data array
with a single API. Metatensor only knows about
Box<dyn Array>
, and manipulate the data through the functions on this trait.