azadoks / PseudoPotentialIO.jl

Support for reading and using pseudopotentials in Julia
https://azadoks.github.io/PseudoPotentialIO.jl/
MIT License
7 stars 2 forks source link

Implement write function of upf file #12

Closed unkcpz closed 10 months ago

unkcpz commented 11 months ago

@azadoks thanks a lot for such a nice tool. In this PR I try to add the "O" part of this IO package to upf2 format.

codecov[bot] commented 11 months ago

Codecov Report

Attention: 25 lines in your changes are missing coverage. Please review.

Comparison is base (8dd0f06) 82.45% compared to head (b9d6601) 80.05%.

Files Patch % Lines
src/file/upf2.jl 91.74% 18 Missing :warning:
src/file/upf.jl 73.33% 4 Missing :warning:
src/save.jl 50.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #12 +/- ## ========================================== - Coverage 82.45% 80.05% -2.40% ========================================== Files 22 23 +1 Lines 1533 1760 +227 ========================================== + Hits 1264 1409 +145 - Misses 269 351 +82 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

azadoks commented 11 months ago

Really cool, thanks, Jason! I'll look this over tomorrow; hopefully we can get it merged soon.

azadoks commented 10 months ago

Thanks again for the great work! You've inspired me a bit to give a crack at the O part of the package.

I just made a draft PR #13 that I'll merge after this is done.

There, I've implemented UPF <--> PSP8 conversion for non-relativistic pseudos and a writer for PSP8. This should make it possible to convert UPF files to PSP8 files (on disk) and back (the conversion process is a bit lossy, but all the important parts are retained).

unkcpz commented 10 months ago

I just made a draft PR https://github.com/azadoks/PseudoPotentialIO.jl/pull/13 that I'll merge after this is done. There, I've implemented UPF <--> PSP8 conversion for non-relativistic pseudos and a writer for PSP8.

Super cool, and fast! I worked on this PR because I want to do trim on the UPF as you guys did in the ACWF paper which is a small goal, then I went to the ambition to exactly you did for the converter between upf <-> psp8 but give up on some details.

Could you ping me to have a look at your PR before merging? I am looking forward to learning more details.

unkcpz commented 10 months ago

No idea how to fix failed nightly tests. It is ready for another look.