Upload folder using huggingface_hub
Browse files- LICENSE +21 -0
- NOTICE +36 -0
- README.md +145 -0
- mattersim-v1.0.0-1m.zip +3 -0
- mattersim-v1.0.0-5m.zip +3 -0
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright (c) Microsoft Corporation.
|
| 2 |
+
|
| 3 |
+
MIT License
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
NOTICE
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MatterSim v1.0.0 — JAX re-export by CuspAI
|
| 2 |
+
============================================
|
| 3 |
+
|
| 4 |
+
This artifact is a derivative work of MatterSim v1.0.0 (checkpoints
|
| 5 |
+
MatterSim-v1.0.0-1M and MatterSim-v1.0.0-5M).
|
| 6 |
+
|
| 7 |
+
Original work
|
| 8 |
+
-------------
|
| 9 |
+
Copyright (c) Microsoft Corporation.
|
| 10 |
+
Licensed under the MIT License. See LICENSE for the full text.
|
| 11 |
+
Upstream: https://github.com/microsoft/mattersim
|
| 12 |
+
|
| 13 |
+
Modifications
|
| 14 |
+
-------------
|
| 15 |
+
CuspAI re-exported the upstream PyTorch checkpoints
|
| 16 |
+
(MatterSim-v1.0.0-1M.pth, MatterSim-v1.0.0-5M.pth) to JAX computation
|
| 17 |
+
graphs using tojax (https://github.com/cusp-ai-oss/tojax), producing one
|
| 18 |
+
.zip per checkpoint. The model weights and architecture are unchanged,
|
| 19 |
+
bit-for-bit, from the upstream release. Numerical agreement with the
|
| 20 |
+
PyTorch reference was verified within rtol=1e-4, atol=1e-4 during export.
|
| 21 |
+
The file format changed from .pth to a .zip containing a jax.export graph
|
| 22 |
+
plus msgpack-encoded parameters.
|
| 23 |
+
|
| 24 |
+
Attribution
|
| 25 |
+
-----------
|
| 26 |
+
Please cite Yang et al. (2024), arXiv:2405.04967, when using these
|
| 27 |
+
checkpoints in research. Per the upstream guidance, the exact model
|
| 28 |
+
version (e.g. "MatterSim-v1.0.0-1M") should be reported, not the generic
|
| 29 |
+
"MatterSim".
|
| 30 |
+
|
| 31 |
+
Trademarks
|
| 32 |
+
----------
|
| 33 |
+
"MatterSim" and "Microsoft" are trademarks of Microsoft Corporation.
|
| 34 |
+
Use of these trademarks is subject to Microsoft's Trademark & Brand
|
| 35 |
+
Guidelines (https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
|
| 36 |
+
This re-export is not endorsed by or affiliated with Microsoft.
|
README.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
license_link: LICENSE
|
| 4 |
+
library_name: kups
|
| 5 |
+
tags:
|
| 6 |
+
- chemistry
|
| 7 |
+
- materials-science
|
| 8 |
+
- molecular-dynamics
|
| 9 |
+
- interatomic-potential
|
| 10 |
+
- mlff
|
| 11 |
+
- jax
|
| 12 |
+
- mattersim
|
| 13 |
+
- m3gnet
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# MatterSim v1.0.0 — JAX build
|
| 17 |
+
|
| 18 |
+
This repository hosts JAX exports of [MatterSim v1.0.0](https://github.com/microsoft/mattersim) for use with [kUPS](https://github.com/cusp-ai-oss/kups), a JAX-native molecular-simulation toolkit. Each artefact is a self-contained `.zip` containing the serialized JAX computation graph, the original model parameters, and the minimal metadata needed to run inference.
|
| 19 |
+
|
| 20 |
+
**Important:** these are **re-exports, not retrainings.** Weights and architecture are the originals released by Microsoft Research. CuspAI's only contribution is converting the PyTorch reference implementation to JAX via [tojax](https://github.com/cusp-ai-oss/tojax). Every scientific claim, citation, and credit belongs to the original authors.
|
| 21 |
+
|
| 22 |
+
## Included models
|
| 23 |
+
|
| 24 |
+
| File | Upstream | License | Paper |
|
| 25 |
+
|------|----------|---------|-------|
|
| 26 |
+
| `mattersim-v1.0.0-1m.zip` (3.7 MB) | [MatterSim-v1.0.0-1M](https://github.com/microsoft/mattersim) | [MIT](LICENSE) | Yang et al. (2024), [arXiv:2405.04967](https://arxiv.org/abs/2405.04967) |
|
| 27 |
+
| `mattersim-v1.0.0-5m.zip` (18 MB) | [MatterSim-v1.0.0-5M](https://github.com/microsoft/mattersim) | [MIT](LICENSE) | Yang et al. (2024), [arXiv:2405.04967](https://arxiv.org/abs/2405.04967) |
|
| 28 |
+
|
| 29 |
+
Cutoff radius 5.0 Å (three-body cutoff 4.0 Å). Schema: `AtomGraphInput` (positions, atomic numbers, cell, pbc, edge index, cell offsets, batch index, charge, spin).
|
| 30 |
+
|
| 31 |
+
## Quick start
|
| 32 |
+
|
| 33 |
+
```sh
|
| 34 |
+
pip install kups[cuda]
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
```python
|
| 38 |
+
from huggingface_hub import hf_hub_download
|
| 39 |
+
from kups.potential.mliap.tojax import TojaxedMliap
|
| 40 |
+
|
| 41 |
+
path = hf_hub_download(
|
| 42 |
+
repo_id="CuspAI/kUPS-mattersim-jax",
|
| 43 |
+
filename="mattersim-v1.0.0-1m.zip", # or mattersim-v1.0.0-5m.zip
|
| 44 |
+
)
|
| 45 |
+
model = TojaxedMliap.from_zip_file(path)
|
| 46 |
+
# model.cutoff, model.params, model.call(atom_graph_input) are now available.
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
kUPS ships CLI wrappers that take a YAML config pointing at one of these zips:
|
| 50 |
+
|
| 51 |
+
```sh
|
| 52 |
+
kups_relax_mlff --config relax_mattersim.yaml
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
Example configs live in the kUPS [examples/](https://github.com/cusp-ai-oss/kups/tree/main/examples) directory.
|
| 56 |
+
|
| 57 |
+
## What's in each `.zip`
|
| 58 |
+
|
| 59 |
+
- `model.jax` — JAX computation graph, serialized via `jax.export`.
|
| 60 |
+
- `params.msgpack` — parameters as a msgpack-encoded list of arrays.
|
| 61 |
+
- `metadata.json` — cutoff radius, three-body cutoff, and checkpoint name.
|
| 62 |
+
- `dtypes.json` — input dtypes for `AtomGraphInput`.
|
| 63 |
+
|
| 64 |
+
Exported with symbolic shapes (`--symbolic NSE`); accept variable atom, system, and edge counts without recompilation.
|
| 65 |
+
|
| 66 |
+
## Model details
|
| 67 |
+
|
| 68 |
+
**Upstream:** [microsoft/mattersim](https://github.com/microsoft/mattersim) · **Checkpoints:** `MatterSim-v1.0.0-1M.pth`, `MatterSim-v1.0.0-5M.pth`
|
| 69 |
+
|
| 70 |
+
MatterSim is a family of deep-learning interatomic potentials from Microsoft Research, designed for atomistic simulations of bulk materials across the periodic table, a wide range of temperatures, and pressures. The v1.0.0 checkpoints use the **M3GNet** architecture (a three-body message-passing graph network); the `1M` variant is a smaller, faster model and the `5M` variant trades speed for accuracy. Both are trained on data generated by the workflows described in the MatterSim manuscript.
|
| 71 |
+
|
| 72 |
+
**Original authors:** Han Yang, Chenxi Hu, Yichi Zhou, Xixian Liu, Yu Shi, Jielan Li, Guanzhi Li, Zekun Chen, Shuizhou Chen, Claudio Zeni, Matthew Horton, Robert Pinsler, Andrew Fowler, Daniel Zügner, Tian Xie, Jake Smith, Lixin Sun, Qian Wang, Lingyu Kong, Chang Liu, Hongxia Hao, Ziheng Lu. Microsoft Research AI4Science.
|
| 73 |
+
|
| 74 |
+
**Intended use and limitations:** MatterSim v1 is designed for atomistic simulations of **bulk** materials. Applications to surfaces, interfaces, or properties dominated by long-range interactions may be qualitatively reasonable but should not be used for quantitative analysis without fine-tuning. See the [upstream MODEL_CARD](https://github.com/microsoft/mattersim/blob/main/MODEL_CARD.md) and [documentation](https://microsoft.github.io/mattersim/) for authoritative guidance.
|
| 75 |
+
|
| 76 |
+
**Version reporting:** Per the upstream README, papers using these checkpoints should report the **exact** version — e.g. "MatterSim-v1.0.0-1M" — rather than the generic name "MatterSim", to ensure reproducibility.
|
| 77 |
+
|
| 78 |
+
**Citation:**
|
| 79 |
+
|
| 80 |
+
```bibtex
|
| 81 |
+
@article{yang2024mattersim,
|
| 82 |
+
title = {{MatterSim}: A Deep Learning Atomistic Model Across Elements,
|
| 83 |
+
Temperatures and Pressures},
|
| 84 |
+
author = {Yang, Han and Hu, Chenxi and Zhou, Yichi and Liu, Xixian and Shi, Yu
|
| 85 |
+
and Li, Jielan and Li, Guanzhi and Chen, Zekun and Chen, Shuizhou
|
| 86 |
+
and Zeni, Claudio and Horton, Matthew and Pinsler, Robert
|
| 87 |
+
and Fowler, Andrew and Z{\"u}gner, Daniel and Xie, Tian and Smith, Jake
|
| 88 |
+
and Sun, Lixin and Wang, Qian and Kong, Lingyu and Liu, Chang
|
| 89 |
+
and Hao, Hongxia and Lu, Ziheng},
|
| 90 |
+
year = {2024},
|
| 91 |
+
eprint = {2405.04967},
|
| 92 |
+
archivePrefix = {arXiv},
|
| 93 |
+
primaryClass = {cond-mat.mtrl-sci},
|
| 94 |
+
journal = {arXiv preprint arXiv:2405.04967},
|
| 95 |
+
}
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
## Export pipeline and reproducibility
|
| 99 |
+
|
| 100 |
+
The archives were produced with the exporter in [tojax/examples/mlff/](https://github.com/cusp-ai-oss/tojax); one export per checkpoint:
|
| 101 |
+
|
| 102 |
+
```sh
|
| 103 |
+
for ckpt in mattersim-v1.0.0-1m mattersim-v1.0.0-5m; do
|
| 104 |
+
uv run python export_mattersim.py --checkpoint ${ckpt}.pth \
|
| 105 |
+
--output ${ckpt}.zip --symbolic NSE
|
| 106 |
+
done
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
tojax's export harness verifies numerical agreement with the PyTorch reference (default tolerances `rtol=1e-4`, `atol=1e-4`) before saving each archive.
|
| 110 |
+
|
| 111 |
+
## Changes from upstream
|
| 112 |
+
|
| 113 |
+
- **File format.** PyTorch `.pth` → JAX-exported `.zip` (graph + msgpack params).
|
| 114 |
+
- **Weights.** Unchanged, bit-for-bit, from the upstream checkpoint.
|
| 115 |
+
- **Architecture.** Translated operation-for-operation; no approximations or substitutions.
|
| 116 |
+
- **Numerics.** Verified within `rtol=1e-4, atol=1e-4` against the PyTorch reference during export.
|
| 117 |
+
- **Cutoffs and dtypes.** Preserved from upstream defaults (cutoff 5.0 Å, three-body cutoff 4.0 Å; float32 positions/cell/offsets, int64 indices, bool PBC).
|
| 118 |
+
- **Symbolic shapes.** Exports accept variable numbers of atoms, systems, and edges without recompilation.
|
| 119 |
+
|
| 120 |
+
## Attribution and license
|
| 121 |
+
|
| 122 |
+
These models exist because of the work of the MatterSim team at Microsoft Research. CuspAI's only contribution is the JAX export — we trained nothing, changed no weights, and designed none of the architecture. Please cite Yang et al. (2024) when using these checkpoints in research, and report the exact version name.
|
| 123 |
+
|
| 124 |
+
The archives are distributed under the **MIT License**; see [LICENSE](LICENSE) for the full text and [NOTICE](NOTICE) for attribution, modification, and trademark details. The kUPS / tojax tooling citations:
|
| 125 |
+
|
| 126 |
+
```bibtex
|
| 127 |
+
@software{kups2026,
|
| 128 |
+
author = {{CuspAI}},
|
| 129 |
+
title = {kUPS},
|
| 130 |
+
year = {2026},
|
| 131 |
+
url = {https://github.com/cusp-ai-oss/kups},
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
@software{tojax2026,
|
| 135 |
+
author = {{CuspAI}},
|
| 136 |
+
title = {tojax},
|
| 137 |
+
year = {2026},
|
| 138 |
+
url = {https://github.com/cusp-ai-oss/tojax},
|
| 139 |
+
}
|
| 140 |
+
```
|
| 141 |
+
|
| 142 |
+
## Contact
|
| 143 |
+
|
| 144 |
+
- Issues with the JAX export or with kUPS: [github.com/cusp-ai-oss/kups/issues](https://github.com/cusp-ai-oss/kups/issues)
|
| 145 |
+
- Scientific questions about MatterSim: please direct to the upstream authors via [microsoft/mattersim](https://github.com/microsoft/mattersim) or `ai4s-materials@microsoft.com`.
|
mattersim-v1.0.0-1m.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc84b0de43943b3ef5ed323dca2a7d09807e4240a01e07cd51b5a0c3ebe5447f
|
| 3 |
+
size 3790104
|
mattersim-v1.0.0-5m.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:545fc5a5c824980dda8819a8b4ef7328472317af418072b21570d7100a4316f0
|
| 3 |
+
size 18459337
|