sphecerix
Project description
Sphecerix
Figure: Demonstration of rotating a spherical harmonic by means of the
Wigner D-matrix. In the above image, a 3dz2 and a 4fz3 atomic orbital are rotated
by an angle $\pi$ over an axis with coordinates $(1,1,1)$. Note that the image has
not been constructed by rotating the isosurfaces but by calculating the
scalar field after the rotation.
Purpose
Rotation of spherical harmonics using Wigner-D matrices
Background
The canonical spherical harmonics $Y_{lm}$ subject to a rotation in
$\mathbb{R}^{3}$ will always mix among each other. As such, we can
represent the act of rotating the spherical harmonics by the following
matrix-vector equation
\vec{Y}_{l}\prime = \mathbf{D}\vec{Y}_{l}
wherein $\mathbf{D}$ is the Wigner D-matrix
and $\vec{Y}_{l}$ a vector composed of the canonical spherical harmonics
of order $l$. The vector $\vec{Y}_{l}\prime$ is the linear combination that
represents the result of the rotation upon the (linear combination) of
spherical harmonics prior to the rotation.
Usage
In the script below, a dz2 spherical harmonic is rotated over an axis with
coordinates $(1,1,1)$ by an angle $\pi$. The result of this rotation is
a linear combination of spherical harmonics all with $l=2$.
from sphecerix import tesseral_wigner_D
from scipy.spatial.transform import Rotation as R
import numpy as np
def main():
# build rotation axis and set angle
axis = np.ones(3) / np.sqrt(3)
angle = np.pi
Robj = R.from_rotvec(axis * angle)
# construct tesseral Wigner D matrix
D = tesseral_wigner_D(2, Robj)
Y = np.zeros(5)
Y[2] = 1
# calculate linear combination of the spherical harmonics after rotation
Yp = D @ Y
print(Yp)
if __name__ == '__main__':
main()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphecerix-0.6.1-py3-none-any.whl.
File metadata
- Download URL: sphecerix-0.6.1-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7eac121dfe1bc6f270d5eb4c9804bccbd038802563330751e4655af3b000e35d
|
|
| MD5 |
5d01ff38c5873067d81dfd49f654fb8c
|
|
| BLAKE2b-256 |
1544e003ad481105fdc4e66b969a7639bebc376d7737939b0f030efbabc6f36a
|
Provenance
The following attestation bundles were made for sphecerix-0.6.1-py3-none-any.whl:
Publisher:
build_pypi.yml on ifilot/sphecerix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphecerix-0.6.1-py3-none-any.whl -
Subject digest:
7eac121dfe1bc6f270d5eb4c9804bccbd038802563330751e4655af3b000e35d - Sigstore transparency entry: 168003847
- Sigstore integration time:
-
Permalink:
ifilot/sphecerix@b95b2ae1ac18ad71f42aeb79c9a121313546856a -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/ifilot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_pypi.yml@b95b2ae1ac18ad71f42aeb79c9a121313546856a -
Trigger Event:
push
-
Statement type: