Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement MP2024 recipes #2138

Draft
wants to merge 51 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
43acd2f
Implement MP2024 recipes
Andrew-S-Rosen May 13, 2024
908b34b
fix
Andrew-S-Rosen May 13, 2024
0db00b0
fix
Andrew-S-Rosen May 13, 2024
6ab5577
Merge branch 'main' into mp2024
Andrew-S-Rosen May 13, 2024
3d5af70
fix
Andrew-S-Rosen May 13, 2024
e393cb9
fix
Andrew-S-Rosen May 13, 2024
b74d587
fix
Andrew-S-Rosen May 13, 2024
656a8ff
fix
Andrew-S-Rosen May 13, 2024
9a78b69
pre-commit auto-fixes
pre-commit-ci[bot] May 13, 2024
b590420
fix
Andrew-S-Rosen May 13, 2024
123a726
Update vasp.py
Andrew-S-Rosen May 13, 2024
7a0c13b
fix
Andrew-S-Rosen May 13, 2024
ef8f7e1
pre-commit auto-fixes
pre-commit-ci[bot] May 13, 2024
452c947
Merge branch 'main' into mp2024
Andrew-S-Rosen May 13, 2024
9d9fa23
Update mp.py
Andrew-S-Rosen May 13, 2024
655b0a5
Update vasp.py
Andrew-S-Rosen May 13, 2024
30a384b
pre-commit auto-fixes
pre-commit-ci[bot] May 13, 2024
a2f1b53
Update vasp.py
Andrew-S-Rosen May 13, 2024
8236cba
pre-commit auto-fixes
pre-commit-ci[bot] May 13, 2024
ceec820
Update vasp.py
Andrew-S-Rosen May 13, 2024
8afa7c8
pre-commit auto-fixes
pre-commit-ci[bot] May 13, 2024
96fe7f4
Update vasp.py
Andrew-S-Rosen May 13, 2024
9f6dfa7
pre-commit auto-fixes
pre-commit-ci[bot] May 13, 2024
18e4e88
fix
Andrew-S-Rosen May 13, 2024
1cc9cba
pre-commit auto-fixes
pre-commit-ci[bot] May 13, 2024
f312fa6
Update vasp.py
Andrew-S-Rosen May 13, 2024
26b4729
pre-commit auto-fixes
pre-commit-ci[bot] May 13, 2024
ffe74aa
Update test_vasp_schema.py
Andrew-S-Rosen May 13, 2024
f0b7f62
pre-commit auto-fixes
pre-commit-ci[bot] May 13, 2024
faf5695
fix
Andrew-S-Rosen May 13, 2024
3d577b2
Merge branch 'mp2024' of github.com:Quantum-Accelerators/quacc into m…
Andrew-S-Rosen May 14, 2024
a1fae12
pre-commit auto-fixes
pre-commit-ci[bot] May 14, 2024
ef793a1
fix
Andrew-S-Rosen May 14, 2024
5189a85
pre-commit auto-fixes
pre-commit-ci[bot] May 14, 2024
468fabb
Update mp.py
Andrew-S-Rosen May 14, 2024
fbd0435
fix
Andrew-S-Rosen May 14, 2024
ae55952
Merge branch 'mp2024' of github.com:Quantum-Accelerators/quacc into m…
Andrew-S-Rosen May 14, 2024
382c584
pre-commit auto-fixes
pre-commit-ci[bot] May 14, 2024
70ad46e
fix
Andrew-S-Rosen May 14, 2024
609ebbf
Merge branch 'mp2024' of github.com:Quantum-Accelerators/quacc into m…
Andrew-S-Rosen May 14, 2024
f7e6e95
fix
Andrew-S-Rosen May 14, 2024
0621f28
Merge branch 'main' into mp2024
Andrew-S-Rosen Jun 5, 2024
724104e
Merge branch 'main' into mp2024
Andrew-S-Rosen Jun 5, 2024
c33ddfe
Merge branch 'main' into mp2024
Andrew-S-Rosen Jun 12, 2024
bdfbcb8
Merge branch 'main' into mp2024
Andrew-S-Rosen Jun 15, 2024
48aa9f2
Merge branch 'main' into mp2024
Andrew-S-Rosen Jun 20, 2024
eb6a46b
Merge branch 'main' into mp2024
Andrew-S-Rosen Jun 20, 2024
af33428
Merge branch 'main' into mp2024
Andrew-S-Rosen Jun 20, 2024
baed085
Update test_vasp_schema.py
Andrew-S-Rosen Jun 20, 2024
64ec729
Merge branch 'main' into mp2024
Andrew-S-Rosen Jul 1, 2024
6466743
fix
Andrew-S-Rosen Jul 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Added

