Skip to content

Commit 128b178

Browse files
Deprecate extras (#672)
1 parent 9507205 commit 128b178

File tree

25 files changed

+106
-783
lines changed

25 files changed

+106
-783
lines changed

.github/workflows/ci-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
python-version: ${{ matrix.python-version }}
2323

2424
- name: Install dependencies
25-
run: uv sync --extra all
25+
run: uv sync --extra chgnet --extra dpa3 --extra d3 --extra grace --extra mace --extra orb --extra pet-mad --extra plumed
2626

2727
# Full reinstall in case the version number is the same as the last release
2828
- name: Uninstall release versions

.github/workflows/ci.yml

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uv cache clean
2626
2727
- name: Install "all" dependencies
28-
run: uv sync --extra all
28+
run: uv sync --extra chgnet --extra dpa3 --extra d3 --extra grace --extra mace --extra orb --extra pet-mad --extra plumed
2929

3030
- name: Install PLUMED
3131
uses: Iximiel/install-plumed@v1
@@ -51,7 +51,7 @@ jobs:
5151
- name: Install updated e3nn dependencies
5252
run: |
5353
uv cache clean
54-
uv sync --extra mattersim --extra fairchem-1 --extra sevennet --extra nequip --extra d3
54+
uv sync --extra mattersim --extra fairchem --extra sevennet --extra nequip --extra d3
5555
uv pip install --reinstall pynvml
5656
uv pip install fairchem-core[torch-extras] --no-build-isolation
5757
@@ -62,32 +62,6 @@ jobs:
6262
HF_TOKEN: ${{ secrets.HF_TOKEN }}
6363
run: uv run --no-sync pytest tests/test_{mlip_calculators,single_point}.py
6464

65-
- name: Install dgl dependencies
66-
run: |
67-
uv cache clean
68-
uv sync --extra mace --extra m3gnet --extra alignn --extra d3
69-
uv pip install --reinstall pynvml
70-
71-
- name: Run test suite for dgl dependencies
72-
env:
73-
# show timings of tests
74-
PYTEST_ADDOPTS: "--durations=0"
75-
run: uv run --no-sync pytest tests/test_{mlip_calculators,single_point,eos}.py
76-
77-
- name: Install UMA
78-
run: |
79-
uv cache clean
80-
uv sync --extra fairchem-2
81-
uv pip install --reinstall pynvml
82-
uv pip install fairchem-core --no-build-isolation
83-
84-
- name: Run test suite for UMA
85-
env:
86-
# show timings of tests
87-
PYTEST_ADDOPTS: "--durations=0"
88-
HF_TOKEN: ${{ secrets.HF_TOKEN }}
89-
run: uv run --no-sync pytest tests/test_{mlip_calculators,single_point}.py
90-
9165
- name: Report coverage to Coveralls
9266
uses: coverallsapp/github-action@v2
9367
with:

.github/workflows/mac.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
python-version: ${{ matrix.python-version }}
2222

2323
- name: Install "all" dependencies
24-
run: uv sync --extra all
24+
run: uv sync --extra chgnet --extra dpa3 --extra d3 --extra grace --extra mace --extra orb --extra pet-mad --extra plumed
2525

2626
- name: Install PLUMED
2727
uses: Iximiel/install-plumed@v1
@@ -46,7 +46,7 @@ jobs:
4646

4747
- name: Install updated e3nn dependencies
4848
run: |
49-
uv sync --extra mattersim --extra fairchem-1 --extra sevennet --extra nequip --extra d3
49+
uv sync --extra mattersim --extra fairchem --extra sevennet --extra nequip --extra d3
5050
uv pip install --reinstall pynvml
5151
uv pip install "fairchem-core[torch-extras]" --no-build-isolation
5252
@@ -56,27 +56,3 @@ jobs:
5656
PYTEST_ADDOPTS: "--durations=0"
5757
HF_TOKEN: ${{ secrets.HF_TOKEN }}
5858
run: uv run --no-sync pytest tests/test_{mlip_calculators,single_point}.py
59-
60-
- name: Install dgl dependencies
61-
run: |
62-
uv sync --extra mace --extra m3gnet --extra alignn --extra d3
63-
uv pip install --reinstall pynvml
64-
65-
- name: Run test suite for dgl dependencies
66-
env:
67-
# show timings of tests
68-
PYTEST_ADDOPTS: "--durations=0"
69-
run: uv run --no-sync pytest tests/test_{mlip_calculators,single_point,eos}.py
70-
71-
- name: Install UMA
72-
run: |
73-
uv sync --extra fairchem-2
74-
uv pip install --reinstall pynvml
75-
uv pip install fairchem-core --no-build-isolation
76-
77-
- name: Run test suite for UMA
78-
env:
79-
# show timings of tests
80-
PYTEST_ADDOPTS: "--durations=0"
81-
HF_TOKEN: ${{ secrets.HF_TOKEN }}
82-
run: uv run --no-sync pytest tests/test_{mlip_calculators,single_point}.py

.github/workflows/windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
prune-cache: false
2626

2727
- name: Install "all" dependencies
28-
run: uv sync --extra all
28+
run: uv sync --extra chgnet --extra dpa3 --extra d3 --extra grace --extra mace
2929

3030
- name: Download extra models
3131
shell: bash
@@ -40,7 +40,7 @@ jobs:
4040

4141
- name: Install updated e3nn dependencies
4242
run: |
43-
uv sync --extra fairchem-1 --extra sevennet --extra nequip
43+
uv sync --extra fairchem --extra sevennet --extra nequip
4444
uv pip install --reinstall pynvml
4545
uv pip install "fairchem-core[torch-extras]" --no-build-isolation
4646

README.md

Lines changed: 62 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ python3 -m pip install janus-core[mace,chgnet,sevennet]
5757
> for more details.
5858
5959

60-
To install all MLIPs currently compatible with MACE, run:
61-
62-
```python
63-
python3 -m pip install janus-core[all]
64-
```
65-
6660
Individual `extras` are listed in [Getting Started](https://stfc.github.io/janus-core/user_guide/get_started.html#installation), as well as in [pyproject.toml](pyproject.toml) under `[project.optional-dependencies]`.
6761

6862

@@ -82,17 +76,13 @@ Current and planned features include:
8276

8377
- [x] Support for multiple MLIPs
8478
- MACE
85-
- M3GNet
8679
- CHGNet
87-
- ALIGNN
8880
- SevenNet
8981
- NequIP
9082
- DPA3
9183
- Orb
9284
- MatterSim
9385
- GRACE
94-
- EquiformerV2
95-
- eSEN
9686
- UMA
9787
- PET-MAD
9888
- [x] Single point calculations
@@ -245,66 +235,67 @@ prints the following:
245235
```shell
246236
Usage: janus singlepoint [OPTIONS]
247237

248-
Perform single point calculations and save to file.
249-
250-
251-
╭─ Options ───────────────────────────────────────────────────────────────────────────╮
252-
│ --config TEXT Path to configuration file. │
253-
│ --help Show this message and exit. │
254-
╰─────────────────────────────────────────────────────────────────────────────────────╯
255-
╭─ MLIP calculator ───────────────────────────────────────────────────────────────────╮
256-
* --arch [mace|mace_mp|mace_off|m3gne MLIP architecture to use for
257-
│ t|chgnet|alignn|sevennet|neq calculations. │
258-
│ uip|dpa3|orb|mattersim|grace [required] │
259-
|esen|equiformer|pet_mad|uma │
260-
|mace_omol] │
261-
│ --device [cpu|cuda|mps|xpu] Device to run calculations │
262-
│ on. │
263-
│ [default: cpu] │
264-
│ --model TEXT MLIP model name, or path to │
265-
│ model. │
266-
│ --calc-kwargs DICT Keyword arguments to pass to │
267-
│ selected calculator. Must be │
268-
│ passed as a dictionary │
269-
│ wrapped in quotes, e.g. │
270-
"{'key': value}". │
271-
╰─────────────────────────────────────────────────────────────────────────────────────╯
272-
╭─ Calculation ───────────────────────────────────────────────────────────────────────╮
273-
* --struct PATH Path of structure to simulate. │
274-
│ [required] │
275-
│ --properties [energy|stress|forces|hessia Properties to calculate. If │
276-
│ n] not specified, 'energy', │
277-
'forces' and 'stress' will be │
278-
│ returned. │
279-
│ --out PATH Path to save structure with │
280-
│ calculated results. Default is │
281-
│ inferred from `file_prefix`. │
282-
╰─────────────────────────────────────────────────────────────────────────────────────╯
283-
╭─ Structure I/O ─────────────────────────────────────────────────────────────────────╮
284-
│ --file-prefix PATH Prefix for output files, including directories. Default │
285-
│ directory is ./janus_results, and default filename │
286-
│ prefix is inferred from the input stucture filename. │
287-
│ --read-kwargs DICT Keyword arguments to pass to ase.io.read. Must be │
288-
│ passed as a dictionary wrapped in quotes, e.g. "{'key': │
289-
│ value}". By default, read_kwargs['index'] = ':', so all │
290-
│ structures are read. │
291-
│ --write-kwargs DICT Keyword arguments to pass to ase.io.write when saving │
292-
│ any structures. Must be passed as a dictionary wrapped │
293-
in quotes, e.g. "{'key': value}". │
294-
╰─────────────────────────────────────────────────────────────────────────────────────╯
295-
╭─ Logging/summary ───────────────────────────────────────────────────────────────────╮
296-
│ --log PATH Path to save logs to. Default is │
297-
│ inferred from `file_prefix`
298-
│ --tracker --no-tracker Whether to save carbon emissions of │
299-
│ calculation │
300-
│ [default: tracker] │
301-
│ --summary PATH Path to save summary of inputs, │
302-
│ start/end time, and carbon emissions. │
303-
│ Default is inferred from │
304-
`file_prefix`. │
305-
│ --progress-bar --no-progress-bar Whether to show progress bar. │
306-
│ [default: progress-bar] │
307-
╰─────────────────────────────────────────────────────────────────────────────────────╯
238+
Perform single point calculations and save to file.
239+
240+
╭─ Options ────────────────────────────────────────────────────────────────────────╮
241+
│ --config TEXT Path to configuration file. │
242+
│ --help Show this message and exit. │
243+
╰──────────────────────────────────────────────────────────────────────────────────╯
244+
╭─ MLIP calculator ────────────────────────────────────────────────────────────────╮
245+
* --arch [mace|mace_mp|mace_off|chg MLIP architecture to use for
246+
│ net|sevennet|nequip|dpa3|o calculations. │
247+
│ rb|mattersim|grace|pet_mad [required] │
248+
|fairchem|mace_omol] │
249+
│ --device [cpu|cuda|mps|xpu] Device to run calculations │
250+
│ on. │
251+
│ [default: cpu] │
252+
│ --model TEXT MLIP model name, or path to │
253+
│ model. │
254+
│ --calc-kwargs DICT Keyword arguments to pass to │
255+
│ selected calculator. Must be │
256+
│ passed as a dictionary │
257+
│ wrapped in quotes, e.g. │
258+
"{'key': value}". │
259+
╰──────────────────────────────────────────────────────────────────────────────────╯
260+
╭─ Calculation ────────────────────────────────────────────────────────────────────╮
261+
* --struct PATH Path of structure to │
262+
│ simulate. │
263+
│ [required] │
264+
│ --properties [energy|stress|forces|hessi Properties to calculate. If │
265+
│ an] not specified, 'energy', │
266+
'forces' and 'stress' will │
267+
│ be returned. │
268+
│ --out PATH Path to save structure with │
269+
│ calculated results. Default │
270+
│ is inferred from │
271+
`file_prefix`. │
272+
╰──────────────────────────────────────────────────────────────────────────────────╯
273+
╭─ Structure I/O ──────────────────────────────────────────────────────────────────╮
274+
│ --file-prefix PATH Prefix for output files, including directories. │
275+
│ Default directory is ./janus_results, and default │
276+
│ filename prefix is inferred from the input stucture │
277+
│ filename. │
278+
│ --read-kwargs DICT Keyword arguments to pass to ase.io.read. Must be │
279+
│ passed as a dictionary wrapped in quotes, e.g. │
280+
"{'key': value}". By default, read_kwargs['index'] = │
281+
':', so all structures are read. │
282+
│ --write-kwargs DICT Keyword arguments to pass to ase.io.write when │
283+
│ saving any structures. Must be passed as a │
284+
│ dictionary wrapped in quotes, e.g. "{'key': value}". │
285+
╰──────────────────────────────────────────────────────────────────────────────────╯
286+
╭─ Logging/summary ────────────────────────────────────────────────────────────────╮
287+
│ --log PATH Path to save logs to. Default is │
288+
│ inferred from `file_prefix`
289+
│ --tracker --no-tracker Whether to save carbon emissions of │
290+
│ calculation │
291+
│ [default: tracker] │
292+
│ --summary PATH Path to save summary of inputs, │
293+
│ start/end time, and carbon │
294+
│ emissions. Default is inferred from │
295+
`file_prefix`. │
296+
│ --progress-bar --no-progress-bar Whether to show progress bar. │
297+
│ [default: progress-bar] │
298+
╰──────────────────────────────────────────────────────────────────────────────────╯
308299
```
309300

310301

@@ -403,7 +394,7 @@ We recommend installing uv for dependency management when developing for `janus-
403394
```shell
404395
git clone https://github.com/stfc/janus-core
405396
cd janus-core
406-
uv sync --extra all # Create a virtual environment and install dependencies
397+
uv sync --extra chgnet --extra d3 --extra mace --extra orb # Create a virtual environment and install dependencies
407398
source .venv/bin/activate
408399
pre-commit install # Install pre-commit hooks
409400
pytest -v # Discover and run all tests

containers/Dockerfile.marimo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RUN uv pip install --no-cache-dir marimo[recommended,lsp,sql] altair pandas pyth
4949
openai \
5050
nbformat \
5151
pytest
52-
RUN uv pip install --no-cache-dir 'janus-core[all]@git+https://github.com/stfc/janus-core.git@main'
52+
RUN uv pip install --no-cache-dir 'janus-core[chgnet,dpa3,d3,grace,mace,orb,pet-mad,plumed]@git+https://github.com/stfc/janus-core.git@main'
5353
RUN uv pip install --no-cache-dir cuequivariance==0.5.1 \
5454
cuequivariance-torch==0.6.1 \
5555
cuequivariance-ops-torch-cu12==0.6.1 \

0 commit comments

Comments
 (0)