|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +import numpy as np |
| 3 | +from setuptools import Extension, find_packages, setup |
| 4 | +from setuptools.command.build_ext import build_ext as _build_ext |
| 5 | + |
| 6 | + |
| 7 | +class build_ext(_build_ext): |
| 8 | + def finalize_options(self): |
| 9 | + _build_ext.finalize_options(self) |
| 10 | + if self.distribution.ext_modules: |
| 11 | + import pyximport |
| 12 | + |
| 13 | + pyximport.install() |
| 14 | + |
| 15 | + |
| 16 | +setup( |
| 17 | + name="mattersim", |
| 18 | + version="1.0", |
| 19 | + description=( |
| 20 | + "MatterSim: MatterSim: A Deep Learning Atomistic Model Across " |
| 21 | + "Elements, Temperatures and Pressures." |
| 22 | + ), |
| 23 | + author=( |
| 24 | + "Han Yang, Chenxi Hu, Yichi Zhou, Xixian Liu, Yu Shi, Jielan Li, " |
| 25 | + "Guanzhi Li, Zekun Chen, Shuizhou Chen, Claudio Zeni, Matthew Horton, " |
| 26 | + "Robert Pinsler, Andrew Fowler, Daniel Zügner, Tian Xie, Jake Smith, " |
| 27 | + "Lixin Sun, Qian Wang, Lingyu Kong, Chang Liu, Hongxia Hao, Ziheng Lu" |
| 28 | + ), |
| 29 | + author_email=( |
| 30 | + "hanyang@microsoft.com; jielanli@microsoft.com; " |
| 31 | + "hongxiahao@microsoft.com; zihenglu@microsoft.com;" |
| 32 | + ), |
| 33 | + python_requires=">=3.9", |
| 34 | + packages=find_packages(where="src", include=["mattersim", "mattersim.*"]), |
| 35 | + package_dir={"": "src"}, |
| 36 | + url="https://github.com/msr-ai4science/mattersim", |
| 37 | + requires=[ |
| 38 | + "torch", |
| 39 | + ], |
| 40 | + install_requires=[ |
| 41 | + "ase>=3.23.0", |
| 42 | + "Cython>=0.29.32", |
| 43 | + "e3nn==0.5.0", |
| 44 | + "numpy<2", |
| 45 | + "pymatgen", |
| 46 | + "torch_geometric==2.0.4", |
| 47 | + "torch_runstats==0.2.0", |
| 48 | + "torchmetrics>=0.10.0", |
| 49 | + "torch-ema==0.3", |
| 50 | + "opt_einsum_fx", |
| 51 | + "pre-commit", |
| 52 | + "Pathlib", |
| 53 | + "pytest", |
| 54 | + "pytest-testmon", |
| 55 | + "azure-storage-blob", |
| 56 | + "azure-identity", |
| 57 | + ], |
| 58 | + setup_requires=[ |
| 59 | + "Cython>=0.29.32", |
| 60 | + ], |
| 61 | + cmdclass={"build_ext": build_ext}, |
| 62 | + ext_modules=[ |
| 63 | + Extension( |
| 64 | + "mattersim.datasets.utils.threebody_indices", |
| 65 | + ["src/mattersim/datasets/utils/threebody_indices.pyx"], |
| 66 | + include_dirs=[np.get_include()], |
| 67 | + ) |
| 68 | + ], |
| 69 | +) |
0 commit comments