empa-scientific-it / cleedpy

MIT License
1 stars 0 forks source link

Generate phase shifts on the fly. #21

Open yakutovicha opened 11 months ago

yakutovicha commented 11 months ago

Instead of relying on pre-computed phase-shifts, we should embed the phase-shift program into cleedpy and compute them on the fly.

Liam-Deacon commented 9 months ago

Hi @yakutovicha and @GeorgHeld,

It's been a little over a week since we spoke about incorporating phase shift calculations within cleedpy so I thought I'd give you an update from my side.

I've spent the interim improving the phaseshifts GitHub project, focusing on tackling the issues Georg mentioned, namely:

  1. Compiling - I have updated libphsh.f (click for diff) to appease modern gcc-11 and classic flang (i.e. fortran clang) open-source compilers commonly found on Ubuntu and Mac OS systems so that it can be compiled as part of binary wheel distributions to PyPI

    [!CAUTION]

    [!WARNING]

  2. Updating the documentation - this is an ongoing process however I intend to complete a basic tutorial via mybinder.org , but documentation is now released via GitHub Pages (for per commit updates) and ReadTheDocs (for releases).

[!NOTE] As part of updating the documentation I did a literature search for alternatives... The phaseshifts package is not the only python codebase derived from the Barbieri / Van Hove phshift2007 package - since creating the package in 2014, AQuaLEED was released and might be worth a look!

  1. The process of publishing documentation and uploading new python wheels on release are now all automated and things such as testing new changes, code coverage, static analysis and pre-commit style checks are all performed as part of continuous integration checks on pull requests with the idea to nudge towards good practices going forward 🤞

    [!TIP] What this means is that it is possible to pip install phaseshifts on Linux and Mac for most common CPU types and modern python versions. Should this not be possible then it is possible to use docker run ghcr.io/liam-deacon/phaseshifts:latest to invoke phsh.py without needing a compatible python environment on the local machine.

[!NOTE]

Any feedback (especially issues) or suggestions would be most appreciated 🙏

Thanks,

Liam

yakutovicha commented 9 months ago

Thanks a lot, @Liam-Deacon, for the detailed write-up. We will return to this issue once the basic functionalities of the cleepdy package are in place.