-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add FHI-aims DFT calculator #562
Conversation
This was originally started as a project to incorporate fhi-aims into jobflow as a part of the NOMAD-CoE, working with @davidwaroquiers and @ansobolev. Originally we did not know if this could be incorporated into atomate2, which is why we had a seperate repository, but the structure and administrative approval were recently granted.
Minor things came up from the migration: 1) Remove all atomate2_temp from out.json files 2) Compare files function now in tests.aims not tests 3) Make all socket tests skippable because they require an aims binary to run
imports should now be fixed
@tpurcell90 @utf I am happy to help. I left one immediate comment there already. For the rest, I need more time. |
As mentioned by @JaGeo
Thanks for the PR. In general this looks really high quality and hopefully there won't be much of a barrier to getting it merged. From a quick scan through, it looks like merging the phonon workflows will be the main challenge. If you're happy to coordinate that aspect @JaGeo that would be great. In terms of getting the linting to pass, I'd recommend installing pre-commit, with:
This will automatically run the linting every time you do a commit. To run on the existing files, you can do:
|
We have additional dependencies for the phonon runs. It is part of it. |
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.
@tpurcell90 I was too curious to not look at it.
I left several comments. One major comment that I have: The phonon forcefield workflow should probably also inherit from this new base class if possible: https://github.com/materialsproject/atomate2/blob/main/src/atomate2/forcefields/flows/phonons.py
Fix all of the linter errors I missed using flake8 over ruff and mpypy Also fixed spelling errors
Fixes python3.9 typing error as X | Y is for python3.10
Co-authored-by: J. George <JaGeo@users.noreply.github.com>
Left to do: 1) ForceField phonon flow 2) overall documentation checks
Use the common one as the Base
Everything should be up to date now
Checked the diff between this an main and they should now be consistent
1) Missed one Optional typing 2) I set the factor for forcefields to the same as VASP as that was the code that was passed to the schema earlier
Uses the latest gitlab version as we wait for the new release
The forcefields now have the same format as VASP/aims |
@tpurcell90 Awesome! Thank you. |
@utf |
Another option would be to add both now and give a deprecation warning for |
1) conftest for aims checks if addoption is possible, and if not then always mocks aims 2) parsers constraint tests were incorrectly modified during fixing linting errors 3) prev_dir host split is now working correctly in convergence tests 4) Correct pydantic errors in AimsOutput 5) Aims files error fix
Following @utf's suggestion to match the magnetisim workflow This works for aims, but VASP and forcefields I have enviornment errors pushing to test
The output should only be converted if it is a MSONableAtoms object not a Structure object
I used that approach for the phonon workflows as well. I set the |
|
@tpurcell90 You might likely run into this error. I added some hints here: https://github.com/materialsproject/atomate2/pull/693/files |
Thanks I'll take a look at those once I am back from class! |
So looking at this the pymatgen change is also in #693 so I think it makes more sense to wait for that to go in then deal with the merge conflicts of the two fixes. |
2) Make a hacky fix for phonon workflow that should not be kept This will only be used for discussion with @JaGeoX
fix lint errors
Hi @tpurcell90, are you able to resolve the remaining conflicts? Then this should be be mergeable. |
Forgot to check when resolving conflicts online
should fix remaining conflicts
@utf This is now ready, let me know if there are any more final changes you want me to make |
Fantastic, thank you @ab5424 and @tpurcell90! |
Summary
Create an FHI-aims interface into atomate2 (moved from: https://github.com/tpurcell90/atomate2-fhi-aims). This was originally started as a project to incorporate FHI-aims into jobflow as a part of the NOMAD-CoE, working with @davidwaroquiers and @ansobolev. Originally we did not know if this could be incorporated into atomate2, which is why we had a separate repository, but everyone now agrees that we should move it to atomate2.
Additional dependencies introduced (if any)
Note I did not add these to the pyproject file before discussing
TODO (if any)
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:
The easiest way to handle this is to run the following in the correct sequence on
your local machine. Start with running black on your new code. This will
automatically reformat your code to PEP8 conventions and removes most issues. Then run
ruff.
Run ruff on your code.
type check your code.
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.