Skip to content

Commit

Permalink
Merge branch 'remote-main' into atomate2_jz_pheasy_anharmonic
Browse files Browse the repository at this point in the history
  • Loading branch information
hrushikesh-s committed Nov 22, 2024
2 parents 4370a64 + 5f0bc75 commit 9ebcaec
Show file tree
Hide file tree
Showing 388 changed files with 206,522 additions and 728 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# ase needed to get FrechetCellFilter used by ML force fields
pip install git+https://gitlab.com/ase/ase
pip install .[strict,docs]
- name: Build
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# ase needed to get FrechetCellFilter used by ML force fields
pip install git+https://gitlab.com/ase/ase
pip install .[strict,docs]
- name: Build
Expand Down
24 changes: 19 additions & 5 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ jobs:

- uses: pre-commit/[email protected]

test:
test-non-ase:
# prevent this action from running on forks
if: github.repository == 'materialsproject/atomate2'

services:
local_mongodb:
image: mongo:4.0
Expand All @@ -37,6 +40,7 @@ jobs:
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
split: [1, 2, 3]

steps:
- name: Check out repo
Expand Down Expand Up @@ -72,20 +76,30 @@ jobs:
micromamba activate a2
uv pip install --upgrade 'git+https://github.com/materialsproject/pymatgen@${{ github.event.client_payload.pymatgen_ref }}'
- name: Test
- name: Test split ${{ matrix.split }}
env:
MP_API_KEY: ${{ secrets.MP_API_KEY }}

# regenerate durations file with `pytest --store-durations --durations-path tests/.pytest-split-durations`
# Note the use of `--splitting-algorithm least_duration`.
# This helps prevent a test split having no tests to run, and then the GH action failing, see:
# https://github.com/jerry-git/pytest-split/issues/95
# However this `splitting-algorithm` means that tests cannot depend sensitively on the order they're executed in.
run: |
micromamba activate a2
pytest --ignore=tests/ase --cov=atomate2 --cov-report=xml
pytest --splits 3 --group ${{ matrix.split }} --durations-path tests/.pytest-split-durations --splitting-algorithm least_duration --ignore=tests/ase --cov=atomate2 --cov-report=xml
- uses: codecov/codecov-action@v1
if: matrix.python-version == '3.10' && github.repository == 'materialsproject/atomate2'
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: coverage${{ matrix.split }}
file: ./coverage.xml

test-notebooks-and-ase:
# prevent this action from running on forks
if: github.repository == 'materialsproject/atomate2'

# It seems like anything torch-dependent and tblite can't be installed in the same environment
# without the tblite tests failing in CI, see, e.g.:
# https://github.com/tblite/tblite/issues/116
Expand Down Expand Up @@ -143,7 +157,7 @@ jobs:
MP_API_KEY: ${{ secrets.MP_API_KEY }}
run: |
micromamba activate a2
pytest --cov=atomate2 --cov-report=xml tests/ase
pytest --splits 1 --group 1 --cov=atomate2 --cov-report=xml tests/ase
- uses: codecov/codecov-action@v1
if: matrix.python-version == '3.10' && github.repository == 'materialsproject/atomate2'
Expand Down Expand Up @@ -172,7 +186,7 @@ jobs:
run: sphinx-build docs docs_build

automerge:
needs: [lint, test, docs]
needs: [lint, test-non-ase, test-notebooks-and-ase, docs]
runs-on: ubuntu-latest

permissions:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@ docs/reference/atomate2.*
*.doctrees*

.ipynb_checkpoints
.aider*
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ default_language_version:
exclude: ^(.github/|tests/test_data/abinit/)
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.6.7
rev: v0.7.3
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: fix-encoding-pragma
args: [--remove]
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/blacken-docs
rev: 1.18.0
rev: 1.19.1
hooks:
- id: blacken-docs
additional_dependencies: [black]
Expand All @@ -30,7 +30,7 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.13.0
hooks:
- id: mypy
files: ^src/
Expand All @@ -41,11 +41,11 @@ repos:
rev: v2.3.0
hooks:
- id: codespell
stages: [commit, commit-msg]
stages: [pre-commit, commit-msg]
args: [--ignore-words-list, 'titel,statics,ba,nd,te,atomate']
types_or: [python, rst, markdown]
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
rev: 0.8.0
hooks:
- id: nbstripout
args:
Expand Down
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# Change log

## v0.0.18

### New Features 🎉
* Aims magnetic ordering by @tpurcell90 in https://github.com/materialsproject/atomate2/pull/922
* Ferroelectric Workflow 2 by @fraricci in https://github.com/materialsproject/atomate2/pull/1012
* Feat: GW workflow with VASP by @yanghan234 in https://github.com/materialsproject/atomate2/pull/808

