Skip to main content

MatterSim: A Deep Learning Atomistic Model Across Elements, Temperatures and Pressures.

Project description

MatterSim logo

arXiv Requires Python 3.9+ PyPI Downloads

MatterSim is a deep learning atomistic model across elements, temperatures and pressures.

Documentation

This README provides a quick start guide. For more comprehensive information, please refer to the MatterSim documentation.

Installation

Prerequisite

  • Python >= 3.9

Install from PyPI

[!TIP] While not mandatory, we recommend creating a clean conda environment before installing MatterSim to avoid potential package conflicts. You can create and activate a conda environment with the following commands:

# create the environment
conda create -n mattersim python=3.9

# activate the environment
conda activate mattersim

Although MatterSim can be installed with Python > 3.9, we recommend using Python == 3.9 for optimal compatibility.

To install MatterSim, use the following command. Please note that downloading the dependencies may take some time:

pip install mattersim

In case you want to install the package with the latest version, you can run the following command:

pip install git+https://github.com/microsoft/mattersim.git

Install from source code

  1. Download the source code of MatterSim and change to the directory
git clone git@github.com:microsoft/mattersim.git
cd mattersim
  1. Install MatterSim

[!WARNING] We strongly recommend that users install MatterSim using mamba or micromamba, because conda can be significantly slower when resolving the dependencies in environment.yaml.

To install the package, run the following command under the root of the folder:

mamba env create -f environment.yaml
mamba activate mattersim
uv pip install -e .
python setup.py build_ext --inplace

Usage

[!TIP] Note for macOS Users: If you are using macOS with Apple Silicon, please be aware of potential numerical instability with the MPS backend. We recommend using the CPU device for MatterSim on Mac to avoid these issues.

A minimal test

import torch
from ase.build import bulk
from ase.units import GPa
from mattersim.forcefield import MatterSimCalculator

device = "cuda" if torch.cuda.is_available() else "cpu"
print(f"Running MatterSim on {device}")

si = bulk("Si", "diamond", a=5.43)
si.calc = MatterSimCalculator(device=device)
print(f"Energy (eV)                 = {si.get_potential_energy()}")
print(f"Energy per atom (eV/atom)   = {si.get_potential_energy()/len(si)}")
print(f"Forces of first atom (eV/A) = {si.get_forces()[0]}")
print(f"Stress[0][0] (eV/A^3)       = {si.get_stress(voigt=False)[0][0]}")
print(f"Stress[0][0] (GPa)          = {si.get_stress(voigt=False)[0][0] / GPa}")

In this release, we provide two checkpoints: MatterSim-v1.0.0-1M.pth and MatterSim-v1.0.0-5M.pth. By default, the 1M version is loaded. To switch to the 5M version, manually set the load_path of MatterSimCalculator as shown below:

MatterSimCalculator(load_path="MatterSim-v1.0.0-5M.pth", device=device)

Reference

We kindly request that users of MatterSim version 1.0.0 cite our preprint available on arXiv:

