-
Notifications
You must be signed in to change notification settings - Fork 159
Expand file tree
/
Copy pathpyproject.toml
More file actions
279 lines (255 loc) · 8.95 KB
/
Copy pathpyproject.toml
File metadata and controls
279 lines (255 loc) · 8.95 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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
[build-system]
requires = ["setuptools >= 42, < 85", "versioningit >= 1,< 4", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "atomate2"
description = "atomate2 is a library of materials science workflows"
readme = "README.md"
keywords = ["automated", "dft", "high-throughput", "vasp", "workflow"]
license = "BSD-3-Clause-LBNL"
authors = [{ name = "Alex Ganose", email = "alexganose@gmail.com" }]
dynamic = ["version"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Other/Nonlisted Topic",
"Topic :: Scientific/Engineering",
]
requires-python = ">=3.11"
dependencies = [
"PyYAML",
"click",
"custodian>=2024.4.18",
"emmet-core>=0.86.1",
"jobflow>=0.1.11",
"monty>=2024.12.10",
"numpy",
"pydantic-settings>=2.0.3",
"pydantic>=2.0.1",
"pymatgen>=2024.11.13",
"pymatgen-core>=2026.5.18",
"pymongo<=4.18.2",
]
[project.optional-dependencies]
abinit = [
"abipy>=0.9.3",
"netCDF4<1.7.5", # TODO: latest NetCDF missing 3.12 support: https://github.com/Unidata/netcdf4-python/issues/1461
]
aims = ["pymatgen-io-aims>=0.0.5", "pymatgen>=2025.10.7"]
amset = ["amset>=0.4.15", "pydash"]
cclib = ["cclib>=1.8.1"]
mp = ["mp-api>=0.37.5"]
# phonopy 4.x changed force-constants/primitive-axis handling, breaking the
# phonon.save -> phonopy.load round-trip used by the Grüneisen workflow
# ("Force constants shape disagrees with crystal structure setting").
phonons = ["phonopy>=2.43,<5", "seekpath>=2.0.0"]
pheasy = ["hiphive==1.5", "numpy<=2.2", "pheasy @ git+https://gitlab.com/hpsahasrabuddhe/pheasy.git@support-disp-force-matrix-input"]
alamode = ["alm @ git+https://github.com/ttadano/ALM.git@develop#subdirectory=python"]
hiphive = ["hiphive==1.5", "trainstation>=1.0", "atomate2[phonons,alamode]"]
lobster = ["ijson>=3.2.2", "lobsterpy>=0.6.0"]
defects = [
"dscribe>=1.2.0",
"pymatgen-analysis-defects>=2024.5.11",
"python-ulid>=2.7",
]
ase = ["ase>=3.26.0"]
ase-ext = ["tblite>=0.3.0; platform_system=='Linux'"]
forcefields-demo = ["chgnet>=0.3.8","atomate2[ase]"]
torchsim = [
"torch-sim-atomistic[symmetry]==0.6.1; python_version >= '3.12'"
]
# TorchSim's optional model backends pin to minimum versions to avoid the backend
# from being absent. We also have to keep mace separate from the generic group
# to avoid conflicts with e3nn versions. Note that the groups are different
# from the ones used for the forcefields backend.
# ALWAYS REMEMBER to update `.github/workflows/testing.yml` to reflect the
# current set of torchsim dependency groups.
torchsim-mace = [
"torch-sim-atomistic[mace,symmetry]==0.6.1; python_version >= '3.12'"
]
# mattersim can be added to torchsim-generic once they clean their dependencies
torchsim-generic = [
"torch-sim-atomistic[fairchem,metatomic,nequip,orb,sevenn,symmetry]==0.6.1; python_version >= '3.12'"
]
jdftx = ["pymatgen==2026.9.24"]
approxneb = ["pymatgen-analysis-diffusion>=2024.7.15"]
openmm = [
"mdanalysis>=2.8.0",
"openmm-mdanalysis-reporter>=0.1.0",
"openmm>=8.1.0",
]
fireworks = ["fireworks==2.1.4"]
strict-openff = [
"mdanalysis==2.10.0",
"monty==2026.7.16",
"openmm-mdanalysis-reporter==0.1.0",
"openmm==8.6.1",
"pymatgen==2026.9.24", # EXERCISE CAUTION WHEN UPDATING - open ff is extremely sensitive to pymatgen version
]
# Forcefields have separate strict groupings because of conflicting dependencies.
# The labels below should not be taken as fixed in time.
# They are meant to be instructive as to why certain forcefields are grouped together.
# Ex: `strict-forcefields-torch-limited` might indicate that these require a lower version of `pytorch`
# Whereas `strict-forcefields-generic` might indicate that no dependency conflicts are known for the group
# ALWAYS REMEMBER to update `.github/workflows/testing.yml` to reflect the current set of
# forcefield dependency groups.
strict-forcefields-generic = [
"calorine==4.0; python_version >= '3.12'",
"calorine==3.1; python_version < '3.12'",
"chgnet==0.4.2",
"quippy-ase==0.10.3",
"sevenn==0.13.0",
"deepmd-kit==3.2.0",
"tensorflow-cpu==2.21.0; sys_platform == 'linux'",
"tensorflow==2.21.0; sys_platform == 'darwin' or sys_platform == 'win32'",
# "mattersim>=1.2.3", # need to be activated again
"wandb==0.30.0", # required for mattersim
"upet==0.2.5",
]
strict-forcefields-torch-limited = [
"matgl==4.0.3",
"nequip==0.19.1", # requires numpy<2 because of matscipy
]
strict-forcefields-e3nn-limited = [
"mace-torch==0.3.16",
"torch-dftd==0.5.3",
]
strict-forcefields-numpy-limited = [
"nequip-allegro==0.8.3",
]
strict = [
"atomate2[cclib, phonons, lobster, openmm, mp, defects, ase, ase-ext]",
"numpy<3.0",
"numba>=0.60.0", # needed to get numpy >2,<3 installed
"pymatgen==2026.9.24",
"pymatgen-core==2026.9.23",
]
[project.scripts]
atm = "atomate2.cli:cli"
[project.urls]
homepage = "https://materialsproject.github.io/atomate2/"
repository = "https://github.com/materialsproject/atomate2"
documentation = "https://materialsproject.github.io/atomate2/"
changelog = "https://github.com/materialsproject/atomate2/blob/main/CHANGELOG.md"
[dependency-groups]
dev = ["pre-commit>=4.5.1"]
tests = [
"fireworks==2.1.4",
"nbmake==1.5.5",
"pytest-cov==7.1.0",
"pytest-mock==3.15.1",
"pytest-split==0.11.0",
"pytest-xdist==3.8.0",
"pytest==9.1.1",
]
docs = [
"fireworks==2.1.4",
"autodoc_pydantic==2.2.0",
"furo==2025.12.19",
"ipython==9.17.1",
"jsonschema[format]",
"myst_parser==5.1.0",
"numpydoc==1.11.0",
"sphinx-copybutton==0.5.2",
"sphinx==9.0.4",
"sphinx_design==0.7.0",
"jupyterlab==4.6.4",
]
[tool.setuptools.package-data]
atomate2 = ["py.typed"]
"atomate2.vasp.sets" = ["*.yaml"]
"atomate2.cp2k.sets" = ["*.yaml"]
"atomate2.cp2k.schemas.calc_types" = ["*.yaml"]
"atomate2.jdftx.sets" = ["*.yaml"]
[tool.versioningit.vcs]
method = "git"
default-tag = "0.0.1"
[tool.mypy]
ignore_missing_imports = true
no_strict_optional = true
[tool.pytest.ini_options]
addopts = "-p no:warnings --import-mode=importlib --cov-config=pyproject.toml"
filterwarnings = [
"ignore:.*POTCAR.*:UserWarning",
"ignore:.*input structure.*:UserWarning",
"ignore:.*is not gzipped.*:UserWarning",
"ignore:.*magmom.*:UserWarning",
"ignore::DeprecationWarning",
]
[tool.coverage.run]
include = ["src/*"]
parallel = true
branch = true
[tool.coverage.paths]
source = ["src/"]
[tool.coverage.report]
skip_covered = true
show_missing = true
exclude_lines = [
'^\s*@overload( |$)',
'^\s*assert False(,|$)',
'if typing.TYPE_CHECKING:',
'if TYPE_CHECKING:',
]
[tool.ruff]
target-version = "py310"
output-format = "concise"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN002", # Missing type annotation for *arg
"ANN003", # Missing type annotation for **kwargs
"ANN401", # typing.Any disallowed
"ARG002", # unused method argument
"C408", # Unnecessary (dict/list/tuple) call - remove call
"C901", # function too complex
"COM812", # trailing comma missing
"CPY001", # copyright notice at top of file
"EM", # exception message must not use f-string literal
"ERA001", # found commented out code
"FBT001",
"FBT002",
"FIX002",
"G004", # logging uses f-string
"ISC001",
"PD011", # pandas-use-of-dot-values
"PERF203", # try-except-in-loop
"PLC0415", # imports not at top level are OK
"PLR0911", # too many returns
"PLR0912", # too many branches
"PLR0913", # too many arguments
"PLR0915", # too many local statements
"PLR0917", # too many positional arguments
"PLR2004",
"PT006", # pytest-parametrize-names-wrong-type
"PT013", # pytest-incorrect-pytest-import
"PTH", # prefer Pathlib to os.path
"RUF013", # implicit-optional
"S324", # use of insecure hash function
"S507", # paramiko auto trust
"S603", # use of insecure subprocess
"TD", # todos
"TRY003", # long message outside exception class
]
pydocstyle.convention = "numpy"
isort.known-first-party = ["atomate2"]
isort.split-on-trailing-comma = false
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"**/tests/*" = ["ANN", "ARG001", "D", "INP001", "PLR2004", "S101"]
# flake8-type-checking (TCH): things inside TYPE_CHECKING aren't available
# at runtime and so can't be used by pydantic models
# flake8-future-annotations (FA): pipe operator for type unions only work in pydantic models in python 3.10+
"**/schemas/*" = ["FA", "TCH", "UP007"]
"**/schemas.py" = ["FA", "TCH", "UP007"]
"**/settings.py" = ["FA", "TCH", "UP007"]
"docs/*" = ["INP001"]