Core classes

These pages explains the main classes and core concepts you need to understand to use metatensor, without tying it to how a specific library is using metatensor to store it’s own data.

🔬 Core classes overview

Explore the core types of metatensor: TensorMap, TensorBlock and Labels, and how they are used to store data, metadata and gradients of the data together.

Overview
💡 Tutorials

Learn how to use the core classes with Python code examples, and improve your understanding of data and metadata storage with metatensor.

Tutorials

Metatensor main classes are available from multiple languages, all documented below.

Python Python API reference

Read the documentation for all the classes and functions in the metatensor and metatensor-core Python packages.

Python API reference
C++ C++ API reference

Read the documentation for all the classes and functions provided by the metatensor C++ API in the metatensor.hpp header.

C++ API reference
C C API reference

Read the documentation for all the types and functions provided by the metatensor C API in the metatensor.h header.

C API reference
Rust Rust API reference

Read the documentation for all the types and functions provided by the metatensor Rust API in the metatensor crate.

Rust API reference