Skip to main content

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

Project description

MatterSim logo

arXiv Requires Python 3.9+

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

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

To install MatterSim, run the following command:

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

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}")

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

mattersim-1.0.0rc5-cp39-cp39-musllinux_1_2_x86_64.whl (101.5 MB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

mattersim-1.0.0rc5-cp39-cp39-musllinux_1_2_i686.whl (101.5 MB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ i686

mattersim-1.0.0rc5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (101.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

mattersim-1.0.0rc5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (101.5 MB view details)

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

File details

Details for the file mattersim-1.0.0rc5-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc5-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a7453d1a5365a3b5d71598b0b2ecb40a31bde3f02fbb5e493c613efd62d282aa
MD5 5a5398eee1a138fbec5d5ef83b16509a
BLAKE2b-256 cad0692e3f076520a1a9c9d9ffa30df41e836d92386dfa16684c19814e630d86

See more details on using hashes here.

File details

Details for the file mattersim-1.0.0rc5-cp39-cp39-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for mattersim-1.0.0rc5-cp39-cp39-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 573780a90903ca58e6eec7a600faaad5213aefdb2c2b8a9b7fba0fd4ef99a8f5
MD5 6d6942174ca673c3a369eae04d6cffae
BLAKE2b-256 7f06055cf7bec38a36aaa8d2fc5913c4fd5584f15aab106696763134ff2d1555

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mattersim-1.0.0rc5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 557aab600227e8bd14fc4fd6d2dd3fc99b7a8ce91f130d75cd654ec8b1955631
MD5 e6e710338264898310da0dd942d77eca
BLAKE2b-256 9368700329832c691e574b90cedad8af35361bfc713bcb332d802d94b38b0bd6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mattersim-1.0.0rc5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 970d721b702e6c800092311d2c54e6dcc833b0d678cc67cce04e8287461399b8
MD5 75b2ddcbf10943b1ef6526693d5c3f7d
BLAKE2b-256 12db4e8fa734f791df6a2174c7f08f96eff99a2f82cb80d395953f0903193b9e

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