- Added a context handler, `quacc.settings.change_settings`, that can be used to modify global settings temporarily
- Added `quacc.calculators.vasp.params.MPtoASEConverter` to convert between Pymatgen- and Atomate2-style input parameters to ASE-compatabile parameters
- Added `quacc.calculators.vasp.params.MPtoASEParams` to convert between Pymatgen- and Atomate2-style input parameters to ASE-compatabile parameters

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion docs/dev/recipes/flows.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A flow is a Python function decorated by `#!Python @flow` that contains a collec

### Production Example

A simple, representative flow can be found in [quacc.recipes.vasp.mp.mp_metagga_relax_flow][].
A simple, representative flow can be found in [quacc.recipes.vasp.mp.mp_relax_flow][].

!!! Note

Expand Down
33 changes: 15 additions & 18 deletions docs/user/recipes/recipes_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,23 +243,20 @@ The list of available quacc recipes is shown below. The "Req'd Extras" column sp

<center>

| Name | Decorator | Documentation | Req'd Extras |
| ------------------------------- | ---------------- | ----------------------------------------------- | ------------ |
| VASP Static | `#!Python @job` | [quacc.recipes.vasp.core.static_job][] | |
| VASP Relax | `#!Python @job` | [quacc.recipes.vasp.core.relax_job][] | |
| VASP Double Relax | `#!Python @flow` | [quacc.recipes.vasp.core.double_relax_flow][] | |
| VASP Non-SCF | `#!Python @job` | [quacc.recipes.vasp.core.non_scf_job][] | |
| VASP Slab Static | `#!Python @job` | [quacc.recipes.vasp.slabs.static_job][] | |
| VASP Slab Relax | `#!Python @job` | [quacc.recipes.vasp.slabs.relax_job][] | |
| VASP Bulk to Slabs | `#!Python @flow` | [quacc.recipes.vasp.slabs.bulk_to_slabs_flow][] | |
| VASP Slab to Adsorbates | `#!Python @flow` | [quacc.recipes.vasp.slabs.slab_to_ads_flow][] | |
| VASP MP GGA Relax | `#!Python @job` | [quacc.recipes.vasp.mp.mp_gga_relax_job][] | `quacc[mp]` |
| VASP MP GGA Static | `#!Python @job` | [quacc.recipes.vasp.mp.mp_gga_static_job][] | `quacc[mp]` |
| VASP MP GGA Relax Workflow | `#!Python @flow` | [quacc.recipes.vasp.mp.mp_gga_relax_flow][] | `quacc[mp]` |
| VASP MP Meta-GGA Prerelax | `#!Python @job` | [quacc.recipes.vasp.mp.mp_metagga_relax_job][] | `quacc[mp]` |
| VASP MP Meta-GGA Relax | `#!Python @job` | [quacc.recipes.vasp.mp.mp_metagga_relax_job][] | `quacc[mp]` |
| VASP MP Meta-GGA Static | `#!Python @job` | [quacc.recipes.vasp.mp.mp_metagga_static_job][] | `quacc[mp]` |
| VASP MP Meta-GGA Relax Workflow | `#!Python @flow` | [quacc.recipes.vasp.mp.mp_metagga_relax_flow][] | `quacc[mp]` |
| VASP QMOF Relax | `#!Python @job` | [quacc.recipes.vasp.qmof.qmof_relax_job][] | |
| Name | Decorator | Documentation | Req'd Extras |
| ----------------------- | ---------------- | ----------------------------------------------- | ------------ |
| VASP Static | `#!Python @job` | [quacc.recipes.vasp.core.static_job][] | |
| VASP Relax | `#!Python @job` | [quacc.recipes.vasp.core.relax_job][] | |
| VASP Double Relax | `#!Python @flow` | [quacc.recipes.vasp.core.double_relax_flow][] | |
| VASP Non-SCF | `#!Python @job` | [quacc.recipes.vasp.core.non_scf_job][] | |
| VASP Slab Static | `#!Python @job` | [quacc.recipes.vasp.slabs.static_job][] | |
| VASP Slab Relax | `#!Python @job` | [quacc.recipes.vasp.slabs.relax_job][] | |
| VASP Bulk to Slabs | `#!Python @flow` | [quacc.recipes.vasp.slabs.bulk_to_slabs_flow][] | |
| VASP Slab to Adsorbates | `#!Python @flow` | [quacc.recipes.vasp.slabs.slab_to_ads_flow][] | |
| VASP MP Pre-Relax | `#!Python @job` | [quacc.recipes.vasp.mp.mp_pre_relax_job][] | `quacc[mp]` |
| VASP MP Relax | `#!Python @job` | [quacc.recipes.vasp.mp.mp_relax_job][] | `quacc[mp]` |
| VASP MP Static | `#!Python @job` | [quacc.recipes.vasp.mp.mp_static_job][] | `quacc[mp]` |
| VASP MP Relax Workflow | `#!Python @flow` | [quacc.recipes.vasp.mp.mp_relax_flow][] | `quacc[mp]` |
| VASP QMOF Relax | `#!Python @job` | [quacc.recipes.vasp.qmof.qmof_relax_job][] | |

