-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathpyproject.toml
More file actions
235 lines (214 loc) · 7.03 KB
/
pyproject.toml
File metadata and controls
235 lines (214 loc) · 7.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
[project]
name = "torch-sim-atomistic"
version = "0.5.2"
description = "A pytorch toolkit for calculating material properties using MLIPs"
authors = [
{ name = "TorchSim Maintainers", email = "torchsimatomistic@gmail.com" },
{ name = "Abhijeet Gangan", email = "abhijeetgangan@g.ucla.edu" },
{ name = "Janosh Riebesell", email = "janosh.riebesell@gmail.com" },
{ name = "Orion Cohen", email = "orioncohen@berkeley.edu" },
]
readme = "README.md"
license = { file = "LICENSE" }
keywords = [
"chemistry",
"interatomic-potentials",
"machine-learning",
"materials-science",
]
classifiers = [
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Scientific/Engineering :: Physics",
]
requires-python = ">=3.12"
dependencies = [
"h5py>=3.15.1",
"numpy>=1.26,<3; python_version < '3.13'",
"numpy>=2.3.2,<3; python_version >= '3.13'",
"nvalchemi-toolkit-ops[torch]>=0.3.0",
"tables>=3.11.1",
"torch>=2",
"tqdm>=4.67",
]
[project.optional-dependencies]
test = [
"torch-sim-atomistic[io,symmetry,vesin]",
"physical-validation>=1.0.5",
"platformdirs>=4.0.0",
"psutil>=7.0.0",
"pytest-cov>=6",
"pytest>=8",
"spglib>=2.6",
]
vesin = ["vesin[torch]>=0.5.3"]
io = ["ase>=3.26", "phonopy>=2.37.0", "pymatgen>=2026.3.23"]
symmetry = ["moyopy>=0.7.8"]
mace = ["mace-torch>=0.3.15"]
mattersim = ["mattersim>=1.2.2"]
metatomic = ["metatomic-torchsim>=0.1.1", "metatomic-ase>=0.1.0", "upet>=0.2.0"]
orb = ["orb-models>=0.6.2"]
sevenn = ["sevenn[torchsim]>=0.12.1"]
nequip = ["nequip>=0.17.1"]
nequix = ["nequix[torch-sim]>=0.4.5"]
fairchem = ["fairchem-core>=2.19.0", "scipy<1.17.0"]
docs = [
"autodoc_pydantic==2.2.0",
"furo==2024.8.6",
"ipykernel==6.30.1",
"ipython==8.34.0",
"jsonschema[format]",
"jupyter-core==5.8.1",
"jupyterlab==4.3.4",
"jupytext==1.16.7",
"myst_parser==4.0.0",
"nbsphinx>=0.9.7",
"numpydoc==1.8.0",
"sphinx-copybutton==0.5.2",
"sphinx==8.1.3",
"sphinx_design==0.6.1",
]
[project.urls]
Repo = "https://github.com/torchsim/torch-sim"
[build-system]
requires = ["uv_build>=0.7.12"]
build-backend = "uv_build"
[tool.uv.build-backend]
module-name = "torch_sim"
module-root = ""
[tool.ruff]
target-version = "py312"
line-length = 90
output-format = "concise"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN002", # Checks that *args arguments have type annotations.
"ANN003", # Checks that **kwargs arguments have type annotations.
"ANN401", # Allow use of type Any for function argument {name}
"C408", # Unnecessary {obj_type} call (rewrite as a literal)
"COM812", # missing-trailing-comma
"D205", # 1 blank line required between summary line and description
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"ERA001", # Found commented-out code
"FIX002", # Line contains TODO, consider resolving the issue
"G004", # Logging statement uses f-string -> TODO refactor for performance
"N803", # Variable name should be lowercase
"N806", # Uppercase letters in variable names
"PLC0415", # import should be at the top-level of a file
"PLR0912", # too many branches
"PLR0913", # too many function arguments
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
"PLW2901", # Outer for loop variable overwritten by inner assignment target
"PTH", # flake8-use-pathlib
"RUF002", # Greek letters are discouraged
"S301", # pickle and modules that wrap it can be unsafe, possible security issue
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"SIM105", # Use contextlib.suppress instead of try-except-pass
"TD", # flake8-todos
"TRY003", # Avoid specifying long messages outside the exception class
]
pydocstyle.convention = "google"
isort.split-on-trailing-comma = false
isort.lines-after-imports = 2
pep8-naming.ignore-names = ["get_kT", "kT"]
[tool.ruff.lint.per-file-ignores]
"**/tests/*" = ["ANN001", "ANN201", "ANN202", "D", "INP001", "S101", "T201"]
"examples/**/*" = ["ANN001", "ANN201", "ANN202", "B018", "T201"]
"examples/tutorials/**/*" = ["ALL"]
"docs/tutorials/*.ipynb" = ["ANN001", "ANN201", "B905", "BLE001", "E501", "F841", "N816", "PLR1714", "RUF001", "T201"]
[tool.ruff.format]
docstring-code-format = true
[tool.codespell]
check-filenames = true
ignore-words-list = ["convertor"] # codespell:ignore convertor
skip = "docs/tutorials/integrator_tests_analysis.ipynb"
[tool.pytest.ini_options]
addopts = ["-p no:warnings", "-m not physical_validation"]
testpaths = ["tests"]
markers = [
"physical_validation: long-running physical validation tests (run with: pytest -m physical_validation)",
]
[tool.uv]
# make these dependencies mutually exclusive since they use incompatible e3nn versions
# see https://docs.astral.sh/uv/concepts/projects/config/#conflicting-dependencies for more details
conflicts = [
[
{ extra = "fairchem" },
{ extra = "mace" },
],
[
{ extra = "fairchem" },
{ extra = "mace" },
],
[
{ extra = "mace" },
{ extra = "mattersim" },
],
[
{ extra = "mace" },
{ extra = "nequip" },
],
[
{ extra = "mace" },
{ extra = "nequix" },
],
[
{ extra = "mace" },
{ extra = "sevenn" },
],
]
[dependency-groups]
dev = ["prek>=0.3.4", "ty>=0.0.19"]
[tool.ty.rules]
unused-ignore-comment = "warn"
[[tool.ty.overrides]]
include = [
"tests/models/**/*.py",
"torch_sim/constraints.py",
"torch_sim/io.py",
"torch_sim/models/**/*.py",
"torch_sim/neighbors/alchemiops.py",
"torch_sim/neighbors/vesin.py",
"torch_sim/state.py",
"torch_sim/symmetrize.py",
"torch_sim/trajectory.py",
"torch_sim/typing.py",
"torch_sim/workflows/**/*.py",
]
[tool.ty.overrides.rules]
unresolved-import = "ignore"
[[tool.ty.overrides]]
include = [
"torch_sim/models/dispersion.py",
"torch_sim/neighbors/vesin.py",
]
[tool.ty.overrides.rules]
invalid-argument-type = "ignore"
invalid-assignment = "ignore"
[[tool.ty.overrides]]
include = ["tests/**/*.py"]
[tool.ty.overrides.rules]
invalid-argument-type = "ignore"
invalid-assignment = "ignore"
no-matching-overload = "ignore"
unresolved-attribute = "ignore"
unresolved-import = "ignore"
[[tool.ty.overrides]]
include = ["docs/**/*.py", "docs/**/*.ipynb", "examples/**/*.py"]
[tool.ty.overrides.rules]
invalid-argument-type = "ignore"
not-iterable = "ignore"
not-subscriptable = "ignore"
unresolved-attribute = "ignore"
unresolved-import = "ignore"
[[tool.ty.overrides]]
include = ["torch_sim/neighbors/alchemiops.py"]
[tool.ty.overrides.rules]
call-non-callable = "ignore"