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

WIP: Vasp ml #715

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

davidwaroquiers
Copy link
Contributor

@davidwaroquiers davidwaroquiers commented Feb 12, 2024

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:

  • 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.
  • Doc strings have been added in the Numpy docstring format.
    Run ruff on your code.
  • 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 davidwaroquiers marked this pull request as draft February 12, 2024 12:23
@davidwaroquiers
Copy link
Contributor Author

@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
Copy link
Contributor Author

This PR needs (at least) this to be merged in pymatgen: materialsproject/pymatgen#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
Copy link
Contributor Author

This PR also needs the following PR to be merged in emmet: materialsproject/emmet#939

calculations.
Added option to vasp sets base to get the previous band gap or not.
@davidwaroquiers
Copy link
Contributor Author

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 davidwaroquiers marked this pull request as ready for review February 19, 2024 09:12
@utf
Copy link
Member

utf commented Jul 18, 2024

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.

@davidwaroquiers
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants