Conversation
gpetretto
left a comment
There was a problem hiding this comment.
Thanks for porting the DFT workflows to atomate. I went thorugh the code and left some comments.
I would say that the main one concerns anaddb. I don't think that
- anaddb should be run inside the mrgddb job. It should have its own Job and input generator, since it is much more likely to be customized compared to mrgddb.
- the outputs of the postprocessing with anaddb should be in the mrgddb output document.
An additional point that is not present in the comment concerns the fact that, if I am not wrong, with the introduction of the DFPT workflow the abipy manager should be configured, while before it was not needed. It probably being used to generate the list of pertrubations and to run anaddb behind the curtains. I am wondering if there should be some specific configuration in atomate dedicated to that. Maybe it will be worth to discuss this point more in detail.
|
I think I have dealt with all the points raised by @gpetretto . I still need to do some cleaning, but it is functional at least. I also haven't done all the proper linting yet, but I'd appreciate any feedback on the points that were raised in the first review. Thanks in advance! TODO
|
src/atomate2/abinit/files.py
Outdated
| return None | ||
| ext = filename.split("_")[-1].replace(".nc", "") | ||
| if "1WF" in ext: # VT | ||
| ext = "1WF" # VT |
There was a problem hiding this comment.
I think you can remove the "VT". Maybe if someone does not know you the comment might be confusing :P
Also, shouldn't this also happen for the 1DEN files?
There was a problem hiding this comment.
not called 1DEN rather DEN1, DEN2, etc... let's leave it at that for the moment and deal with it when the time comes (phonons WF?)
src/atomate2/abinit/flows/dfpt.py
Outdated
| with the DTE calculations. Either provide a DDE Maker \ | ||
| or remove the DTE one." | ||
| ) | ||
| if self.mrgddb_maker and not self.dde_maker: |
There was a problem hiding this comment.
This is false. You can make a phonon calculation without DDE and still run mrgddb. This check should probably be removed.
src/atomate2/abinit/flows/dfpt.py
Outdated
| mrgddb_maker: Maker | None = field(default_factory=MrgddbMaker) # | | ||
| anaddb_maker: Maker | None = field(default_factory=AnaddbMaker) # | | ||
| use_ddk_sym: bool | None = False | ||
| use_dde_sym: bool | None = False |
There was a problem hiding this comment.
why is this False by default? Is it because for dte it requires all the DDE even if they can be reduced by symmetry? (I seem to remember this, but I am not sure).
Could it make sense to put the default to None and set the value depending whether dte is enabled or not? Or to True and override in the ShgFlowMaker?
And at the moment, you have the type bool | None. What does None would correspond to? If we don't introduce the option above for None maybe you can remove it from the type?
There was a problem hiding this comment.
I removed None and set it to True as default and it is overridden to False in the Shg class.
src/atomate2/abinit/flows/dfpt.py
Outdated
| use_dde_sym: bool | None = False | ||
| dte_skip_permutations: bool | None = False | ||
| dte_phonon_pert: bool | None = False | ||
| dte_ixc: int | None = None |
There was a problem hiding this comment.
How many values are acceptable of ixc? I don't remember if it is only one or all the LDA are acceptable. In case there are few values acceptable, cannot this be set in the DteMaker or DteSetGenerator with a reasonable default value?
There was a problem hiding this comment.
In the end I removed it because it was only affecting the generation of the perturbations, not the calculation in itself. Can be added somewhere in the future if needed.
src/atomate2/abinit/flows/dfpt.py
Outdated
| dde_calcs = run_rf( | ||
| perturbations=dde_perts.output, | ||
| rf_maker=self.dde_maker, | ||
| prev_outputs=[[static_job.output.dir_name], ddk_calcs.output["dirs"]], |
There was a problem hiding this comment.
Is there a reason for the code to be like this? in run_rf you declare that the content of prev_outputs should be a list of directories. Here you make a list of lists (thus breaking the API) and then you unfold this in a single list inside run_rf(assuming that under certain conditions the passed values broke the API). Why not making the list here and remove the
if isinstance(rf_maker, (DdeMaker, DteMaker)):
prev_outputs = [item for sublist in prev_outputs for item in sublist]in run_rf?
There was a problem hiding this comment.
Following our discussion, I unfolded the list of prev_outputs in the construction of the flow. The main issue here is that .dir_name is a string while ["dirs"] is a list of strings so this means that prev_outputs looks like [dir_name, [dirs]] so I had to create a function to unfold it into a non-nested list with np.hstack.
src/atomate2/abinit/sets/base.py
Outdated
|
|
||
|
|
||
| @dataclass | ||
| class AbiBroadInputGenerator(InputGenerator): |
There was a problem hiding this comment.
I personally don't like much the AbiBroad name. I suggest something likeBaseAbinitInputGenerator, AbinitInputGeneratorMixin, AbinitToolsInputGenerator.
There was a problem hiding this comment.
I changed it to AbinitMixinInputGenerator
src/atomate2/abinit/sets/response.py
Outdated
| ] | ||
|
|
||
|
|
||
| GS_RESTART_FROM_DEPS: tuple = (f"{SCF}|{RELAX}|{MOLECULAR_DYNAMICS}:WFK|DEN",) |
| ): | ||
| ref_path = Path(ref_path) | ||
|
|
||
| if "mrgddb.in" in check_inputs: |
There was a problem hiding this comment.
can't the code of check_mrgddb_in be directly here? there is only one file to check
src/atomate2/abinit/flows/dfpt.py
Outdated
| dte_maker: BaseAbinitMaker | None = field(default_factory=DteMaker) # | | ||
| mrgddb_maker: Maker | None = field(default_factory=MrgddbMaker) # | | ||
| anaddb_maker: Maker | None = field(default_factory=AnaddbMaker) # | | ||
| use_ddk_sym: bool | None = False |
|
|
||
|
|
||
| @dataclass | ||
| class ResponseMaker(BaseAbinitMaker): |
There was a problem hiding this comment.
Maybe also ResponseMaker can be confusing?
There was a problem hiding this comment.
see above comment, RespFn?
…aterialsproject#918) * bump pre-commit hooks and fix legacy * fix doc str copy-paste error * add SevenNetRelaxMaker + SevenNetStaticMaker * test_phonon_maker_initialization_with_all_mlff * test relax_calcs are ase calculator instances upload smallest sevennet checkpoint i could find, fails to load for some reason * markdown docs auto-format * pyproject add sevenn to forcefields and strict optional deps
* rename field name and adapt schema to work with latest monty release * apply ruff fixes
* complete refactor to PMG input sets for vasp * bug fixes for input set change * linting * move type import to type_checking block * remove duplicated MP yaml files * drop dict.get(key, None) -> dict.get(key) * change inheritance slightly, install pmg from pr * linting * revert vis["INCAR"] --> vis.incar * fix lobster interface * remove lobster test file * revert pymatgen testing install now that separate pr is merged * try to force pip install of pymatgen in testing * force pmg to install from git * improve check_poscar method to account for reordering of sites in POSCAR * linting * remove POTCARs and replace with spec where appropriate; remove unused vaspout.h5 files which contain full POTCARs * restore missing test file, but only header of POTCAR * remove POTCAR.orig.spec files * gzip test input files * linting * slightly refactor MP sets * precommit * slight matpes modification * precommit * revert gh workflow dependency install * update changelog * fix pymatgen pip version install for strict * bump pymatgen to v2024.6.4 * refactor MP and MatPES VASP input sets to inherit directly from pymatgen equivalents * linting * further cleanup matpes r2scan set * change ase to use most recent pypi release * add missing pip install line * revert lobster vis potcar changes * remove version conflict * remove version conflict * remove version conflict * replace lobster sets with pymatgen equivalents * precommit * add ispin to lobster tightstatitsetgenerator * remove BaseVasp.yaml to rely on inheritance from MP input sets * precommit * remove temp test file * move matpes jobs/flow to pymatgen sets, mark matpes sets for deprecation * lint * move mp sets fully to pmg, add deprecation warnings to existing atomate2 mp sets * remove mp set dependence from tests * precommit * add bandgap_tol options to vasp.test_sets * remove todo from tests.vasp.flows.test_mp * add pytest.warns check for deprecated mp sets * revert docstr changes * move deprecation warnings from __post_init__ to class warning before: <string>:31: FutureWarning: __post_init__ is deprecated, and will be removed on 2025-01-01 Use MPRelaxSet in pymatgen.io.vasp.sets instead. warning after: <string>:31: FutureWarning: MPGGARelaxSetGenerator is deprecated, and will be removed on 2025-01-01 Use MPRelaxSet in pymatgen.io.vasp.sets instead. * pin monty==2024.7.30 in deps and strict * add kludge for monty zpath * precommit * extend monty fix to vasp tests * precommit --------- Co-authored-by: Janosh Riebesell <janosh.riebesell@gmail.com>
* add draft for gruneisen workflow * update gruneisen workflow * add draft schema and simplify compute grunesien job, add kwargs * fix wrong field name * add preliminary tests, custom bandstructure plotting with gruneisen weighted * comment out low accuracy derived property value test * comment out low accuracy derived property value test * fix doc-string description for phonopy_yaml_paths_dict * add high accuracy ref gruneisen data from vasp * add test for compute_gruneisen_param * removed comment * remove leftover commented code * fix custom gruneisen plotter color bar * clean up min and max gruneisen parameter extraction * add names to jobs * fix files * add correct files * fix output_schema * add tests, switch to double relax * change to different init of phonon workflow * add missing doc * add prevdir * add documentation * change mesh * change mesh * fix linting * fix linting * add gruneisen * fix workflow tests * fix linting * add gridd * change how document works and a bit more documentation * add documentation * fix logger * fix linting * fix linting * add missing docstrings * fix mesh type * fix classmethod * Introduce constant volume relax maker * switch to PhononMaker * fix linting * switch to imperative mode * fix text * fix mypy issues * fix symprec * fix symprec * fix constant volume relax makr --------- Co-authored-by: J. George <JaGeo@users.noreply.github.com> Co-authored-by: joabustamante <99182107+joabustamante@users.noreply.github.com> Co-authored-by: jpineda <joabustamante@gmail.com> Co-authored-by: JaGeo <janine.george@bam.de>
…oject#947) * add back symprec kwarg to MP and MatPES set generators * bump matgl==1.1.3 https://github.com/materialsvirtuallab/matgl/releases/tag/v1.1.3 * trigger CI
…alsproject#945) * Added documentation about JSONStore usage within Installation * tweak --------- Co-authored-by: Janosh Riebesell <janosh.riebesell@gmail.com>
Bumps [myst-parser](https://github.com/executablebooks/MyST-Parser) from 3.0.1 to 4.0.0. - [Release notes](https://github.com/executablebooks/MyST-Parser/releases) - [Changelog](https://github.com/executablebooks/MyST-Parser/blob/master/CHANGELOG.md) - [Commits](executablebooks/MyST-Parser@v3.0.1...v4.0.0) --- updated-dependencies: - dependency-name: myst-parser dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 6.0.1 to 6.0.2. - [Release notes](https://github.com/yaml/pyyaml/releases) - [Changelog](https://github.com/yaml/pyyaml/blob/main/CHANGES) - [Commits](yaml/pyyaml@6.0.1...6.0.2) --- updated-dependencies: - dependency-name: pyyaml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [furo](https://github.com/pradyunsg/furo) from 2024.7.18 to 2024.8.6. - [Release notes](https://github.com/pradyunsg/furo/releases) - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md) - [Commits](pradyunsg/furo@2024.07.18...2024.08.06) --- updated-dependencies: - dependency-name: furo dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [phonopy](https://github.com/phonopy/phonopy) from 2.26.6 to 2.26.7. - [Changelog](https://github.com/phonopy/phonopy/blob/develop/doc/changelog.md) - [Commits](phonopy/phonopy@v2.26.6...v2.26.7) --- updated-dependencies: - dependency-name: phonopy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.0.2 to 8.3.2. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](pytest-dev/pytest@8.0.2...8.3.2) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… set to 0 or 1 for writing xyz files (materialsproject#1207) * add file output to ase and forcefield jobs * remove useless file * cover situation where optimizer might take additional steps * fix input_atoms copy * fix linting
* correct unassigned variable and incorrectly-named energy kwarg in the MPMorph flow
* ff bug fixes * make filter_kwargs an optional kwarg for AseRelaxer * temporarily disable ASE energy checks - runs are inconsistent even with same initial input * skip optimizer instantiation when steps <= 1 in ase/mlff flows * ensure lj test runs one step * bump ase bc of inconsistent behavior between 3.24 and 3.25 * bump emmet-core
Bumps mp-api from 0.45.4 to 0.45.7. --- updated-dependencies: - dependency-name: mp-api dependency-version: 0.45.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ijson](https://github.com/ICRAR/ijson) from 3.3.0 to 3.4.0. - [Changelog](https://github.com/ICRAR/ijson/blob/master/CHANGELOG.md) - [Commits](ICRAR/ijson@v3.3.0...v3.4.0) --- updated-dependencies: - dependency-name: ijson dependency-version: 3.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [typing-extensions](https://github.com/python/typing_extensions) from 4.13.2 to 4.14.0. - [Release notes](https://github.com/python/typing_extensions/releases) - [Changelog](https://github.com/python/typing_extensions/blob/main/CHANGELOG.md) - [Commits](python/typing_extensions@4.13.2...4.14.0) --- updated-dependencies: - dependency-name: typing-extensions dependency-version: 4.14.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 6.1.1 to 6.2.1. - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](pytest-dev/pytest-cov@v6.1.1...v6.2.1) --- updated-dependencies: - dependency-name: pytest-cov dependency-version: 6.2.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ipython](https://github.com/ipython/ipython) from 8.34.0 to 8.37.0. - [Release notes](https://github.com/ipython/ipython/releases) - [Commits](ipython/ipython@8.34.0...8.37.0) --- updated-dependencies: - dependency-name: ipython dependency-version: 8.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ject#1230) Updates the requirements on [setuptools](https://github.com/pypa/setuptools) to permit the latest version. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst) - [Commits](pypa/setuptools@v42.0.0...v80.9.0) --- updated-dependencies: - dependency-name: setuptools dependency-version: 80.9.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [calorine](https://gitlab.com/materials-modeling/calorine) from 3.0 to 3.1. - [Release notes](https://gitlab.com/materials-modeling/calorine/tags) - [Commits](https://gitlab.com/materials-modeling/calorine/compare/3.0...3.1) --- updated-dependencies: - dependency-name: calorine dependency-version: '3.1' dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.5 to 8.4.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](pytest-dev/pytest@8.3.5...8.4.1) --- updated-dependencies: - dependency-name: pytest dependency-version: 8.4.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
--- updated-dependencies: - dependency-name: pymatgen dependency-version: 2025.6.14 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
--- updated-dependencies: - dependency-name: click dependency-version: 8.2.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
--- updated-dependencies: - dependency-name: mace-torch dependency-version: 0.3.13 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
--- updated-dependencies: - dependency-name: pydantic dependency-version: 2.11.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
--- updated-dependencies: - dependency-name: jobflow dependency-version: 0.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
--- updated-dependencies: - dependency-name: pytest-mock dependency-version: 3.14.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
--- updated-dependencies: - dependency-name: jupyterlab dependency-version: 4.4.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
--- updated-dependencies: - dependency-name: matgl dependency-version: 1.2.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [numpydoc](https://github.com/numpy/numpydoc) from 1.8.0 to 1.9.0. - [Release notes](https://github.com/numpy/numpydoc/releases) - [Changelog](https://github.com/numpy/numpydoc/blob/main/RELEASE.rst) - [Commits](numpy/numpydoc@v1.8.0...v1.9.0) --- updated-dependencies: - dependency-name: numpydoc dependency-version: 1.9.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [custodian](https://github.com/materialsproject/custodian) from 2025.4.14 to 2025.5.12. - [Release notes](https://github.com/materialsproject/custodian/releases) - [Changelog](https://github.com/materialsproject/custodian/blob/master/docs/changelog.md) - [Commits](materialsproject/custodian@v2025.4.14...v2025.5.12) --- updated-dependencies: - dependency-name: custodian dependency-version: 2025.5.12 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [typing-extensions](https://github.com/python/typing_extensions) from 4.14.0 to 4.14.1. - [Release notes](https://github.com/python/typing_extensions/releases) - [Changelog](https://github.com/python/typing_extensions/blob/main/CHANGELOG.md) - [Commits](python/typing_extensions@4.14.0...4.14.1) --- updated-dependencies: - dependency-name: typing-extensions dependency-version: 4.14.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pydantic-settings](https://github.com/pydantic/pydantic-settings) from 2.9.1 to 2.10.1. - [Release notes](https://github.com/pydantic/pydantic-settings/releases) - [Commits](pydantic/pydantic-settings@v2.9.1...2.10.1) --- updated-dependencies: - dependency-name: pydantic-settings dependency-version: 2.10.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Summary
TODO