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

Use MP VASP input sets directly without copying them in quacc #1311

Closed
Andrew-S-Rosen opened this issue Dec 7, 2023 · 0 comments · Fixed by #1649
Closed

Use MP VASP input sets directly without copying them in quacc #1311

Andrew-S-Rosen opened this issue Dec 7, 2023 · 0 comments · Fixed by #1649
Assignees
Labels
housekeeping Things to tidy up that are otherwise kind of boring VASP

Comments

@Andrew-S-Rosen
Copy link
Member

Andrew-S-Rosen commented Dec 7, 2023

What new feature would you like to see?

This will ensure 1:1 compatibility and reduce the need to maintain them in presets. See materialsproject/pymatgen#3484

@Andrew-S-Rosen Andrew-S-Rosen added the housekeeping Things to tidy up that are otherwise kind of boring label Dec 7, 2023
@Andrew-S-Rosen Andrew-S-Rosen self-assigned this Dec 7, 2023
@Andrew-S-Rosen Andrew-S-Rosen removed their assignment Dec 14, 2023
@Andrew-S-Rosen Andrew-S-Rosen self-assigned this Feb 1, 2024
Andrew-S-Rosen added a commit that referenced this issue Feb 17, 2024
Closes #1311.

This PR allows support for Pymatgen-formatted input sets in the `Vasp`
calculator and, by extension, all VASP recipes. The `Vasp` calculator
takes a new keyword argument `pmg_input_set: DictSet | None = None`
that, if specified, would act in the same was a preset by providing a
list of default parameters to use. Any class inheriting from
[`pymatgen.io.vasp.sets.DictSet`](https://github.com/materialsproject/pymatgen/blob/main/pymatgen/io/vasp/sets.py)
is usable. This also means we can use the MP-compatible, pymatgen input
sets directly without having to try and duplicate them 1:1 in `quacc`,
such as by doing `pmg_input_set = MPRelaxSet`.

I also renamed `mp_relax_job` to `mp_metagga_relax_job` (and similar for
the rest) to allow for a future addition of the GGA MP workflows.

Requires: A new release of pymatgen to be minted (bumped in #1622).

Example:

```python
from ase.build import bulk
from quacc.calculators.vasp import Vasp
from pymatgen.io.vasp.sets import MPRelaxSet

atoms = bulk("Fe") * (2, 1, 1)
atoms[0].symbol = "O"
calc = Vasp(atoms, pmg_input_set=MPRelaxSet)
print(calc.parameters)
```

---------

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Things to tidy up that are otherwise kind of boring VASP
Development

Successfully merging a pull request may close this issue.

1 participant