Installation¶
Install metatrain
with pip:
pip install metatrain
Install specific models by specifying the model name. For example, to install the SOAP-BPNN model:
pip install metatrain[soap-bpnn]
We also offer a conda installation:
conda install -c conda-forge metatrain
⚠️ The conda installation does not install model-specific dependencies and will only work for architectures without optional dependencies such as NanoPET or PET.
After installation, you can use mtt from the command line to train your models!
Quickstart¶
To train a model, use the following command:
mtt train options.yaml
Where options.yaml is a configuration file specifying training options. For example, the following configuration trains a SOAP-BPNN model on the QM9 dataset:
# architecture used to train the model
architecture:
name: soap_bpnn
training:
num_epochs: 5 # a very short training run
# Mandatory section defining the parameters for system and target data of the training set
training_set:
systems: "qm9_reduced_100.xyz" # file where the positions are stored
targets:
energy:
key: "U0" # name of the target value
unit: "eV" # unit of the target value
test_set: 0.1 # 10% of the training_set are randomly split for test
validation_set: 0.1 # 10% of the training_set are randomly split for validation
Shell Completion¶
metatrain
comes with completion definitions for its commands for bash and zsh. You
must manually configure your shell to enable completion support.
To make the completions available, source the definitions in your shell’s startup file
(e.g., ~/.bash_profile
, ~/.zshrc
, or ~/.profile
):
source $(mtt --shell-completion)