atomate2 icon indicating copy to clipboard operation
atomate2 copied to clipboard

WIP: Vasp ml

Open davidwaroquiers opened this issue 1 year ago • 6 comments

Summary

Adding Vasp ML functionality in MultiMDMaker. Also added possibility to rename additioal vasp files within copy_vasp_outputs (needed to allow ML_ABN=>ML_AB and ML_FFN=>ML_FF)

  • New MLMDMaker
  • MLFF feature within MultiMDMaker (as a classmethod)
  • Fixed split of nsteps and temperatures in MultiMDMaker
  • MLMDSetGenerator
  • Possibilty to rename additional vasp files after they have been copied (by providing a dict instead of a list).

Additional dependencies introduced (if any)

None

TODO (if any)

If this is a work-in-progress, write something about what else needs to be done.

  • Tests

Checklist

Work-in-progress pull requests are encouraged, but please put [WIP] in the pull request title.

Before a pull request can be merged, the following items must be checked:

  • [x] Code is in the standard Python style. The easiest way to handle this is to run the following in the correct sequence on your local machine. Start with running ruff and ruff format on your new code. This will automatically reformat your code to PEP8 conventions and fix many linting issues.
  • [x] Doc strings have been added in the Numpy docstring format. Run ruff on your code.
  • [x] Type annotations are highly encouraged. Run mypy to type check your code.
  • [ ] Tests have been added for any new functionality or bug fixes.
  • [ ] All linting and tests pass.

Note that the CI system will run all the above checks. But it will be much more efficient if you already fix most errors prior to submitting the PR. It is highly recommended that you use the pre-commit hook provided in the repository. Simply run pre-commit install and a check will be run prior to allowing commits.

davidwaroquiers avatar Feb 12 '24 12:02 davidwaroquiers

@ml-evs As we discussed about using that, could you try this implementation ? @gpetretto Comments ?

Still more features to be added in the MultiMDMaker (train+run, refit, ...)

davidwaroquiers avatar Feb 12 '24 12:02 davidwaroquiers

This PR needs (at least) this to be merged in pymatgen: https://github.com/materialsproject/pymatgen/pull/3625 the ML_MODE tag in vasp is not recognized when its value is capitalized. E.g. ML_MODE = Train does not work. Pymatgen currently capitalizes all strings (e.g. ALGO = Fast, even if you set incar["ALGO"] = "fast").

davidwaroquiers avatar Feb 14 '24 14:02 davidwaroquiers

This PR also needs the following PR to be merged in emmet: https://github.com/materialsproject/emmet/pull/939

davidwaroquiers avatar Feb 15 '24 19:02 davidwaroquiers

Pinging @utf to get your opinion on this draft, especially in terms of the input sets for which I added some option to disable band structure parsing (this should obviously be moved to pymatgen anyway to the new input sets there).

davidwaroquiers avatar Feb 16 '24 13:02 davidwaroquiers

Hi @davidwaroquiers, appologies for the delay looking at this. This looks good to me, except the part about the band gap handling. These seems quite heavy handed. I wonder if the input sets can just check for the band gap and if there is an error then just set a default value. I.e., this is all handled in the input set generator entirely, without needing to make changes in other files.

I think this workflow will also need to be updated to use the latest input sets in pymatgen once #854 is merged.

utf avatar Jul 18 '24 14:07 utf

Hi @davidwaroquiers, appologies for the delay looking at this. This looks good to me, except the part about the band gap handling. These seems quite heavy handed. I wonder if the input sets can just check for the band gap and if there is an error then just set a default value. I.e., this is all handled in the input set generator entirely, without needing to make changes in other files.

I think this workflow will also need to be updated to use the latest input sets in pymatgen once #854 is merged.

Thanks @utf ! No worries about the delay! I've seen #854 has been merged so I'll work this out when I'm back from holidays. Indeed the band gap thing is a bit clunky... I will see how to do that in a cleaner way.

davidwaroquiers avatar Aug 02 '24 16:08 davidwaroquiers