https://github.com/banana-bred/wignerd

Fortran routines to calculate the Wigner D-matrix and d-matrix.

https://github.com/banana-bred/wignerd

Science Score: 39.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.5%) to scientific vocabulary

Keywords

fortran fortran-package-manager wigner-d-matrix
Last synced: 10 months ago · JSON representation

Repository

Fortran routines to calculate the Wigner D-matrix and d-matrix.

Basic Info
  • Host: GitHub
  • Owner: banana-bred
  • License: gpl-2.0
  • Language: Fortran
  • Default Branch: main
  • Homepage:
  • Size: 568 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
fortran fortran-package-manager wigner-d-matrix
Created over 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

WignerD

Provides routines to return the Wigner D-matrix

$$ \begin{equation} D^j{m'm}(\alpha,\beta,\gamma) = e^{-im'\alpha} d^j{m'm}(\beta) e^{-im\gamma} \end{equation} $$

and the d-matrix

$$ \begin{equation} \begin{aligned} d^j{m'm}(\beta) &= \sqrt{ (j+m')!(j-m')!(j+m)!(j-m)! } \ &\quad \times \sum\limits{s = s\text{min}}^{s\text{max}} \left[ \frac{ (-1)^{m'-m+s} \left(\cos \frac{\beta}{2}\right)^{2j+m-m'-2s} \left(\sin \frac{\beta}{2}\right)^{m'-m+2s} }{ (j+m-s)!s!(m'-m+s)!(j-m'-s)! } \right] \end{aligned} \end{equation} $$

for a given value of the angular momentum j. By default, these are calculated via matrix diagonalization using the method of Feng et al.[1], but the use of the analytic expression for the d-matrix can be forced as well.

Dependencies

Building with fpm

In the package directory, run

$ fpm build --profile release

The archive file libWignerD.a and several .mod files will be placed in the generated build subdirectory. If you'd rather use your local version of LAPACK, use the flag

$ fpm build --profile release --flag="-DUSE_EXTERNAL_LAPACK"

Building without fpm

Assuming you have a local installation of LAPACK and that your linker program knows where to find it, just run the provided compile script:

$ ./compile

The default compiler is gfortran. The archive file libwignerd.a and several .mod files will be placed in the generated build/lib and build/mod subdirectories. These will be needed for reference by another program.

Testing

A few tests are included for explicit values of the d-matrix for several values of the angle β. Just run

$ fpm test

Usage

To use this project within your fpm project, add the following to your fpm.toml file:

[dependencies]
wignerd = { git = "https://github.com/banana-bred/WignerD" }

Otherwise, you will just need the generated archive and mod files mentioned above. Don't forget to tell your compiler where they are.

Available routines/interfaces/procedures

The module wignerd contains the following public interfaces, which can be accessed via the use statement :

| interface | description | | ----------------------- | ----------- | | wigner_d(...) | This is an interface wrapper for wigner_little_d and wigner_big_d, depending on the number of arguments that you provide.| | wigner_little_d(...) | Returns the d-matrix via the analytic expression or matrix diagonalization. See docs for details.| | wigner_big_D(...) | Returns the D-matrix via the analytic expression or matrix diagonalization. See docs for details.|

More info on input/output types and examples are given in the docs.

Happy rotating !


Reference(s)

[1] X. M. Feng, P. Wang, W. Yang, and G. R. Jin, High-precision evaluation of Wigner's (d) matrix by exact diagonalization, Phys. Rev. E. 2015, 92, 043307, URL: https://doi.org/10.1103/PhysRevE.92.043307

Owner

  • Login: banana-bred
  • Kind: user

GitHub Events

Total
  • Watch event: 2
  • Push event: 12
  • Create event: 2
Last Year
  • Watch event: 2
  • Push event: 12
  • Create event: 2