</center>
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dask = ["dask[distributed]>=2023.12.1", "dask-jobqueue>=0.8.2"]
defects = ["pymatgen-analysis-defects>=2023.8.22", "shakenbreak>=3.2.0"]
jobflow = ["jobflow[fireworks]>=0.1.14", "jobflow-remote>=0.1.0"]
mlp = ["matgl>=1.1.2", "chgnet>=0.3.3", "mace-torch>=0.3.3", "torch-dftd>=0.4.0"]
mp = ["atomate2>=0.0.14"]
mp = ["atomate2>=0.0.14", "pymatgen-io-validation>=0.0.3"]
newtonnet = ["newtonnet>=1.1"]
parsl = ["parsl[monitoring]>=2024.5.27; platform_system!='Windows'"]
phonons = ["phonopy>=2.20.0", "seekpath>=2.1.0"]
Expand Down
2 changes: 1 addition & 1 deletion src/quacc/calculators/vasp/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def set_pmg_kpts(
return user_calc_params


class MPtoASEConverter:
class MPtoASEParams:
"""
Convert an MP-formatted input set to an ASE-formatted input set.
"""
Expand Down
18 changes: 10 additions & 8 deletions src/quacc/recipes/vasp/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def run_and_summarize(
preset: str | None = None,
calc_defaults: dict[str, Any] | None = None,
calc_swaps: dict[str, Any] | None = None,
report_mp_corrections: bool = False,
check_mp_compatibility: bool = False,
additional_fields: dict[str, Any] | None = None,
copy_files: SourceDirectory | dict[SourceDirectory, Filenames] | None = None,
) -> VaspSchema:
Expand All @@ -47,8 +47,9 @@ def run_and_summarize(
Dictionary of custom kwargs for the Vasp calculator. Set a value to
`None` to remove a pre-existing key entirely. For a list of available
keys, refer to [quacc.calculators.vasp.vasp.Vasp][].
report_mp_corrections
Whether to report the Materials Project corrections in the results.
check_mp_compatibility
Whether to check compatibility with the current version of MP.
Requires `pymatgen-io-validation` to do the check.
additional_fields
Additional fields to supply to the summarizer.
copy_files
Expand All @@ -66,7 +67,7 @@ def run_and_summarize(

return vasp_summarize_run(
final_atoms,
report_mp_corrections=report_mp_corrections,
check_mp_compatibility=check_mp_compatibility,
additional_fields=additional_fields,
)

Expand All @@ -78,7 +79,7 @@ def run_and_summarize_opt(
calc_swaps: dict[str, Any] | None = None,
opt_defaults: dict[str, Any] | None = None,
opt_params: OptParams | None = None,
report_mp_corrections: bool = False,
check_mp_compatibility: bool = False,
additional_fields: dict[str, Any] | None = None,
copy_files: SourceDirectory | dict[SourceDirectory, Filenames] | None = None,
) -> VaspASEOptSchema:
Expand All @@ -101,8 +102,9 @@ def run_and_summarize_opt(
Default arguments for the ASE optimizer.
opt_params
Dictionary of custom kwargs for [quacc.runners.ase.Runner.run_opt][]
report_mp_corrections
Whether to report the Materials Project corrections in the results.
check_mp_compatibility
Whether to check compatibility with the current version of MP.
Requires `pymatgen-io-validation` to do the check.
additional_fields
Additional fields to supply to the summarizer.
copy_files
Expand All @@ -121,6 +123,6 @@ def run_and_summarize_opt(

return summarize_vasp_opt_run(
dyn,
report_mp_corrections=report_mp_corrections,
check_mp_compatibility=check_mp_compatibility,
additional_fields=additional_fields,
)
Loading
Loading