User guide

Getting started

The mlip library consists of multiple submodules targeted towards different parts of a complete MLIP pipeline:

  • data: Code related to dataset reading and preprocessing. Its main purpose is to go from datasets stored on a file system to instances of GraphDataset that can be directly used for training or batched inference tasks.

  • models: Code related to the MLIP models, which can be wrapped as ForceField objects for easy interfacing with other mlip submodules like training or simulation. This module also contains the loss definition and utilities for parameter loading of trained models.

  • training: Code related to training MLIP models. The main class for this task is the TrainingLoop.

  • simulation: Code related to running MD simulations or energy minimizations with MLIP models. We support the JAX-MD and ASE backends.

  • inference: Code related to running batched inference. See this section for more information.

  • utils: Utility functions used in different modules.

Each of these modules is designed to allow a user to set up their own experiment scripts or notebooks with minimal effort, while also supporting customization, especially for topics such as logging (e.g., to a remote storage location like S3 or GCS) or adding new losses, MLIP model architectures, or dataset readers for customized data preprocessing.

We provide some example Jupyter notebooks as tutorials to help you with the onboarding process to the library. Furthermore, we provide in-depth tutorials for each of the four main modules of the library along with some other more advanced topics.

Jupyter Notebook Tutorials

We provide Jupyter notebooks with example code that may serve as templates to build your own more complex MLIP pipelines. These can be used alongside the deep-dive tutorials below to help you with getting onboarded to the mlip library. These tutorials can be found in the GitHub repository:

To run the tutorials, just install Jupyter notebooks via pip and launch it from a directory that contains the notebooks:

pip install notebook && jupyter notebook

The installation of mlip itself is included within the notebooks. We recommend to run these notebooks with GPU acceleration enabled.

Deep-dive Tutorials

Follow the links below for more in-depth tutorials for each of the available tasks supported by the library.