Skip to content

Commit 9d9528c

Browse files
authored
add misc files (#5)
1 parent a81650d commit 9d9528c

4 files changed

Lines changed: 282 additions & 0 deletions

File tree

.gitignore

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
**/*.c
9+
10+
# Distribution / packaging
11+
.Python
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
cover/
54+
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings.py
62+
db.sqlite3
63+
db.sqlite3-journal
64+
65+
# Flask stuff:
66+
instance/
67+
.webassets-cache
68+
69+
# Scrapy stuff:
70+
.scrapy
71+
72+
# Sphinx documentation
73+
docs/_build/
74+
75+
# PyBuilder
76+
.pybuilder/
77+
target/
78+
79+
# Jupyter Notebook
80+
.ipynb_checkpoints
81+
82+
# IPython
83+
profile_default/
84+
ipython_config.py
85+
86+
# pyenv
87+
# For a library or package, you might want to ignore these files since the code is
88+
# intended to run in multiple environments; otherwise, check them in:
89+
# .python-version
90+
91+
# pipenv
92+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
94+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
95+
# install all needed dependencies.
96+
#Pipfile.lock
97+
98+
# poetry
99+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
100+
# This is especially recommended for binary packages to ensure reproducibility, and is more
101+
# commonly ignored for libraries.
102+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
103+
#poetry.lock
104+
105+
# pdm
106+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
107+
#pdm.lock
108+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
109+
# in version control.
110+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
111+
.pdm.toml
112+
.pdm-python
113+
.pdm-build/
114+
115+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
116+
__pypackages__/
117+
118+
# Celery stuff
119+
celerybeat-schedule
120+
celerybeat.pid
121+
122+
# SageMath parsed files
123+
*.sage.py
124+
125+
# Environments
126+
.env
127+
.venv
128+
env/
129+
venv/
130+
ENV/
131+
env.bak/
132+
venv.bak/
133+
134+
# Spyder project settings
135+
.spyderproject
136+
.spyproject
137+
138+
# Rope project settings
139+
.ropeproject
140+
141+
# mkdocs documentation
142+
/site
143+
144+
# mypy
145+
.mypy_cache/
146+
.dmypy.json
147+
dmypy.json
148+
149+
# Pyre type checker
150+
.pyre/
151+
152+
# pytype static type analyzer
153+
.pytype/
154+
155+
# Cython debug symbols
156+
cython_debug/
157+
158+
# PyCharm
159+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161+
# and can be added to the global gitignore or merged into this file. For a more nuclear
162+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
163+
#.idea/

.pre-commit-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.2.0
4+
hooks:
5+
- id: end-of-file-fixer
6+
- id: fix-encoding-pragma
7+
- id: mixed-line-ending
8+
- id: trailing-whitespace
9+
- id: check-json
10+
11+
- repo: https://github.com/pycqa/isort
12+
rev: 5.12.0
13+
hooks:
14+
- id: isort
15+
args: ["--profile", "black"]
16+
17+
- repo: https://github.com/psf/black
18+
rev: 23.3.0
19+
hooks:
20+
- id: black
21+
args: ["--line-length", "88"]
22+
23+
- repo: https://github.com/pycqa/flake8
24+
rev: 6.0.0
25+
hooks:
26+
- id: flake8
27+
args: ["--max-line-length=88", "--ignore=E203,W503"]

environment.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: mattersim
2+
channels:
3+
- pyg
4+
- pytorch
5+
- conda-forge
6+
dependencies:
7+
- python=3.9
8+
- pytorch==1.11.0
9+
- pytorch-sparse=0.6.15
10+
- pytorch-scatter=2.0.9
11+
- ca-certificates
12+
- openssl
13+
- numpy<2
14+
- phonopy==2.14.0
15+
- phono3py==2.3.0
16+
- cython
17+
- loguru
18+
- pip:
19+
- seekpath
20+
- torch==1.11.0+cu113
21+
- torchvision==0.12.0+cu113
22+
- torchaudio==0.11.0
23+
- --extra-index-url https://download.pytorch.org/whl/cu113

setup.py

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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

Comments
 (0)