@article{yang2024mattersim,
      title={MatterSim: A Deep Learning Atomistic Model Across Elements, Temperatures and Pressures},
      author={Han Yang and Chenxi Hu and Yichi Zhou and Xixian Liu and Yu Shi and Jielan Li and Guanzhi Li and Zekun Chen and Shuizhou Chen and Claudio Zeni and Matthew Horton and Robert Pinsler and Andrew Fowler and Daniel Zügner and Tian Xie and Jake Smith and Lixin Sun and Qian Wang and Lingyu Kong and Chang Liu and Hongxia Hao and Ziheng Lu},
      year={2024},
      eprint={2405.04967},
      archivePrefix={arXiv},
      primaryClass={cond-mat.mtrl-sci},
      url={https://arxiv.org/abs/2405.04967},
      journal={arXiv preprint arXiv:2405.04967}
}

[!IMPORTANT] We kindly ask users to explicitly specify the exact model version and checkpoint (e.g., MatterSim-v1.0.0-1M) when reporting results in academic papers or technical reports, rather than referring to the model generically as MatterSim. Precise versioning is crucial for ensuring reproducibility. For instance, the statement "This study was conducted using MatterSim-v1.0.0-1M" serves as a good example.

Limitations

MatterSim-v1 is designed specifically for atomistic simulations of bulk materials. Applications or interpretations beyond this scope should be approached with caution. For instance, when using the model for simulations involving surfaces, interfaces, or properties influenced by long-range interactions, the results may be qualitatively accurate but are not suitable for quantitative analysis. In such cases, we recommend fine-tuning the model to better align with the specific application.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Responsible AI Transparency Documentation

The responsible AI transparency documentation can be found here.

Researcher and Developers

MatterSim is actively under development, and we welcome community engagement. If you have research interests related to this model, ideas you’d like to contribute, or issues to report, we encourage you to reach out to us at ai4s-materials@microsoft.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mattersim-1.0.0rc9.tar.gz (8.5 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mattersim-1.0.0rc9-cp312-cp312-musllinux_1_1_x86_64.whl (702.6 kB view details)

Uploaded CPython 3.12musllinux: musl 1.1+ x86-64

mattersim-1.0.0rc9-cp312-cp312-musllinux_1_1_i686.whl (671.5 kB view details)

Uploaded CPython 3.12musllinux: musl 1.1+ i686

mattersim-1.0.0rc9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (696.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

mattersim-1.0.0rc9-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (675.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

mattersim-1.0.0rc9-cp312-cp312-macosx_11_0_arm64.whl (288.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mattersim-1.0.0rc9-cp311-cp311-musllinux_1_1_x86_64.whl (703.1 kB view details)

Uploaded CPython 3.11musllinux: musl 1.1+ x86-64

mattersim-1.0.0rc9-cp311-cp311-musllinux_1_1_i686.whl (673.2 kB view details)

Uploaded CPython 3.11musllinux: musl 1.1+ i686

mattersim-1.0.0rc9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (703.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

mattersim-1.0.0rc9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (685.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

mattersim-1.0.0rc9-cp311-cp311-macosx_11_0_arm64.whl (287.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mattersim-1.0.0rc9-cp310-cp310-musllinux_1_1_x86_64.whl (665.6 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ x86-64

mattersim-1.0.0rc9-cp310-cp310-musllinux_1_1_i686.whl (641.5 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ i686

mattersim-1.0.0rc9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (665.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

mattersim-1.0.0rc9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (649.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

mattersim-1.0.0rc9-cp310-cp310-macosx_11_0_arm64.whl (287.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

mattersim-1.0.0rc9-cp39-cp39-musllinux_1_1_x86_64.whl (668.0 kB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ x86-64

mattersim-1.0.0rc9-cp39-cp39-musllinux_1_1_i686.whl (644.1 kB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ i686

mattersim-1.0.0rc9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (668.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

mattersim-1.0.0rc9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (651.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

mattersim-1.0.0rc9-cp39-cp39-macosx_11_0_arm64.whl (288.4 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file mattersim-1.0.0rc9.tar.gz.

File metadata

  • Download URL: mattersim-1.0.0rc9.tar.gz
  • Upload date:
  • Size: 8.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for mattersim-1.0.0rc9.tar.gz
Algorithm Hash digest
SHA256 8f71b0dfe6b6e138020299d875eda0209691366119227f79be9891f04f6ff1e2
MD5 c8eb983571efc6d036cfb7d98784913b
BLAKE2b-256 ebd695b904e34c1c15e48b20043689a712a8c3dbe9d39aa88f584f15c3a37fcf

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp312-cp312-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 72e34af24035f50202749fc6998949d82d6ce0c574b2788fa62fa16cd2a1635d
MD5 12fa431a0df03fe591e4691bedb9e2b7
BLAKE2b-256 7f5ff33dcc697b6096ede5c36a2c86ed027eb6947a3fc52fcd1935c9a6bd4111

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp312-cp312-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp312-cp312-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 d30ec81d409a5bcbf60992ac62d101d6e07a2ad62b089e6b425e9ca7e54dc4cb
MD5 c51bcbcc383efc8621986f5f011480b5
BLAKE2b-256 48cf759913e68feef926fe4642cec66acb31702c9ca85e0e2e9c5d1ec42e7aa3

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 369a7cfee1fb79647cc448e7e4e3d4431de98d076c50cb8cb27df1c3f9cc842a
MD5 6f8552d30f0de18c898ed50e1a1ebd01
BLAKE2b-256 659c72e549a4ad022c4ef38c82133d397e2d7d9e94479077378a856b2a8dc053

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 243e8cc5b470688710095332452931eb087629851c42dc5cfe3a10a7cacd87cc
MD5 02aea498ce3765bb8a69faf24b2fb5bb
BLAKE2b-256 a217217057124f6a5d04cd40cadf0936a2baa745110a78546928cfbfc4dd39d7

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2135978d7f1f5cdbbfadeb176b725d4ac12bb418f1568630b2b002bf5fe327f1
MD5 0c3f42ed2bd898fa76389a3413363f12
BLAKE2b-256 7610905b4c808e20367358769da4fcb912b53f6d18286d300ca8ebb38a91ee75

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp311-cp311-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 44cb5b82ef192455bc4456807095e65366c31da781e487d3fcde43501f7b0272
MD5 39003e58be1f71e3e9469bffa1381461
BLAKE2b-256 95982cff37142364d3370bc3479c6d545e0fe69b0b5f5bdad45c42f9d41022c4

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp311-cp311-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp311-cp311-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 c2821a863dda2824b5eb08bf74bdce8d8af3d3fc8bfd3cbf8fef620c1ad01e8b
MD5 085d12e96dc1863bf965e9859cdcf625
BLAKE2b-256 2e1dbfb152bccd4398e742c19fc302b2518a1e54571030a2f8b37868ff62d46d

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 829621187c5ba6ffe32998216b22cdc04b2cb63411865e8324852d60e24edf62
MD5 a3601d296f69660db949b59ab03addab
BLAKE2b-256 f1fa4b4a4c702e21caab9c6732002caf88003bdfb48e92b570e9823233cda0d8

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 499065301fe2ee08b5674f1c1cbb9888f15d52c74417ff50f7ec2d71a812026b
MD5 98b3366960d610f1b3d767538a0e6be1
BLAKE2b-256 c80fd1bc10f9369cdcb92200912715cd6ceda857e8c9abebc721585f4dae222e

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 acf5331394ff556c20700d74c41de43022801cb63fbe0e0447e37f992447b343
MD5 6b583db836e8428e047cf204de01cabe
BLAKE2b-256 75b15c725bc85a7084902e7c97da8149c0b097eea9d97d4c85d778ebd2cf32cf

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 9180977e5f587291655a188088f857d947ac094c05c35aafeac3ad17c0a34486
MD5 17a544b1bb6d4f284ea29b13aa891e6f
BLAKE2b-256 962ceca4ffdf2638fc318e5042a59cfea4652ef606c6278509abd22ede9187ff

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp310-cp310-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp310-cp310-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 9e41bf3d45cdc6d6c467a90263911b163686f0d1134a1721de052898466e60ad
MD5 85f9b3c14c1114ab014d6c41a782a427
BLAKE2b-256 085deaadac6554e01358c99b5ef346671f78eddd666ed677c679ea7b03813b29

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 122f904b764b643b39a4cf2e1badf284ffc313384ba779746b8b2005e1404f4e
MD5 62966fd3e9561be304a110dbf97566a9
BLAKE2b-256 0f071761655ddb9b724a76d95906caa68be8fbc8310b7e3ce124d4d72909a8d1

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 d95145c7297ddef00ac6896334a598b0606dbc335a96d4b8f3cceeabd3af01bb
MD5 1e7152b7fffe309a15f0bfec25b9b987
BLAKE2b-256 40543f0a38a2080c167d4b7d3edd322688bb3903fa347dc2fbe1b89c4198eec8

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 37afe63667dcea1db17028d60ecb79d1a48db47319e58f17681995d1ae8163e8
MD5 a1be80dc049af4815f9e271cb69df63a
BLAKE2b-256 ca9ae03d3fe3f0f7c4fb9e36355b851c47846cb059acda6a52f9830a2a7dfd96

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 866c43937920170dd205099c525bb77ccad3c8f7336ace1313713da62b39b257
MD5 e74ef6afbdbe92de4c0e0c394e410837
BLAKE2b-256 91d098b7f0cf2bab1a442bd20b83ba0c4f4bd26fedadc41eee784285171d7904

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp39-cp39-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp39-cp39-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 f85dcb7ca6f92a9f84b0b3ed4cc597acf27a74b69c2655acd158a0f2313d9907
MD5 172a00e951b124f33832a298e77ced52
BLAKE2b-256 0bb71a05801dd65289576ab13f3179df7a340a2ced495051faa444b47a2afce7

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ad76165bf14f5e23fca65f3feac6475d6432ff97c66cc071e3c4474e30553ffd
MD5 a3dad3259c26d065e254bc5e8431237d
BLAKE2b-256 da675c95be190cfc3047771934fd2becf0f2bdc4d4ea03c4a8bd01c990e8db31

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 f17d2834ab526b2d1fa6024841e10a3f2cca263a75fe3c1487c575ae83b2a187
MD5 e96e67d470267a855a9360023997a475
BLAKE2b-256 850c233084147701391b3463c5f41072ec18840f95dcdea38543bc55ec3e3577

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc9-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc9-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8d483f2f0fd21985c7d4535c35cd362d355f5cb316dc3d34a18cde172a609d7a
MD5 7ca8490af8bbfd35a39598622ecc5e64
BLAKE2b-256 951d76881eb1ed304318c1e378044574104902782f90bb78813e0db0818588ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page