Atomate2 jz pheasy_phonon
Summary
Include a summary of major changes in bullet points:
- Using Pheasy code (LASSO) to efficiently extract force constants for phonon calculation
- Based on this phonon workflow, a relative small lattice constants (a,b and c axes) can be used to accurately extract second order force constants (usually 12 Angstrum is enough for most of materials)
- Fix 1
Additional dependencies introduced (if any)
- Before using it, the a dependent library is necessary: python interface for alamode code: Installation can be found: https://alm.readthedocs.io/en/develop/?badge=develop
TODO (if any)
- Quality check for all phonon calculations,
- Extracting Higher-order force constants, including up to six order.
- Anharmonic phonon renormalization using Modified SSCHA combing the MC method, relaxing atomic site coordinates and bubble self-energy.
- Lattice thermal conductivity calculation incorporating diagonal and non-diagonal terms of heat flux operators.
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
ruffandruff formaton 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.
- [x] Tests have been added for any new functionality or bug fixes.
- [x] 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.
@leslie-zheng Thanks 😃! I haven't looked at the code in detail yet. In any case, we would need tests and also install the pheasy code on the repo. The linting would need to pass as well.
Let me know if you need any advice for any of the points!
Codecov Report
Attention: Patch coverage is 0% with 585 lines in your changes missing coverage. Please review.
Project coverage is 72.36%. Comparing base (
8d57884) to head (93219ce). Report is 20 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #976 +/- ##
==========================================
- Coverage 75.70% 72.36% -3.34%
==========================================
Files 147 161 +14
Lines 10925 12030 +1105
Branches 1613 1767 +154
==========================================
+ Hits 8271 8706 +435
- Misses 2173 2813 +640
- Partials 481 511 +30
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/atomate2/vasp/jobs/pheasy.py | 0.00% <0.00%> (ø) |
|
| src/atomate2/vasp/flows/pheasy.py | 0.00% <0.00%> (ø) |
|
| src/atomate2/common/flows/pheasy.py | 0.00% <0.00%> (ø) |
|
| src/atomate2/common/jobs/pheasy.py | 0.00% <0.00%> (ø) |
|
| src/atomate2/common/schemas/pheasy.py | 0.00% <0.00%> (ø) |
@leslie-zheng Thanks 😃! I haven't looked at the code in detail yet. In any case, we would need tests and also install the pheasy code on the repo. The linting would need to pass as well.
Let me know if you need any advice for any of the points!
Thanks Janine @JaGeo , I will make the linting check pass ASAP.
@JaGeo Hi Janine, will following all your suggestions and finish modifying it this weekend, thanks for the suggestions.
@leslie-zheng tgabk you! i think the goal should be that we reuse as much code as possible from the phonopy worfklow.
@leslie-zheng tgabk you! i think the goal should be that we reuse as much code as possible from the phonopy worfklow.
Hi Janine, Sure, I am working on it, already reuse the some repeated functions from phonopy section. After finish it again and will let you know.
@JaGeo Hi Janine, after finishing cleaning it up, and I test the whole workflow on our cluster. Take silicon as an example, it works well.
Hi @JaGeo , Maybe we can create a folder called phonon/ and move the /phonopy.py and /pheasy.py into? or a folder called lattice_dynamics/ instead.
@JaGeo Hi Janine, after finishing cleaning it up, and I test the whole workflow on our cluster. Take silicon as an example, it works well.
That's great. Could you add test workflows as well? There are many examples in the tests folder. Once this is done, I am happy to do further refactoring.
If you olan to add higher force constants as well, we can also keep the pheasy submodule for now.
@JaGeo Hi Janine, after finishing cleaning it up, and I test the whole workflow on our cluster. Take silicon as an example, it works well.
That's great. Could you add test workflows as well? There are many examples in the tests folder. Once this is done, I am happy to do further refactoring.
If you olan to add higher force constants as well, we can also keep the pheasy submodule for now.
Hi Janine @JaGeo , sure, will do it. yes, I am planning to add the higher-order force constants into.
Hi Janine @JaGeo ,
I finished adjusting the pheasy workflow based on previous linting checking again. And test the whole workflow again using silicon, working perfectly. For the pytest, I need help from you, I am not familiar with this process, cause I did not do it before. Could you please help me to write a example?, any documents from the pheasy workflow related to the pytest based on silicon case. I can packed it and shared with you.
best jiongzhi
@leslie-zheng yes, sure. Happy to help out with the tests
@leslie-zheng and @hrushikesh-s can I close this PR in favor of #1063?
@leslie-zheng and @hrushikesh-s can I close this PR in favor of #1063?
@esoteric-ephemera , yes sure!