Skip to content

Commit

Permalink
Update the Espresso preset default (#1472)
Browse files Browse the repository at this point in the history
## Summary of Changes

Changes the default preset for Espresso PW jobs to be
"sssp_1.3.0_pbe_efficiency". Closes #1465.

## Requirements

### Checklist

- [x] I have read the [Contributing
Guide](https://quantum-accelerators.github.io/quacc/dev/contributing.html).
Don't lie! 😉
- [x] My PR is on a custom branch and is _not_ named `main`.
- [x] I have used `black`, `isort`, and `ruff` as described in the
[style
guide](https://quantum-accelerators.github.io/quacc/dev/contributing.html#style).
- [x] I have added relevant, comprehensive [unit
tests](https://quantum-accelerators.github.io/quacc/dev/contributing.html#unit-tests).

### Notes

- Your PR will likely not be merged without proper and thorough tests.
- If you are an external contributor, you will see a comment from
[@buildbot-princeton](https://github.com/buildbot-princeton). This is
solely for the maintainers.
- When your code is ready for review, ping one of the [active
maintainers](https://quantum-accelerators.github.io/quacc/about/contributors.html#active-maintainers).
  • Loading branch information
Andrew-S-Rosen authored Jan 5, 2024
1 parent 14219ed commit 6760450
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
10 changes: 0 additions & 10 deletions src/quacc/calculators/espresso/presets/basic_pw.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions src/quacc/recipes/espresso/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@job
def static_job(
atoms: Atoms,
preset: str | None = "basic_pw",
preset: str | None = "sssp_1.3.0_pbe_efficiency",
parallel_info: dict[str] | None = None,
copy_files: str | Path | list[str | Path] | None = None,
**calc_kwargs,
Expand Down Expand Up @@ -76,7 +76,7 @@ def static_job(
@job
def relax_job(
atoms: Atoms,
preset: str | None = "basic_pw",
preset: str | None = "sssp_1.3.0_pbe_efficiency",
relax_cell: bool = False,
parallel_info: dict[str] | None = None,
copy_files: str | Path | list[str | Path] | None = None,
Expand Down
7 changes: 4 additions & 3 deletions tests/core/recipes/espresso_recipes/test_espresso.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ def test_static_job(tmp_path, monkeypatch):
assert results["results"]["energy"] == pytest.approx(-293.71195934404255)

new_input_data = results["parameters"]["input_data"]
assert new_input_data["system"]["degauss"] == 0.001
assert new_input_data["system"]["occupations"] == "smearing"
assert new_input_data["system"]["ecutwfc"] == 30.0
assert new_input_data["system"]["ecutrho"] == 240.0
assert "kspacing" not in results["parameters"]
Expand Down Expand Up @@ -204,7 +202,10 @@ def test_relax_job_cell(tmp_path, monkeypatch):
atoms = bulk("Si")

pseudopotentials = {"Si": "Si.upf"}
input_data = {"control": {"pseudo_dir": tmp_path}}
input_data = {
"control": {"pseudo_dir": tmp_path},
"system": {"occupations": "smearing", "degauss": 0.001},
}

results = relax_job(
atoms,
Expand Down

0 comments on commit 6760450

Please sign in to comment.