### Enhancements 🛠
* Allow energy minimization maker to report energies by @orionarcher in https://github.com/materialsproject/atomate2/pull/1004
* Implementation to adjust get_supercell_size to also generate orthorhombic supercells by @QuantumChemist in https://github.com/materialsproject/atomate2/pull/923
* MPMorph Flows by @BryantLi-BLI in https://github.com/materialsproject/atomate2/pull/938

### House-Keeping 🧹
* Fix `ruff` PLC0206 by @janosh in https://github.com/materialsproject/atomate2/pull/1009
* Update MACE to 0.3.6 by @orionarcher in https://github.com/materialsproject/atomate2/pull/1032
* Allow custom mace model by specifying "model" in calculator kwargs" by @orionarcher in https://github.com/materialsproject/atomate2/pull/1017
* feat: add dedicated fireworks optional dependency (Fix #1033). by @hongyi-zhao in https://github.com/materialsproject/atomate2/pull/1035
* Make testing utils importable by @jmmshn in https://github.com/materialsproject/atomate2/pull/1037

### New Contributors
* @fraricci made their first contribution in https://github.com/materialsproject/atomate2/pull/1012
* @hongyi-zhao made their first contribution in https://github.com/materialsproject/atomate2/pull/1035
* @BryantLi-BLI made their first contribution in https://github.com/materialsproject/atomate2/pull/938
* @yanghan234 made their first contribution in https://github.com/materialsproject/atomate2/pull/808

**Full Changelog**: https://github.com/materialsproject/atomate2/compare/v0.0.17...v0.0.18

## v0.0.17

### Bug Fixes 🐛

* Fix `prev_dir` behavior in input set generator of `MPGGAStaticMaker` by @Andrew-S-Rosen in https://github.com/materialsproject/atomate2/pull/996

### Documentation 📖

* Bump min supported Python to 3.10 by @janosh in https://github.com/materialsproject/atomate2/pull/992

### House-Keeping 🧹

* Excise openff dependency from OpenMM testing by @orionarcher in https://github.com/materialsproject/atomate2/pull/993
* Use `pytest-split` to parallelize across 3 runners and speedup CI by @esoteric-ephemera in https://github.com/materialsproject/atomate2/pull/985

**Full Changelog**: https://github.com/materialsproject/atomate2/compare/v0.0.16...v0.0.17

## v0.0.16

This release brings lots of new workflows and support for all ASE calculators.
Expand Down
16 changes: 5 additions & 11 deletions docs/user/codes/openmm.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,17 @@
>>> conda activate atomate2

# installing atomate2
>>> pip install git+https://github.com/orionarcher/atomate2

# installing classical_md dependencies
>>> conda install -c conda-forge --file .github/classical_md_requirements.txt
>>> pip install "atomate2[openmm]"
```

Alternatively, if you anticipate regularly updating
atomate2 from source (which at this point, you should),
you can clone the repository and install from source.
atomate2 from source, you can clone the repository and install from source.

``` bash
# installing atomate2
>>> git clone https://github.com/orionarcher/atomate2
>>> git clone https://github.com/materialsproject/atomate2
>>> cd atomate2
>>> git branch openff
>>> git checkout openff
>>> git pull origin openff
>>> pip install -e .
>>> pip install -e '.[openmm]'
```

To test the openmm installation, you can run the following command. If
Expand Down Expand Up @@ -458,6 +451,7 @@ run_locally(flows[rank], ensure_success=True)
For now, you'll need to make sure you have a particular emmet branch installed.
Later the builders will be integrated into `main`.

<!-- TODO get emmet@md_builders merged -->
```bash
pip install git+https://github.com/orionarcher/emmet@md_builders
```
Expand Down
42 changes: 21 additions & 21 deletions docs/user/codes/vasp-workflows.csv
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
Name,Type,Maker
`Static`_,job,:obj:`.StaticMaker`
`Relax`_,job,:obj:`.RelaxMaker`
`Tight Relax`_,job,:obj:`.TightRelaxMaker`
`Dielectric`_,job,:obj:`.DielectricMaker`
`Transmuter`_,job,:obj:`.TransmuterMaker`
`HSE06 Static`_,job,:obj:`.HSEStaticMaker`
`HSE06 Relax`_,job,:obj:`.HSERelaxMaker`
`HSE06 Tight Relax`_,job,:obj:`.HSETightRelaxMaker`
`Double Relax`_,flow,:obj:`.DoubleRelaxMaker`
`Band Structure`_,flow,:obj:`.BandStructureMaker`
`Uniform Band Structure`_,flow,:obj:`.UniformBandStructureMaker`
`Line-Mode Band Structure`_,flow,:obj:`.LineModeBandStructureMaker`
`HSE06 Band Structure`_,flow,:obj:`.HSEBandStructureMaker`
`HSE06 Uniform Band Structure`_,flow,:obj:`.HSEUniformBandStructureMaker`
`HSE06 Line-Mode Band Structure`_,flow,:obj:`.HSELineModeBandStructureMaker`
`Relax and Band Structure`_,flow,:obj:`.RelaxBandStructureMaker`
`Elastic Constant`_,flow,:obj:`.ElasticMaker`
`Optics`_,flow,:obj:`.OpticsMaker`
`HSE06 Optics`_,flow,:obj:`.HSEOpticsMaker`
`Phonons`_,flow,:obj:`.PhononMaker`
`Lobster`_,flow,:obj:`.VaspLobsterMaker`
`Static`_,job,:obj:`~atomate2.vasp.jobs.core.StaticMaker`
`Relax`_,job,:obj:`~atomate2.vasp.jobs.core.RelaxMaker`
`Tight Relax`_,job,:obj:`~atomate2.vasp.jobs.core.TightRelaxMaker`
`Dielectric`_,job,:obj:`~atomate2.vasp.jobs.core.DielectricMaker`
`Transmuter`_,job,:obj:`~atomate2.vasp.jobs.core.TransmuterMaker`
`HSE06 Static`_,job,:obj:`~atomate2.vasp.jobs.core.HSEStaticMaker`
`HSE06 Relax`_,job,:obj:`~atomate2.vasp.jobs.core.HSERelaxMaker`
`HSE06 Tight Relax`_,job,:obj:`~atomate2.vasp.jobs.core.HSETightRelaxMaker`
`Double Relax`_,flow,:obj:`~atomate2.vasp.flows.core.DoubleRelaxMaker`
`Band Structure`_,flow,:obj:`~atomate2.vasp.flows.core.BandStructureMaker`
`Uniform Band Structure`_,flow,:obj:`~atomate2.vasp.flows.core.UniformBandStructureMaker`
`Line-Mode Band Structure`_,flow,:obj:`~atomate2.vasp.flows.core.LineModeBandStructureMaker`
`HSE06 Band Structure`_,flow,:obj:`~atomate2.vasp.flows.core.HSEBandStructureMaker`
`HSE06 Uniform Band Structure`_,flow,:obj:`~atomate2.vasp.flows.core.HSEUniformBandStructureMaker`
`HSE06 Line-Mode Band Structure`_,flow,:obj:`~atomate2.vasp.flows.core.HSELineModeBandStructureMaker`
`Relax and Band Structure`_,flow,:obj:`~atomate2.vasp.flows.core.RelaxBandStructureMaker`
`Elastic Constant`_,flow,:obj:`~atomate2.vasp.flows.elastic.ElasticMaker`
`Optics`_,flow,:obj:`~atomate2.vasp.flows.core.OpticsMaker`
`HSE06 Optics`_,flow,:obj:`~atomate2.vasp.flows.core.HSEOpticsMaker`
`Phonons`_,flow,:obj:`~atomate2.vasp.flows.phonons.PhononMaker`
`Lobster`_,flow,:obj:`~atomate2.vasp.flows.lobster.VaspLobsterMaker`
5 changes: 3 additions & 2 deletions docs/user/codes/vasp.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ run_locally(lobster, create_folders=True, store=SETTINGS.JOB_STORE)
```

It is, however, computationally very beneficial to define two different types of job scripts for the VASP and Lobster runs, as VASP and Lobster runs are parallelized differently (MPI vs. OpenMP).
[FireWorks](https://github.com/materialsproject/fireworks) allows to run the VASP and Lobster jobs with different job scripts. Please check out the [jobflow documentation on FireWorks](https://materialsproject.github.io/jobflow/tutorials/8-fireworks.html#setting-the-manager-configs) for more information.
[FireWorks](https://github.com/materialsproject/fireworks) allows one to run the VASP and Lobster jobs with different job scripts. Please check out the [jobflow documentation on FireWorks](https://materialsproject.github.io/jobflow/tutorials/8-fireworks.html#setting-the-manager-configs) for more information.

Specifically, you might want to change the `_fworker` for the LOBSTER runs and define a separate `lobster` worker within FireWorks:

Expand Down Expand Up @@ -468,7 +468,8 @@ Finally, sometimes you have a workflow containing many VASP jobs. In this case i
tedious to update the input sets for each job individually. Atomate2 provides helper
functions called "powerups" that can apply settings updates to all VASP jobs in a flow.
These powerups also contain filters for the name of the job and the maker used to
generate them.
generate them. These functions will apply updates *only* to VASP jobs, including those
created dynamically - all other jobs in a flow will not be modified.

```py
from atomate2.vasp.powerups import update_user_incar_settings
Expand Down
Loading

0 comments on commit 9ebcaec

Please sign in to comment.