{"id":23613759,"url":"https://github.com/metatensor/metatrain","last_synced_at":"2026-01-12T10:58:59.725Z","repository":{"id":208258343,"uuid":"721195384","full_name":"metatensor/metatrain","owner":"metatensor","description":"Train, fine-tune, and manipulate machine learning models for atomistic systems","archived":false,"fork":false,"pushed_at":"2025-12-25T18:40:38.000Z","size":279902,"stargazers_count":50,"open_issues_count":91,"forks_count":19,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-12-26T12:39:05.033Z","etag":null,"topics":["atomistic-simulations","machine-learning","molecular-dynamics","torch"],"latest_commit_sha":null,"homepage":"http://docs.metatensor.org/metatrain/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metatensor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-11-20T14:51:11.000Z","updated_at":"2025-12-17T12:18:05.000Z","dependencies_parsed_at":"2024-05-02T13:37:07.109Z","dependency_job_id":"496b03a6-65fa-4929-83c6-976f60bd51ae","html_url":"https://github.com/metatensor/metatrain","commit_stats":null,"previous_names":["lab-cosmo/metatensor-models","lab-cosmo/metatrain","metatensor/metatrain"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/metatensor/metatrain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metatensor%2Fmetatrain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metatensor%2Fmetatrain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metatensor%2Fmetatrain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metatensor%2Fmetatrain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metatensor","download_url":"https://codeload.github.com/metatensor/metatrain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metatensor%2Fmetatrain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atomistic-simulations","machine-learning","molecular-dynamics","torch"],"created_at":"2024-12-27T17:25:42.321Z","updated_at":"2026-01-12T10:58:59.720Z","avatar_url":"https://github.com/metatensor.png","language":"Python","funding_links":[],"categories":["Interatomic Potentials (ML-IAP)"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/metatensor/metatrain/refs/heads/main/docs/src/logo/metatrain-horizontal-dark.svg\" alt=\"Metatensor logo\" width=\"600\"/\u003e\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003e\n\n[![tests status](https://img.shields.io/github/checks-status/metatensor/metatrain/main)](https://github.com/metatensor/metatrain/actions?query=branch%3Amain)\n[![documentation](https://img.shields.io/badge/📚_documentation-latest-sucess)](https://metatensor.github.io/metatrain)\n[![coverage](https://codecov.io/gh/metatensor/metatrain/branch/main/graph/badge.svg)](https://codecov.io/gh/metatensor/metatrain)\n\u003c/h4\u003e\n\n\u003c!-- marker-introduction --\u003e\n\n`metatrain` is a command line interface (CLI) to **train** and **evaluate** atomistic\nmodels of various architectures. It features a common `yaml` option inputs to configure\ntraining and evaluation. Trained models are exported as standalone files that can be\nused directly in various molecular dynamics (MD) engines (e.g. `LAMMPS`, `i-PI`, `ASE`\n...) using the [metatomic](https://docs.metatensor.org/metatomic) interface.\n\nThe idea behind `metatrain` is to have a general hub that provides a homogeneous\nenvironment and user interface, transforming every ML architecture into an end-to-end\nmodel that can be connected to an MD engine. Any custom architecture compatible with\n[TorchScript](https://pytorch.org/docs/stable/jit.html) can be integrated into\n`metatrain`, gaining automatic access to a training and evaluation interface, as well as\ncompatibility with various MD engines.\n\n\u003e **Note**: `metatrain` does not provide mathematical functionalities *per se*, but\n\u003e relies on external models that implement the various architectures.\n\n\u003c!-- marker-architectures --\u003e\n\n# List of Implemented Architectures\n\nCurrently `metatrain` supports the following architectures for building an atomistic\nmodel (sorted by alphabetic order):\n\n| Name                     | Description                                                                                                                          |\n|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| FlashMD                  | An architecture for the direct prediction of molecular dynamics                                                                      |\n| GAP                      | Sparse Gaussian Approximation Potential (GAP) using Smooth Overlap of Atomic Positions (SOAP).                                       |\n| MACE                     | A higher order equivariant message passing neural network.                                                                           |\n| NanoPET *(deprecated)*   | Re-implementation of the original PET with slightly improved training and evaluation speed                                           |\n| PET                      | Point Edge Transformer (PET), interatomic machine learning potential                                                                 |\n| SOAP BPNN                | A Behler-Parrinello neural network with SOAP features                                                                                |\n\n\u003c!-- marker-documentation --\u003e\n\n# Documentation\n\nFor details, tutorials, and examples, please visit our\n[documentation](https://metatensor.github.io/metatrain/latest/).\n\n\u003c!-- marker-installation --\u003e\n\n# Installation\n\nInstall `metatrain` with pip:\n\n```bash\npip install metatrain\n```\n\nInstall specific models by specifying the model name. For example, to install the SOAP-BPNN model:\n\n```bash\npip install metatrain[soap-bpnn]\n```\n\nWe also offer a conda installation:\n\n```bash\nconda install -c conda-forge metatrain\n```\n\n\u003e ⚠️ The conda installation does not install model-specific dependencies and will only\n\u003e work for architectures without optional dependencies such as PET.\n\nAfter installation, you can use mtt from the command line to train your models!\n\n\u003c!-- marker-quickstart --\u003e\n\n# Quickstart\n\nTo train a model, use the following command:\n\n```bash\nmtt train options.yaml\n```\n\nWhere options.yaml is a configuration file specifying training options. For example, the\nfollowing configuration trains a *SOAP-BPNN* model on the QM9 dataset:\n\n```yaml\n# architecture used to train the model\narchitecture:\n  name: soap_bpnn\ntraining:\n  num_epochs: 5  # a very short training run\n\n# Mandatory section defining the parameters for system and target data of the training set\ntraining_set:\n  systems: \"qm9_reduced_100.xyz\"  # file where the positions are stored\n  targets:\n    energy:\n      key: \"U0\"      # name of the target value\n      unit: \"eV\"     # unit of the target value\n\ntest_set: 0.1        # 10% of the training_set are randomly split for test\nvalidation_set: 0.1  # 10% of the training_set are randomly split for validation\n```\n\n\u003c!-- marker-shell --\u003e\n\n# Shell Completion\n\n`metatrain` comes with completion definitions for its commands for bash and zsh. You\nmust manually configure your shell to enable completion support.\n\nTo make the completions available, source the definitions in your shell’s startup file\n(e.g., `~/.bash_profile`, `~/.zshrc`, or `~/.profile`):\n\n```bash\nsource $(mtt --shell-completion)\n```\n\n\u003c!-- marker-issues --\u003e\n\n# Having problems or ideas?\n\nHaving a problem with metatrain? Please let us know by submitting an issue.\n\nSubmit new features or bug fixes through a pull request.\n\n\u003c!-- marker-contributing --\u003e\n\n# Contributors\n\nThanks goes to all people who make metatrain possible:\n\n[![Contributors](https://contrib.rocks/image?repo=metatensor/metatrain)](https://github.com/metatensor/metatrain/graphs/contributors)\n\n# Citing metatrain\n\nIf you found ``metatrain`` useful, you can cite its pre-print\n(\u003chttps://doi.org/10.48550/arXiv.2508.15704\u003e) as\n\n```\n@misc{metatrain,\ntitle = {Metatensor and Metatomic: Foundational Libraries for Interoperable Atomistic\nMachine Learning},\nshorttitle = {Metatensor and Metatomic},\nauthor = {Bigi, Filippo and Abbott, Joseph W. and Loche, Philip and Mazitov, Arslan\nand Tisi, Davide and Langer, Marcel F. and Goscinski, Alexander and Pegolo, Paolo\nand Chong, Sanggyu and Goswami, Rohit and Chorna, Sofiia and Kellner, Matthias and\nCeriotti, Michele and Fraux, Guillaume},\nyear = {2025},\nmonth = aug,\npublisher = {arXiv},\ndoi = {10.48550/arXiv.2508.15704},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetatensor%2Fmetatrain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetatensor%2Fmetatrain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetatensor%2Fmetatrain/lists"}