-
Notifications
You must be signed in to change notification settings - Fork 104
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
Materials Project GGA and meta-GGA workflows #504
Conversation
wrong key user_incar_settings -> INCAR and raises ruamel/yaml/comments.py:881: in update self._ok.add(*kw.keys()) E TypeError: set.add() takes exactly one argument (3 given)
for consistency with MPPreRelaxMaker
…elaxMaker was passed to __init__, needs to be passed to make()
…ests just test_MP2023RelaxMaker_default_values() for now
fix bandgap doc str in the wrong place
rename test_mp_(meta_)gga_relax to test_mp_(meta_)gga_double_relax_static
pytest tests/vasp/jobs/test_mp.py now passes
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #504 +/- ##
==========================================
+ Coverage 75.09% 75.66% +0.56%
==========================================
Files 74 77 +3
Lines 6570 6727 +157
Branches 952 986 +34
==========================================
+ Hits 4934 5090 +156
- Misses 1330 1331 +1
Partials 306 306
|
Wow, 1st time ever this PR has had green CI! 🎉 Only took a few months. 😅 |
vasprun=vasprun, | ||
outcar=outcar, | ||
) | ||
prev_incar = prev_incar if self.inherit_incar else {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to disable inheritance for the tests to pass? Surely the test data can be changed?
src/atomate2/settings.py
Outdated
VASP_INHERIT_INCAR: bool = Field( | ||
False, | ||
description="Whether to inherit INCAR settings from previous calculation. " | ||
"This might be useful to port Custodian fixes to child jobs but can also be " | ||
"dangerous e.g. when switching from GGA to meta-GGA or relax to static jobs.", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As advocated for by @Andrew-S-Rosen during the atomate2 maintainer meeting, INCAR inheritance can also be controlled by the global VASP_INHERIT_INCAR
flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has changed the default behaviour for all input sets. Please can you change this to True and we can assess this as a separate issue. This discussion should probably happen on the pymatgen issues since the default pymatgen behaviour is to inherit incar settings and we will be merging the atomate2 inputs with those in pymatgen soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. VASP_INHERIT_INCAR
now defaults to True
.
also revert to Yb_2 and W_pv
@@ -305,6 +311,7 @@ class VaspInputGenerator(InputGenerator): | |||
symprec: float = SETTINGS.SYMPREC | |||
vdw: str = None | |||
config_dict: dict = field(default_factory=lambda: _BASE_VASP_SET) | |||
inherit_incar: bool = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add docstring for this option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
This looks good to me! |
This PR branches off from #362. It implements the future Materials Project PBE and r2SCAN relaxations as 3-step workflows consisting of a double-relaxation followed by a higher-quality static job (all as in #362 so far) but builds these 3 steps out of
MP(Meta)GGADoubleRelaxMakers
that are exported for standalone use, as well as called insideMP(Meta)GGADoubleRelaxStatic
(the main workflows intended for public use).The difference to #362 is intended to address #362 (comment) and more closely align the MP workflow API with the existing
DoubleRelaxMaker
inatomate2.vasp.flows.core
.Closes #352. Closes #363. Closes #364.
LMAXTAU
should be auto-set when there are f electrons andLASPH
is True for meta-GGA calculations #363LMAXMIX
should be set based on the presence of s, p, d, f electrons not based on Z #364This has been a team effort with @esoteric-ephemera and @Andrew-S-Rosen. 🙏