SunnySuite / Sunny.jl

Spin dynamics and generalization to SU(N) coherent states
Other
79 stars 19 forks source link

Incorrect sign of magnetic moment! (Breaking change for v0.6) #190

Closed kbarros closed 3 months ago

kbarros commented 10 months ago

Sunny currently defines:

magnetic_moment(sys::System, site) = sys.units.μB * sys.gs[site] * sys.dipoles[site]

This is the wrong sign! The correct formula is,

$$\hat{\mu} = - \mu_B g \hat{\mathbf{S}}.$$

Note that electron charge is negative, so magnetic moment $\mu$ should point opposite to the angular momentum dipole $\mathbf{S}$. The explicit minus side is needed because, in magnetism, it is conventional to take $g \approx 2$ positive (this is the electron-spin g-factor convention). Note that the Bohr magneton $\mu_B$ is always positive.

As of this writing (June, 2024), SpinW also has a sign error in its Zeeman coupling.

Our guidance to users:

kbarros commented 6 months ago

Will be fixed when https://github.com/SunnySuite/Sunny.jl/pull/247 lands.