betaFeedback

WorksPhysics and Astronomy

MagBerry: A Julia package for modeling magnon and phonon topology and transport

Abstract

We present MagBerry, a Julia package for studying the topology and transport of magnons, phonons, and their hybrid excitations. It combines magnetic models and linear spin-wave Hamiltonians from Sunny.jl with native modules for harmonic phonons and magnon–phonon coupling. These excitations are treated within a common bosonic Bogoliubov–de Gennes formulation. The package calculates bulk and boundary spectra, Berry curvature, and Chern numbers, and resolves the spin and phonon angular momentum carried by each mode. Transport calculations include thermal Hall, spin and orbital Nernst, and phonon angular momentum Hall responses. The package also evaluates the extended Berry curvature dipole contribution to nonlinear magnon thermal Hall transport. Relaxation-time Boltzmann theory gives heat and angular momentum currents. Examples based on published models reproduce topological magnon boundary spectra and illustrate phonon geometry and nonlinear transport. For an altermagnetic hybrid model, we extend a published study of the d-wave phonon angular momentum texture by calculating its Boltzmann transport coefficients. The resulting tensor describes how the longitudinal and transverse angular momentum currents vary with temperature and the direction of the temperature gradient.

Program summary

Program title: MagBerry.

Programming language: Julia; the reported calculations use Julia 1.11.3.

External libraries: Sunny 0.9.2, CairoMakie 0.15.13, and dependencies specified by the accompanying environment.

Version used: MagBerry 0.2.4.

Licensing provisions: MIT.

Nature of problem: Calculation of excitation spectra, geometric observables, and transport coefficients in quadratic models of magnons, phonons, and their coupled modes.

Solution method: Bosonic diagonalization with the commutation metric, Kubo and lattice-link calculations of Berry curvature, generalized-current response, relaxation-time Boltzmann transport, and direct diagonalization of finite geometries.

Restrictions: Harmonic phonons and linear spin-wave theory about a specified reference state. The generic boundary interface retains bulk onsite blocks. Free surfaces require explicit reconstruction and a reference-state check.

Developer’s repository: https://github.com/Raito-SHU/MagBerry.jl.

Documentation: http://renwei.group/softwares/MagBerry.jl/en/.

Introduction

Magnons and phonons are electrically neutral bosonic excitations of spins and the lattice, respectively. They carry energy and angular momentum without an accompanying charge current, enabling information transport in insulators. Their bands can also have nontrivial topology. Neutron scattering has provided evidence for topological magnon bands in Cu(1,3-bdc) and CrI3_3 [1, 2]. For phonons, inelastic X-ray scattering combined with theoretical calculations has identified double Weyl nodes in FeSi [3]. Both excitations can exhibit transverse thermal transport analogous to the electronic Hall effect. Strohm et al. discovered the phonon Hall effect in Tb3_3Ga5_5O12_{12} in 2005 [4], and Onose et al. observed the magnon thermal Hall effect in the ferromagnetic insulator Lu2_2V2_2O7_7 in 2010 [5]. Theory has also predicted transverse angular momentum transport driven by temperature gradients, including the magnon spin Nernst effect in collinear antiferromagnets [6] and the phonon angular momentum Hall effect in lattice systems [7].

Magnon–phonon coupling can produce hybrid excitations known as magnon polarons, which combine magnetic and lattice motion. In FePS3_3, magneto-Raman measurements have revealed strong coupling [8], and terahertz pulses have enabled coherent excitation of magnon polarons [9]. Spectroscopy of FePSe3_3 has identified chirality-selective hybridization and chiral magnon polarons at zero magnetic field [10]. Neutron scattering combined with theoretical analysis has also identified topological magnon polarons in Fe2_2Mo3_3O8_8 [11]. In dd-wave altermagnets, theory predicts that the energy splitting between magnon branches of opposite chirality changes sign with momentum. Chirality-selective hybridization allows the phonon components of the hybrid modes to acquire a corresponding dd-wave angular momentum texture [12].

Studies of chiral phonons and altermagnetic magnons have increased the demand for calculations of band topology and angular momentum transport. SpinW and Sunny.jl are widely used to calculate magnetic excitation spectra and fit experimental data. SpinW computes linear spin-wave spectra from spin models [13], while Sunny.jl supports multiflavor spin-wave theory and dynamical simulations [14]. For phonons, PH-NODE searches for topological band nodes using first-principles results [15]. Calculating group velocities, Berry curvature, boundary states, and transport responses such as thermal and spin Hall effects from these models generally requires additional post-processing. Publicly available tools for both topology and transport in coupled magnon–phonon systems remain limited.

We developed MAGBERRY, a Julia package for calculating the topology and transport of magnons, phonons, and magnon polarons. The package treats all three types of excitation through quadratic bosonic Bogoliubov–de Gennes (BdG) Hamiltonians [16, 17]. Sunny.jl supplies the magnetic models and their linear spin-wave Hamiltonians. Native MAGBERRY modules construct harmonic phonon and magnon–phonon Hamiltonians and solve for the hybrid modes. Structures, force constants, and magnetic interaction parameters can be imported from first-principles outputs. The magnon routines calculate band dispersions and group velocities and resolve spin polarization, chirality, and wave-packet orbital moments. They also evaluate Berry curvature, Chern numbers, and boundary states. Bulk and boundary spectra and Berry curvature are available for phonon and hybrid models as well. For hybrid modes, MagBerry separates the magnetic and lattice components and resolves their spin and phonon angular momentum.

The transport routines evaluate linear thermal Hall, spin Nernst, magnon orbital Nernst, and phonon angular momentum Hall coefficients. They also compute the extended Berry curvature dipole contribution to nonlinear magnon thermal Hall transport. Within the relaxation-time approximation, Boltzmann calculations give heat, spin, and phonon angular momentum currents as functions of temperature and the direction of the temperature gradient. For hybrid modes, the spin and phonon angular momentum contributions to transport can be resolved separately.

Models and computational methods

Throughout this section, nn, mm label modes, μ\mu, ν\nu label atoms, and ii, jj, aa label Cartesian components. In a transport tensor, ii specifies the current direction, jj the temperature-gradient direction, and aa the polarization of the transported observable. We set ℏ=1\hbar= 1 in the formulas below and restore physical units in the numerical outputs.

Bosonic BdG Hamiltonians and eigenmodes

Magnon, phonon, and hybrid excitations are obtained by expanding the spin and lattice Hamiltonian to quadratic order about a reference configuration. The inputs are the magnetic interactions, reference spin configuration, atomic masses, force constants, and magnon–phonon coupling parameters. Additive constants are omitted from the Hamiltonians.

Sunny.jl constructs the magnetic model and its quadratic spin-wave Hamiltonian [14, 18]. Let ak\mathbf{a}_k be the column vector of NmN_{\mathrm{m}} magnon annihilation operators. In the Nambu basis Ψm,k=(akT,a−k†T)T\Psi_{\mathrm{m},k} = (a_k^{\mathsf{T}}, a_{-k}^{\dagger\mathsf{T}})^{\mathsf{T}}, the Hamiltonian is H^m(2)=12∑kΨm,k†Hm(k)Ψm,k\hat{H}_{\mathrm{m}}^{(2)} = \frac{1}{2}\sum_k \Psi_{\mathrm{m},k}^{\dagger}\mathcal{H}_{\mathrm{m}}(k)\Psi_{\mathrm{m},k}. Its matrix has the block form

Hm(k)=(A(k)B(k)B†(k)AT(−k)).(1)\mathcal{H}_{\mathrm{m}}(k) = \begin{pmatrix} A(k) & B(k) \\ B^{\dagger}(k) & A^{\mathsf{T}}(-k) \end{pmatrix}. \tag*{(1)}

The blocks A=A†A = A^{\dagger} and B(k)=BT(−k)B(k) = B^{\mathsf{T}}(-k) collect number-conserving and pairing terms, respectively. MagBerry directly uses the Hermitian matrix Hm\mathcal{H}_{\mathrm{m}} supplied by Sunny. The Nambu commutator matrix is Gm=diag⁡(I,−I)G_{\mathrm{m}} = \operatorname{diag}(I,-I).

The phonon model uses atomic masses MμM_{\mu} and harmonic force constants Φμi,νj(R)\Phi_{\mu i,\nu j}(R). These force constants couple displacement component ii of atom μ\mu in the reference cell to component jj of atom ν\nu in cell RR. Fourier transformation gives the mass-weighted dynamical matrix [19]

Dμi,νj(ω)(k)=1MμMν∑RΦμi,νj(R)eik⋅R.(2)D_{\mu i,\nu j}^{(\omega)}(k) = \frac{1}{\sqrt{M_{\mu}M_{\nu}}}\sum_R \Phi_{\mu i,\nu j}(R)e^{ik\cdot R}. \tag*{(2)}

The canonical solver uses the squared-energy matrix D(E)=ℏ2D(ω)D^{(E)} = \hbar^2D^{(\omega)}, denoted by DD below. With ℏ=1\hbar= 1, introduce mass-weighted coordinates Qμi=MμuμiQ_{\mu i} = \sqrt{M_{\mu}}u_{\mu i} and Pμi=pμi/MμP_{\mu i} = p_{\mu i}/\sqrt{M_{\mu}}. For NphN_{\mathrm{ph}} retained displacement coordinates per cell, define Xk=(QkT,PkT)TX_k = (Q_k^{\mathsf{T}}, P_k^{\mathsf{T}})^{\mathsf{T}}. The harmonic Hamiltonian H^ph=12∑kXk†Hph(k)Xk\hat{H}_{\mathrm{ph}} = \frac{1}{2}\sum_k X_k^{\dagger}\mathcal{H}_{\mathrm{ph}}(k)X_k has the matrix

Hph(k)=(D(k)00I).(3)\mathcal{H}_{\mathrm{ph}}(k) = \begin{pmatrix} D(k) & 0 \\ 0 & I \end{pmatrix}. \tag*{(3)}

The commutator matrix is Gph=(0iI−iI0)G_{\mathrm{ph}} = \begin{pmatrix} 0 & iI \\ -iI & 0 \end{pmatrix}. This coordinate–momentum representation is equivalent to a bosonic creation–annihilation basis.

Magnon–phonon coupling follows from the displacement dependence of magnetic interactions. Expanding the exchange tensor to first order in displacement gives

Jμν({u})=Jμν(0)+∑λa∂Jμν∂uλauλa+⋯ ,(4)J_{\mu\nu}(\{u\}) = J_{\mu\nu}^{(0)} + \sum_{\lambda a}\frac{\partial J_{\mu\nu}}{\partial u_{\lambda a}}u_{\lambda a} + \cdots, \tag*{(4)}

where λ\lambda labels a displaced atom. Terms linear in both displacement and spin fluctuation form the bilinear coupling matrix. The tensor derivatives include symmetric exchange and Dzyaloshinskii–Moriya contributions. Alternatively, an explicit magnetoelastic model can supply the coupling matrix [20]. In the combined basis Ξk=(Ψm,kT,XkT)T\Xi_k = (\Psi_{m,k}^{T}, X_k^{T})^{T}, the quadratic Hamiltonian is H^2=12∑kΞk†H(k)Ξk\hat{H}_2 = \frac{1}{2}\sum_k \Xi_k^\dagger\mathcal{H}(k)\Xi_k, with

H(k)=(Hm(k)C(k)C†(k)Hph(k)).(5)\mathcal{H}(k) = \begin{pmatrix} \mathcal{H}_{m}(k) & C(k) \\ C^\dagger(k) & \mathcal{H}_{\mathrm{ph}}(k) \end{pmatrix}. \tag*{(5)}

Here C=(CQ,CP)C = (C_Q, C_P) follows the displacement–momentum ordering of XkX_k. Couplings obtained from displacement derivatives enter CQC_Q. Setting C=0C=0 recovers the uncoupled models. The canonical commutator is G=diag⁡(Gm,Gph)\mathcal{G}=\operatorname{diag}(\mathcal{G}_m,\mathcal{G}_{\mathrm{ph}}). The excitation energies and mode vectors satisfy [16]

GH(k)vnk=Enkvnk,vnk†Gvmk=snδnm,sn=±1.(6)\mathcal{G}\mathcal{H}(k)v_{nk}=E_{nk}v_{nk}, \qquad v_{nk}^{\dagger}\mathcal{G}v_{mk}=s_n\delta_{nm}, \qquad s_n=\pm1. \tag*{(6)}

For a stable reference configuration, finite positive-energy modes have sn=+1s_n=+1. The notation n>0n>0 below selects these branches. Collecting the complete set of finite-frequency mode vectors as U=(v1,v2,…)U=(v_1,v_2,\ldots) gives U†GU=η=diag⁡(sn)U^\dagger\mathcal{G}U=\eta=\operatorname{diag}(s_n), the commutator in the mode basis.

Berry curvature, topology, and extended dipoles

For an isolated positive-energy band, the Berry connection is An,i=−ivnk†G∂kivnk\mathcal{A}_{n,i}=-iv_{nk}^{\dagger}\mathcal{G}\partial_{k_i}v_{nk}, and Ωn,ij=∂kiAn,j−∂kjAn,i\Omega_{n,ij}=\partial_{k_i}\mathcal{A}_{n,j}-\partial_{k_j}\mathcal{A}_{n,i} is its ordinary Berry curvature [21, 22]. Cartesian momentum derivatives include the phase factors associated with the atomic basis positions. In the mode basis, define the velocity matrix Vi=U†(∂kiH)UV_i=U^\dagger(\partial_{k_i}\mathcal{H})U. The Kubo expression is

Ωn,ij=2Im⁡∑m≠nsnsm(Vi)nm(Vj)mn(En−Em)2.(7)\Omega_{n,ij}=2\operatorname{Im}\sum_{m\ne n}s_ns_m\frac{(V_i)_{nm}(V_j)_{mn}}{(E_n-E_m)^2}. \tag*{(7)}

All energies and matrix elements in the Kubo expressions are evaluated at the same wave vector. The intermediate-state sum includes modes in both the positive- and negative-frequency sectors. For an isolated band over a two-dimensional Brillouin zone, the Chern number is [23]

Cn=12π∫BZΩn,xy(k) d2k.(8)C_n=\frac{1}{2\pi}\int_{\mathrm{BZ}}\Omega_{n,xy}(k)\,d^2k. \tag*{(8)}

MAGBERRY evaluates ordinary curvature and Chern numbers using either Eq. (7) or the discrete lattice-link method of Fukui, Hatsugai, and Suzuki [24].

To describe spin and angular momentum transport, let OO denote a selected Cartesian component, such as SaS_a or Lph,aL_{\mathrm{ph},a}. The laboratory-frame spin operator is assembled from the local spin coordinates. Mechanical phonon angular momentum (PAM) is L^ph=∑μu^μ×p^μ\hat{L}_{\mathrm{ph}}=\sum_\mu\hat{u}_\mu\times\hat{p}_\mu [25]. If OO is the matrix of the quadratic observable in the canonical basis, its mode-basis matrix is O=U†OUO=U^\dagger\mathcal{O}U. For O∈{Sa,Lph,a}O\in\{S_a,L_{\mathrm{ph},a}\}, the symmetrized current matrix is JiO=12(ViηO+OηVi)J_i^O=\frac{1}{2}(V_i\eta O+O\eta V_i). Its interband matrix elements give the current Berry curvature

Ωn,ijO=2Im⁡∑m≠nsnsm(JiO)nm(Vj)mn(En−Em)2.(9)\Omega_{n,ij}^{O}=2\operatorname{Im}\sum_{m\ne n}s_ns_m\frac{(J_i^O)_{nm}(V_j)_{mn}}{(E_n-E_m)^2}. \tag*{(9)}

The polarization index is aa, the current direction is ii, and the driving direction is jj. The interband matrix elements in these curvatures determine the spin Nernst and phonon angular momentum Hall responses [7, 26].

For orbital transport, O=Morb,aO=M_{\mathrm{orb},a} is a component of the magnon wave-packet moment M^orb=14(r^×v^−v^×r^)\hat{\mathbf{M}}_{\mathrm{orb}}=\frac{1}{4}(\hat{r}\times\hat{v}-\hat{v}\times\hat{r}). Its mode-basis matrix is constructed from velocity matrix elements. We adopt the orbital-current matrix JiM orb,a=14(ViηMorb,a+Morb,aηVi)J_i^{\mathrm{M\,orb},a}=\frac{1}{4}(V_i\eta M_{\mathrm{orb},a}+M_{\mathrm{orb},a}\eta V_i) and the curvature convention of Go et al. [27]. The orbital-current Berry curvature is then

Ωn,ijM orb,a=−2Im⁡∑m≠nsnsm(JiM orb,a)nm(Vj)mn(En−Em)2.(10)\Omega_{n,ij}^{\mathrm{M\,orb},a}=-2\operatorname{Im}\sum_{m\ne n}s_ns_m\frac{\left(J_i^{\mathrm{M\,orb},a}\right)_{nm}(V_j)_{mn}}{(E_n-E_m)^2}. \tag*{(10)}

The corresponding thermal prefactors are specified in § 3.3. At degeneracies, the geometric quantities are evaluated through subspace traces [28].

The extended-dipole contribution to nonlinear magnon transport depends on the momentum derivative of the energy-weighted Berry curvature. With Ωnb=12ϵbijΩn,ij\Omega_n^b=\frac{1}{2}\epsilon_{bij}\Omega_{n,ij}, the extended Berry curvature dipole field is [29]

D‾n,ib=∂ki(EnΩnb)=(∂kiEn)Ωnb+En∂kiΩnb.(11)\overline{D}_{n,i}^b=\partial_{k_i}\left(E_n\Omega_n^b\right)=(\partial_{k_i}E_n)\Omega_n^b+E_n\partial_{k_i}\Omega_n^b. \tag*{(11)}

Here ii labels the derivative direction and bb the curvature component. MagBerry evaluates this field on a periodic momentum grid and can weight it by EnE_n or the mode spin expectation ⟨Sa⟩n\langle S_a\rangle_n. The energy-weighted field EnD‾n,ibE_n\overline{D}_{n,i}^b enters the nonlinear thermal Hall coefficient [30].

Boltzmann and Hall transport coefficients

The thermal conductivity tensor relates the heat current to the temperature gradient,

jiE=−∑jκij(T) ∂jT.(12)j_i^E=-\sum_j\kappa_{ij}(T)\,\partial_jT. \tag*{(12)}

For a selected observable OO, including its polarization as defined in § 3.2, we define the corresponding response tensor by

jiO=−∑jΛijO(T) ∂jT.(13)j_i^O=-\sum_j\Lambda_{ij}^O(T)\,\partial_jT. \tag*{(13)}

Superscripts B and H denote Boltzmann and intrinsic Hall contributions, respectively. For a fixed Hamiltonian, the Bose occupation is ρnk(T)=nB(Enk,T)=[exp⁡(Enk/(kBT))−1]−1\rho_{nk}(T)=n_B(E_{nk},T)=\left[\exp\left(E_{nk}/(k_BT)\right)-1\right]^{-1}. Brillouin-zone integrals use the measure ∫k=∫BZddk/(2π)d\int_k=\int_{\mathrm{BZ}}d^dk/(2\pi)^d, where dd is the spatial dimension.

In the relaxation-time approximation, a temperature gradient produces the occupation correction δρnk=−τ∑jvn,jg(∂Tρnk)∂jT\delta\rho_{nk}=-\tau\sum_jv_{n,j}^{\mathrm{g}}(\partial_T\rho_{nk})\partial_jT [31]. Here τ\tau is the common relaxation time and vn,ig=∂kiEnk=(Vi)nnv_{n,i}^{\mathrm{g}}=\partial_{k_i}E_{nk}=(V_i)_{nn} is the group velocity of a positive-norm mode.

Each mode carries an energy flux Enkvn,igE_{nk}v_{n,i}^{\mathrm{g}}, giving the Boltzmann thermal conductivity

κijB(T)=τ∑n>0∫kEnkvn,igvn,jg∂Tρnk.(14)\kappa_{ij}^{\mathrm{B}}(T)=\tau\sum_{n>0}\int_k E_{nk}v_{n,i}^{\mathrm{g}}v_{n,j}^{\mathrm{g}}\partial_T\rho_{nk}. \tag*{(14)}

For spin or phonon angular momentum, O∈{Sa,Lph,a}O\in\{S_a,L_{\mathrm{ph},a}\}, the mode current is Jn,iO=(JiO)nn\mathcal{J}_{n,i}^O=(J_i^O)_{nn}, with the current matrix defined before Eq. (9). The resulting response coefficient is

ΛijO,B(T)=τ∑n>0∫kJn,iOvn,jg∂Tρnk.(15)\Lambda_{ij}^{O,\mathrm{B}}(T)=\tau\sum_{n>0}\int_k\mathcal{J}_{n,i}^Ov_{n,j}^{\mathrm{g}}\partial_T\rho_{nk}. \tag*{(15)}

The choice of observable resolves the spin and phonon angular momentum contributions of a hybrid mode. Within a degenerate subspace, operator traces replace the single-band products.

Intrinsic Hall responses use the thermal functions c1(ρ)=(1+ρ)ln⁡(1+ρ)−ρln⁡ρc_1(\rho)=(1+\rho)\ln(1+\rho)-\rho\ln\rho and c2(ρ)=∫0ρ[ln⁡(1+t−1)]2dtc_2(\rho)=\int_0^\rho[\ln(1+t^{-1})]^2\mathrm{d}t. The ordinary curvature gives the thermal Hall coefficient [17, 32, 33],

κijH(T)=−kB2T∑n>0∫kc2(ρnk)Ωn,ij(k).(16)\kappa_{ij}^{\mathrm{H}}(T)=-k_{\mathrm{B}}^2T\sum_{n>0}\int_k c_2(\rho_{nk})\Omega_{n,ij}(k). \tag*{(16)}

The spin Nernst coefficient describes the transverse flow of spin component SaS_a driven by a temperature gradient [26]. In terms of the spin-current curvature from Eq. (9), the coefficient is

ΛijSa,H(T)=−kB∑n>0∫kc1(ρnk)Ωn,ijSa(k).(17)\Lambda_{ij}^{S_a,\mathrm{H}}(T)=-k_{\mathrm{B}}\sum_{n>0}\int_{\mathbf{k}}c_1(\rho_{nk})\Omega_{n,ij}^{S_a}(\mathbf{k}). \tag*{(17)}

The phonon angular momentum Hall response is determined by the current curvature associated with Lph,aL_{\mathrm{ph},a} [7]. Its coefficient is

ΛijLph,a,H(T)=kB∑n>0∫kc1(ρnk)Ωn,ijLph,a(k).(18)\Lambda_{ij}^{L_{\mathrm{ph},a},\mathrm{H}}(T)=k_{\mathrm{B}}\sum_{n>0}\int_{\mathbf{k}}c_1(\rho_{nk})\Omega_{n,ij}^{L_{\mathrm{ph},a}}(\mathbf{k}). \tag*{(18)}

The magnon orbital Nernst response transports the wave-packet moment Morb,aM_{\mathrm{orb},a}. With the orbital-current normalization and curvature in Eq. (10), its coefficient reads [27]

ΛijMorb,a,H(T)=2kB∑n>0∫kc1(ρnk)Ωn,ijMorb,a(k).(19)\Lambda_{ij}^{M_{\mathrm{orb},a},\mathrm{H}}(T)=2k_{\mathrm{B}}\sum_{n>0}\int_{\mathbf{k}}c_1(\rho_{nk})\Omega_{n,ij}^{M_{\mathrm{orb},a}}(\mathbf{k}). \tag*{(19)}

In the examples, we write βija≡ΛijLph,a,H\beta_{ij}^{a}\equiv\Lambda_{ij}^{L_{\mathrm{ph},a},\mathrm{H}} for the intrinsic phonon response and βijLa≡ΛijLph,a,B\beta_{ij}^{L_a}\equiv\Lambda_{ij}^{L_{\mathrm{ph},a},\mathrm{B}} for its Boltzmann contribution. Temperature scans reuse the calculated energies and current curvatures, updating only the Bose weights.

For the two-dimensional nonlinear magnon thermal Hall response, we define jxE,(2)=χxyy(T)(∂yT)2j_x^{E,(2)}=\chi_{xyy}(T)(\partial_yT)^2. The extended-dipole contribution in the relaxation-time approximation is [30]

χxyy(T)=2τkBT∑n>0∫kc1(ρnk)EnkD‾n,yz(k),(20)\chi_{xyy}(T)=\frac{2\tau k_{\mathrm{B}}}{T}\sum_{n>0}\int_{\mathbf{k}}c_1(\rho_{nk})E_{nk}\overline{D}_{n,y}^{z}(\mathbf{k}), \tag*{(20)}

where D‾n,yz\overline{D}_{n,y}^{z} is defined by Eq. (11).

Boundary spectra and localization

We construct the Hamiltonian of a finite geometry by partially Fourier transforming the bulk BdG matrix. Strips retain one periodic direction and a finite width, while slabs retain two periodic directions and a finite thickness. MagBerry applies this construction to magnons, phonons, and their hybrid modes.

For one finite direction, denote reciprocal-lattice coordinates by (q∥,q⊥)(q_{\parallel},q_{\perp}). In the cell-periodic basis, the intercell matrix at integer separation rr is

hr(q∥)=∫01dq⊥ e−2πiq⊥rH(q∥,q⊥).(21)h_r(q_{\parallel})=\int_0^1dq_{\perp}\,e^{-2\pi i q_{\perp}r}\mathcal{H}(q_{\parallel},q_{\perp}). \tag*{(21)}

The integral is evaluated on a discrete grid. Retaining WW cells gives [HW]ℓℓ′=hℓ−ℓ′[\mathcal{H}_W]_{\ell\ell'}=h_{\ell-\ell'} for ℓ,ℓ′=1,…,W\ell,\ell'=1,\ldots,W. Couplings across the sample edge are truncated, and the default termination retains the bulk onsite blocks. In cellwise basis ordering, GW=IW⊗GG_W=I_W\otimes\mathcal{G}. The finite-system modes follow from GWHWvn=EnvnG_W\mathcal{H}_Wv_n=E_nv_n and are normalized by vn†GWvn=1v_n^\dagger G_Wv_n=1 for positive-energy modes.

To characterize localization, let vnℓv_{n\ell} be the part of a mode vector in cell ℓ\ell. A fixed local oscillator basis defines the positive weight matrix Wloc=diag⁡(I,I,ω0,ω0−1)W_{\mathrm{loc}}=\operatorname{diag}(I,I,\omega_0,\omega_0^{-1}) in the (a,a†,Q,P)(a,a^\dagger,Q,P) ordering, where ω0\omega_0 is a diagonal matrix of positive reference frequencies. Only the blocks corresponding to sectors present in the model are retained. The normalized cell weight is

wnℓ=vnℓ†Wlocvnℓ∑ℓ′vnℓ′†Wlocvnℓ′,∑ℓwnℓ=1.(22)w_{n\ell}=\frac{v_{n\ell}^{\dagger}W_{\mathrm{loc}}v_{n\ell}}{\sum_{\ell'}v_{n\ell'}^{\dagger}W_{\mathrm{loc}}v_{n\ell'}},\qquad\sum_{\ell}w_{n\ell}=1. \tag*{(22)}

For an edge or surface region E\mathcal{E} comprising selected outermost cells, wn,E=∑ℓ∈Ewnℓw_{n,\mathcal{E}}=\sum_{\ell\in\mathcal{E}}w_{n\ell}. Its localization-weighted spectral intensity is

AE(q∥,E)=∑n>0wn,E(q∥)γ/π[E−En(q∥)]2+γ2.(23)A_{\mathcal{E}}(q_{\parallel},E)=\sum_{n>0}w_{n,\mathcal{E}}(q_{\parallel})\frac{\gamma/\pi}{[E-E_n(q_{\parallel})]^2+\gamma^2}. \tag*{(23)}

where γ>0\gamma> 0 is the energy broadening. The boundary dispersion and weights, together with bulk gaps and Chern numbers, characterize bulk–boundary correspondence [22].

Transforming two directions constructs finite two-dimensional samples or rods periodic along the third direction. Their eigenmodes resolve localization at corners or hinges. For hybrid modes, MagBerry also evaluates magnetic and lattice composition. The observable matrix elements defined in § 3.2 give the spatial distributions of spin and phonon angular momentum.

Software organization and use

Installation and runtime environment

MagBerry requires Julia 1.10 or later. Extract the source package and run the following commands in Julia, using the source directory that contains Project.toml.

using Pkg
Pkg.activate()
Pkg.develop(path="path/to/MagBerry.jl")
Pkg.add(["Sunny", "CairoMakie"])

Replace path/to/MagBerry.jl with that directory. The package manager installs the dependencies. To begin a calculation script, load the packages:

using Sunny, MagBerry, CairoMakie

Each input script constructs a model, specifies momentum sampling and calculation parameters, and calls the analysis functions.

Model construction and data input

Three model types represent magnons, phonons, and hybrid modes. Sunny constructs magnetic models and provides their spin-wave Hamiltonians through SpinWaveTheory [14]. Phonon models use a crystal structure, atomic masses, and force constants; hybrid models combine the magnetic and phonon models with their coupling. Table 1 lists the constructors and input interfaces. To map supercell force constants onto the model cell, the importer uses the structures of both cells [19].

Function or constructorDescription
Sunny.SpinWaveTheoryConstruct a spin-wave model from magnetic interactions and a reference spin configuration.
PhononSystemCreate a phonon model from a crystal structure and atomic masses.
HybridSystemCombine spin waves, phonons, and magnon–phonon coupling.
set_force!, set_spring!Set force-constant matrices or spring interactions.
read_poscar_crystalRead a crystal structure from a POSCAR file.
read_phonopy_phononBuild a phonon model from crystal and supercell structures and Phonopy force constants.

Table 1. Model construction and data input interfaces.

Calculation interfaces and workflow

Each calculation takes a model, a momentum path or Brillouin-zone grid, and the selected bands or response components. Spectra, boundary modes, and Boltzmann transport are calculated directly from the model. Hall and Nernst calculations integrate the corresponding curvatures over the Brillouin zone, applying Bose weights at each requested temperature. Table 2 lists the main functions.

FunctionDescription
Sunny.dispersionCalculate bulk magnon, phonon, and hybrid spectra, respectively.
phonon_bands
hybrid_bands
berry_curvatureCalculate ordinary Berry curvature or the curvature associated with spin, orbital moment, and phonon angular momentum currents.
chern_numbersCalculate band Chern numbers for magnon, phonon, and hybrid models.
phonon_angular_momentumEvaluate phonon angular momentum and the composition and angular momenta of hybrid modes.
hybrid_mode_observables
boltzmann_transportCalculate heat, spin, and phonon angular momentum currents driven by a temperature gradient.
thermal_hall_conductivityCalculate the linear thermal Hall conductivity.
spin_nernst_conductivityCalculate spin Nernst and magnon orbital Nernst coefficients, respectively.
orbital_nernst_conductivity
angular_momentum_nernst_conductivityCalculate the phonon angular momentum Hall coefficient.
magnon_extended_bcdConstruct the extended magnon Berry curvature dipole field.
magnon_nonlinear_thermal_hall_conductivityCalculate the extended-dipole contribution to nonlinear magnon thermal Hall transport.
boundary_bandsCalculate boundary spectra for strips, slabs, finite two-dimensional samples, and rods.

Table 2. Main analysis and transport functions.

The chern_numbers interface accepts a model or previously calculated ordinary Berry-curvature data. The boundary_bands interface selects the geometry through geometry, with values :strip, :surface, :finite2d, and :hinge. For phonon and hybrid models, the phonon angular momentum Hall interface offers native adaptive integration over a requested temperature range. Appendix § 11 gives a complete phonon input. Scripts for the four main examples are provided in examples/paper; further tutorials are available in the online documentation.

OpenAI Codex (OpenAI, used in October 2026) assisted development of the adaptive integration and boundary interfaces and preparation of example and plotting scripts. The numerical results and figures were generated by the Julia implementations and inputs supplied with the program.

Illustrative examples

Four examples based on published models demonstrate magnon topology and boundary states, linear and nonlinear thermal Hall responses, and phonon angular momentum transport in elastic and hybrid systems. The online documentation provides complete inputs and further examples, including spin Nernst transport in a rutile-inspired altermagnet [34], magnon orbital moments and the orbital Nernst effect in a honeycomb antiferromagnet [27], and topological magnon–phonon hybridization in square-lattice and Fe2Mo3O8\mathrm{Fe}_2\mathrm{Mo}_3\mathrm{O}_8 models [11, 20].

Magnon topology, boundary states, and thermal Hall response

Dzyaloshinskii–Moriya interaction (DMI) opens a topological magnon gap in the honeycomb ferromagnet and supports chiral edge modes. We use the model of Pantaleón and Xian [35] to reproduce the published zigzag boundary spectrum and calculate the bulk Berry curvature, Chern numbers, and thermal Hall response. The spin Hamiltonian is

HF=−J∑⟨ij⟩Si⋅Sj+D∑⟨⟨ij⟩⟩νijz^⋅(Si×Sj).(24)H_{\mathrm{F}}=-J\sum_{\langle ij\rangle}\mathbf{S}_i\cdot\mathbf{S}_j+D\sum_{\langle\langle ij\rangle\rangle}\nu_{ij}\hat{\mathbf{z}}\cdot(\mathbf{S}_i\times\mathbf{S}_j). \tag*{(24)}

Here J>0J>0 is the nearest-neighbor ferromagnetic exchange, and DD is the next-nearest-neighbor DMI. Each bond is counted once, with νji=−νij\nu_{ji}=-\nu_{ij}. For the oriented next-neighbor vectors (a1,−a2,a2−a1)(\mathbf{a}_1,-\mathbf{a}_2,\mathbf{a}_2-\mathbf{a}_1), the input uses νij=+1\nu_{ij}=+1 on sublattice A and −1-1 on B. The vectors a1,a2\mathbf{a}_1,\mathbf{a}_2 are primitive lattice vectors. The spins have S=1S=1 and align along +z+z. Energies are measured in JSJS, and the nearest-neighbor distance is a=1a=1. The zigzag strips use the published parameters D/J=0D/J=0 and 0.10.1 and the outermost-site magnon potential δJS\delta JS with δ=1\delta=1.

At D/J=0.1D/J=0.1, the lower and upper bulk bands carry Chern numbers (−1,+1)(-1,+1) in the convention of Eq. (8) [Fig. 1(a)]. Their Berry curvatures have opposite signs and concentrate near the corners of the hexagonal Brillouin zone [panels (b,c)]. The bulk spectrum retains its acoustic Goldstone point, while boundary modes appear in the gap between the two positive-frequency branches.

Without DMI, the gapless system has an approximately flat edge branch. Finite DMI opens a bulk gap traversed by branches localized on opposite edges. Panels (d,e) show zigzag strips with 64 layers for D=0D=0 and 96 layers for D/J=0.1D/J=0.1, using the termination of Ref. [35]. The localized branches cross inside the bulk gap at q1=1/2q_1=1/2, E=3JSE=3JS.

Thermal occupation weights the opposite Berry curvatures of the two bands unequally, producing the thermal Hall response in panel (f). The coefficient increases from zero over the plotted temperature range. With Θ=kBT/(JS)\Theta=k_{\mathrm{B}}T/(JS) and κ~xy=ℏκxy/(kBJS)\tilde{\kappa}_{xy}=\hbar\kappa_{xy}/(k_{\mathrm{B}}JS), we obtain κ~xy≃0.141\tilde{\kappa}_{xy}\simeq0.141 at Θ=1\Theta=1.

Nonlinear magnon thermal Hall response

A magnetic field lifts the degeneracy of opposite-spin magnons in a honeycomb antiferromagnet and can activate a transverse heat current quadratic in the temperature gradient. We examine the extended Berry curvature dipole mechanism proposed by Ni et al. [30], using a realization with unequal nearest-neighbor exchange couplings. MagBerry calculates the dipole texture and the temperature and field dependence of the response. The spin Hamiltonian is

HAF=∑⟨ij⟩JijSi⋅Sj+Dz∑⟨⟨ij⟩⟩νijz^⋅(Si×Sj)+K∑i(Siz)2−B∑iSiz.(25)\begin{aligned} H_{\mathrm{AF}}={}&\sum_{\langle ij\rangle}J_{ij}\mathbf{S}_i\cdot\mathbf{S}_j+D_z\sum_{\langle\langle ij\rangle\rangle}\nu_{ij}\hat{\mathbf{z}}\cdot(\mathbf{S}_i\times\mathbf{S}_j)\\ &+K\sum_i(S_i^z)^2-B\sum_iS_i^z. \tag*{(25)} \end{aligned}

The sums count each bond once. For this model’s next-neighbor vectors (a1,−a2,a2−a1)(\mathbf{a}_1,-\mathbf{a}_2,\mathbf{a}_2-\mathbf{a}_1), νij=−1\nu_{ij}=-1 on A and +1+1 on B, with the opposite sign for reversed bonds. The two sublattices carry S=1S=1 moments along opposite zz directions. We use Dz=−0.47D_z=-0.47 meV, easy-axis anisotropy K=−0.45K=-0.45 meV, and nearest-neighbor exchanges (12,12,10.8)(12,12,10.8) meV, assigning the third value to the bond along xx. This bond anisotropy breaks threefold rotation. The Zeeman parameter BB is reported in energy units.

The local extended Berry curvature dipole is Dˉn,yz=∂ky(EnΩnz)\bar{D}_{n,y}^{z}=\partial_{k_y}(E_n\Omega_n^z). Its energy-weighted form enters Eq. (20), which defines jxE,(2)=χxyy(∂yT)2j_{x}^{E,(2)}=\chi_{xyy}(\partial_yT)^2. The response combines the calculated curvature and its momentum derivative with the Bose thermal weight. We use the triangular Bravais lattice length a=1a=1 Å and relaxation time τ=1\tau=1 ps, giving a two-dimensional sheet coefficient in W m K−2^{-2}.

At B=−0.4B=-0.4 meV, the field separates the otherwise degenerate conserved-spin sectors by 0.8 meV [Fig. 2(a)]. Panel (b) shows the lower-band extended dipole over the first Brillouin zone. The plot axes k1,k2k_1,k_2 are orthonormal coordinates in the reciprocal plane, and the derivative is taken along Cartesian yy. The response integral covers one reciprocal primitive cell.

Figure 1. Magnon topology and thermal transport. (a) Bulk bands for D/J=0.1D/J = 0.1, with Chern numbers (−1,+1)(-1, +1) in ascending energy order. (b,c) Berry curvature of the lower and upper bands, with the first Brillouin zone outlined. Here aa is the nearest-neighbor distance. (d,e) Finite-strip spectra reproducing the D=0D = 0 and D/J=0.1D/J = 0.1 cases of Fig. 2(a,b) in Ref. [35]. The zigzag strips have 64 and 96 layers and the published edge potential δ=1\delta= 1. Red and blue distinguish opposite edges, and gray denotes bulk-like modes. Here q1=3k/(2π)q_1 = \sqrt{3}k/(2\pi). (f) Thermal Hall coefficient of the same bulk model at D/J=0.1D/J = 0.1.

At zero field, the contributions from the two spin sectors cancel. Reversing the field changes the sign of χxyy\chi_{xyy}. Panel (c) shows the temperature dependence from 1 to 150 K at B=−0.4\mathcal{B}=-0.4, 0, and +0.4+0.4 meV with the same exchange parameters. At B=−0.4\mathcal{B}=-0.4 meV and 100 K, a 1202120^{2} midpoint grid gives χxyy≃5.29×10−25\chi_{xyy}\simeq5.29\times10^{-25} W m K−2^{-2}. The sign change between 59 and 60 K reflects the changing thermal weights of contributions across momentum space.

The field scans in panel (d) span −0.8≤B≤0.8-0.8\leq\mathcal{B}\leq0.8 meV at 20, 50, and 100 K. They use field steps of 0.1 meV and the same 1202120^{2} grids.

Phonon Berry curvature and angular momentum Hall response

Two elastic models illustrate phonon geometry and angular momentum transport. The honeycomb model exhibits valley angular momentum and Berry curvature, and the simple-cubic model gives the angular momentum Hall response. We calculate both with MagBerry using the harmonic bond Hamiltonian

Hph=∑ipi22Mi+12∑(ij)∈E[κT,ij∣Δuij∣2+(κL,ij−κT,ij)(e^ij⋅Δuij)2](26)H_{\mathrm{ph}}=\sum_i\frac{p_i^2}{2M_i}+\frac{1}{2}\sum_{(ij)\in\mathcal{E}}\left[\kappa_{\mathrm{T},ij}\lvert\Delta u_{ij}\rvert^2+(\kappa_{\mathrm{L},ij}-\kappa_{\mathrm{T},ij})(\hat{e}_{ij}\cdot\Delta u_{ij})^2\right] \tag*{(26)}

where Δuij=ui−uj\Delta u_{ij}=u_i-u_j, e^ij\hat{e}_{ij} is the unit vector along the equilibrium bond, and E\mathcal{E} contains each undirected bond once. The longitudinal and transverse force constants are κL,ij\kappa_{\mathrm{L},ij} and κT,ij\kappa_{\mathrm{T},ij}.

We denote their numerical inputs by KLK_{\mathrm{L}} and KTK_{\mathrm{T}} after conversion to the model units through

D(E)=ℏ2D(ω)D^{(E)} = \hbar^2 D^{(\omega)}

For the honeycomb AB model of Zhang and Niu [36], E\mathcal{E} contains the nearest-neighbor A–B bonds and ui=(uix,uiy)\mathbf{u}_i = (u_i^x,u_i^y). The primitive lattice constant is aa. Mass is measured in units of MAM_{\mathrm{A}}, with MB/MA=1.2M_{\mathrm{B}}/M_{\mathrm{A}} = 1.2, and the numerical spring parameters are KL=1K_{\mathrm{L}} = 1, KT=0.25K_{\mathrm{T}} = 0.25. The energy unit is E0=ℏκL/MAE_0 = \hbar\sqrt{\kappa_{\mathrm{L}}/M_{\mathrm{A}}}.

The two valleys carry opposite phonon angular momenta [Figure 3(a,Figure 3b)]. At KK, the second branch has (ℓAz,ℓBz)=(0,−1)ℏ(\ell_A^z,\ell_B^z)=(0,-1)\hbar, so its circular motion is carried by the B atom. The atomic contributions sum to the total mechanical PAM. The Berry curvatures of the two lowest branches, evaluated on a 96296^2 grid over the first Brillouin zone, also change sign between opposite valleys [panels (c,d)], as expected from time-reversal symmetry.

Figure 3. Phonon geometry and angular momentum Hall response. (a) Honeycomb AB bands [36] colored by mechanical PAM. (b) Atomic contributions to the second branch along the same path. (c,d) Ordinary Berry curvature of bands 1 and 2, with separate color scales and the first Brillouin zone outlined in black. (e) Bands of the simple-cubic model [7]. (f) Intrinsic PAM Hall coefficient of the simple-cubic model over 0–150 K, with the analytic zero-temperature limit included. The response in (f) is calculated from the angular momentum current curvature.

The simple-cubic model of Park and Yang [7] uses Eq. (26) with three displacement components per site. The set E\mathcal{E} contains the six nearest neighbors and twelve face-diagonal next-nearest neighbors of each site, with each bond counted once in the energy. For unit mass, the effective spring parameters entering D(E)D^{(E)} are (KL,KT)=(50,20) meV2(K_{\mathrm{L}},K_{\mathrm{T}})=(50,20)\,\mathrm{meV}^{2} for nearest neighbors and (20,10) meV2(20,10)\,\mathrm{meV}^{2} for next-nearest neighbors. The onsite force constants enforce the acoustic sum rule. Off-diagonal angular momentum matrix elements generate a finite Hall response through Eq. (15b), while the equilibrium diagonal PAM vanishes. Figure 3(e,f) shows the spectrum and Hall response, respectively.

The angular momentum Hall coefficient increases with temperature [panel (f)], reaching approximately 0.0953 kB/a0.0953\,k_{\mathrm{B}}/a at 100 K and 0.104 kB/a0.104\,k_{\mathrm{B}}/a at 150 K. The corresponding values read from Figure 2(b) of Ref. [7] are approximately 0.0943 kB/a0.0943\,k_{\mathrm{B}}/a and 0.103 kB/a0.103\,k_{\mathrm{B}}/a, respectively. We calculate the curve from 1 to 150 K with MagBerry’s native adaptive integration and cubic symmetry averaging, starting from a 10310^3 midpoint grid.

Figure 2. Nonlinear magnon thermal Hall response. (a) Bands at B=−0.4\mathcal{B}=-0.4 meV. (b) Lower-band extended dipole at the same field, in meV Å3^{3}, with the first Brillouin zone outlined in black. (c) Temperature dependence at B=−0.4\mathcal{B}=-0.4, 0, and +0.4+0.4 meV for the same exchange parameters. (d) Field dependence at 20, 50, and 100 K. The field variable is the Zeeman energy B\mathcal{B} in meV. Responses use τ=1\tau=1 ps and 1202120^{2} primitive-cell grids.

Phonon angular momentum transport in altermagnets

Magnon–phonon coupling in a dd-wave altermagnet can transfer the alternating magnon spin texture to the mechanical phonon angular momentum of the hybrid modes. Bendin et al. [12] calculated this texture in a square-lattice model and predicted a phonon angular momentum splitter effect from symmetry. That study did not evaluate the corresponding transport coefficients. We use MagBerry to calculate the Boltzmann response tensor and its temperature dependence. The tensor also gives the longitudinal and transverse currents as the temperature gradient rotates.

Using the notation of Ref. [12], the coupled model is H^=H^m+H^ph+H^mpc\hat{H}=\hat{H}_{\mathrm{m}}+\hat{H}_{\mathrm{ph}}+\hat{H}_{\mathrm{mpc}}. Its spin Hamiltonian, given in Eq. (A1) of that reference, is

H^m=−JAFM2∑⟨i,j⟩Si⋅Sj−∑l=1,2JFM,l2∑⟨⟨i,j⟩⟩lSi⋅Sj(27)\hat{H}_{\mathrm{m}}=-\frac{J_{\mathrm{AFM}}}{2}\sum_{\langle i,j\rangle}\mathbf{S}_i\cdot\mathbf{S}_j-\sum_{l=1,2}\frac{J_{\mathrm{FM},l}}{2}\sum_{\langle\langle i,j\rangle\rangle_l}\mathbf{S}_i\cdot\mathbf{S}_j \tag*{(27)}

Here JAFM<0J_{\mathrm{AFM}}<0 couples nearest neighbors antiferromagnetically, while JFM,1J_{\mathrm{FM},1} and JFM,2>0J_{\mathrm{FM},2}>0 describe the two directional next-neighbor bond families, interchanged between the opposite-spin sublattices. The bond sums follow the convention of the reference.

The phonon Hamiltonian follows Eq. (B1) of the same reference,

H^ph=∑ipi22M+12∑⟨i,j⟩[(KL(1)−KT)(uij⋅R^ij)2+KTuij2]+KL(2)2∑⟨⟨i,j⟩⟩(uij⋅R^ij)2(28)\hat{H}_{\mathrm{ph}}=\sum_i\frac{\mathbf{p}_i^2}{2M}+\frac{1}{2}\sum_{\langle i,j\rangle}\left[(K_{\mathrm{L}}^{(1)}-K_{\mathrm{T}})(\mathbf{u}_{ij}\cdot\hat{\mathbf{R}}_{ij})^2+K_{\mathrm{T}}\mathbf{u}_{ij}^2\right]+\frac{K_{\mathrm{L}}^{(2)}}{2}\sum_{\langle\langle i,j\rangle\rangle}(\mathbf{u}_{ij}\cdot\hat{\mathbf{R}}_{ij})^2 \tag*{(28)}

where uij=ui−uj\mathbf{u}_{ij}=\mathbf{u}_i-\mathbf{u}_j, R^ij\hat{\mathbf{R}}_{ij} is the unit bond vector, and the displacements and momenta lie in the xyxy plane. The displacement-induced DMI coupling is the reference’s Eq. (2),

H^mpc=DSR∑⟨i,j⟩{±(ui−uj)⋅(Si−Sj)}.(29)\hat{H}_{\mathrm{mpc}}=\frac{DS}{R}\sum_{\langle i,j\rangle}\left\{\pm(\mathbf{u}_i-\mathbf{u}_j)\cdot(\mathbf{S}_i-\mathbf{S}_j)\right\}. \tag*{(29)}

The coupling runs over same-sublattice next-neighbor bonds of length R=2aR=\sqrt{2}a, with ++ for the spin-up sublattice and −- for the spin-down sublattice. The full quadratic hybrid Hamiltonian retains anomalous terms.

The dimensionless model parameters are S=1S=1, M=10M=10, JAFM=−1J_{\mathrm{AFM}}=-1, JFM,1=0.383J_{\mathrm{FM},1}=0.383, JFM,2=0.5J_{\mathrm{FM},2}=0.5, KL(1)=160K_{\mathrm{L}}^{(1)}=160, KL(2)=40K_{\mathrm{L}}^{(2)}=40, and D=0.25D=0.25, with E0=∣JAFM∣E_0=\lvert J_{\mathrm{AFM}}\rvert and a=1a=1. The ferromagnetic exchange coefficients used in Eq. (27) are 2JFM,l2J_{\mathrm{FM},l}, matching the published uncoupled magnon dispersion. They are twice the coefficients printed in Eq. (S.4b) of the source supplement.

Hybridization mixes two magnetic modes with four in-plane phonon modes to form six positive-frequency branches [Figure 4(a,Figure 4b)]. Band 4, numbered in ascending energy order, acquires the dd-wave mechanical PAM texture shown in panel (c). Across the anticrossing in panels (d–f), the decomposition Lphz=LAz+LBzL_{\mathrm{ph}}^{z}=L_{\mathrm{A}}^{z}+L_{\mathrm{B}}^{z} shows the partial cancellation of the two sublattice contributions.

Figure 4. Phonon angular momentum currents in the square-lattice hybrid model. (a) Uncoupled modes colored by magnetic spin. (b) Six hybrid branches colored by mode character. (c) Mechanical PAM of band 4 over the magnetic Brillouin zone. (d–f) The anticrossing along qx=0q_x = 0, colored by the total PAM and its sublattice AA and BB contributions. The total and sublattice color ranges are ±0.1ℏ\pm0.1\hbar and ±0.5ℏ\pm0.5\hbar, respectively. (g) Boltzmann coefficients obtained from the conventional symmetrized current, per common relaxation time. (h) Longitudinal and transverse coefficients at θ=2\theta= 2, with directions defined in the text. The transport curves use a 2562256^2 grid.

The boltzmann_transport interface uses the conventional symmetrized current J^iLz={L^phz,v^i}/2\hat{J}_{i}^{L_z}=\{\hat{L}_{\mathrm{ph}}^{z},\hat{v}_{i}\}/2 to evaluate Eq. (13b). The sum includes all six bands and retains the full normalization of each hybrid mode. We report the response per common relaxation time. With θ=kBT/E0\theta=k_{\mathrm{B}}T/E_0 and τˉ=τE0/ℏ\bar{\tau}=\tau E_0/\hbar, the coefficient CijLz=βijLz/(kBτˉ)C_{ij}^{L_z}=\beta_{ij}^{L_z}/(k_{\mathrm{B}}\bar{\tau}) gives

J˙iLzE0/a=−τˉCijLz∂θ∂(xj/a).(30)\frac{\dot{J}_{i}^{L_z}}{E_0/a}=-\bar{\tau}C_{ij}^{L_z}\frac{\partial\theta}{\partial(x_j/a)}. \tag*{(30)}

The Boltzmann tensor is diagonal and satisfies CyyLz=−CxxLzC_{yy}^{L_z}=-C_{xx}^{L_z}, producing opposite angular momentum responses along the two crystal axes [xref]panel (g)]. At θ=2\theta=2, CxxLz≃1.44×10−4C_{xx}^{L_z}\simeq1.44\times10^{-4} for the symmetrized current. The semiclassical current Lnvn,iL_{n v_n,i} gives CxxLz≃3.34×10−4C_{xx}^{L_z}\simeq3.34\times10^{-4}. The calculation covers the full magnetic Brillouin zone with a 2562256^2 midpoint grid and 31 temperatures from θ=0.5\theta=0.5 to 8.

The opposite diagonal tensor entries determine the angular momentum splitter response in panel (h), shown at θ=2\theta=2. For a temperature gradient along e=(cos⁡ϕ,sin⁡ϕ)e=(\cos\phi,\sin\phi) and transverse direction p=(−sin⁡ϕ,cos⁡ϕ)p=(-\sin\phi,\cos\phi), the projections are C∥=eTCe=Acos⁡2ϕC_{\parallel}=e^{T}Ce=A\cos2\phi and C⊥=pTCe=−Asin⁡2ϕC_{\perp}=p^{T}Ce=-A\sin2\phi, with A=CxxLzA=C_{xx}^{L_z}. Both current components are proportional to the common relaxation time.

Conclusions

MagBerry calculates spectra, topology, and transport for magnons, phonons, and their hybrid modes with a consistent bosonic normalization. Native phonon and spin–lattice modules complement Sunny spin-wave models. The examples reproduce published magnon boundary spectra and show how a magnetic field controls the nonlinear magnon thermal Hall response. They also illustrate phonon band geometry and angular momentum Hall transport.

For the altermagnetic model, we calculate transport coefficients associated with the published dd-wave phonon angular momentum texture. The original study [12] predicted the corresponding splitter effect from symmetry but did not evaluate these coefficients. Within the relaxation-time approximation, the native Boltzmann interface gives the temperature-dependent response tensor and its longitudinal and transverse projections.

Acknowledgements

This work was supported by the National Natural Science Foundation of China (Grant No. 52130204).

CRediT authorship contribution statement

Xiaonong Shen: Software, Validation, Visualization, Writing – original draft. Wei Ren: Supervision, Funding acquisition, Writing – review & editing.

Declaration of competing interest

The authors declare no competing interests.

Data and code availability

The source code of MagBerry v0.2.4 and the model inputs used to reproduce the figures are provided in the accompanying software archive.

Example input: phonon angular momentum Hall response

The following input constructs the simple-cubic model in § 5.3 and plots its bands. It also plots the angular momentum current curvature on the qz=0q_z = 0 plane. Adaptive three-dimensional integration then gives the Hall response as a function of temperature.

using Sunny, MagBerry, CairoMakie
crystal = Crystal(lattice_vectors(1,1,1,90,90,90),
                  [[0,0,0]], 221)
phonon = PhononSystem(crystal, [1.0])
set_spring!(phonon, 50, Bond(1,1,[1,0,0]); transverse=20)
set_spring!(phonon, 20, Bond(1,1,[1,1,0]); transverse=10)
enforce_asr!(phonon)

path = q_space_path(crystal,
    [[0,0,0],[.5,0,0],[.5,.5,0],[0,0,0],[.5,.5,.5]],301;
    labels=["Γ","X","M","Γ","R"])
plot_bands(phonon, path)

bc = berry_curvature(phonon; kmesh=(40,40), observable=:pam)
plot_berry_curvature(bc; band=3)
plot_angular_momentum_nernst_conductivity(phonon;
    kmesh=10, temperatures=1:150, adaptive_refinement=true)

Declaration of generative AI use

OpenAI Codex was used to assist drafting and language revision of this manuscript. The authors reviewed the resulting text, made the necessary revisions, and are responsible for the final content.

References

  1. [1]R. Chisnell, J. S. Helton, D. E. Freedman, D. K. Singh, R. I. Bewley, D. G. Nocera, Y. S. Lee, Topological magnon bands in a kagome lattice ferromagnet, Phys. Rev. Lett. 115 (2015) 147201. doi:10.1103/PhysRevLett.115.147201.DOI
  2. [2]L. Chen, J.-H. Chung, B. Gao, T. Chen, M. B. Stone, A. I. Kolesnikov, Q. Huang, P. Dai, Topological spin excitations in honeycomb ferromagnet CrI₃, Phys. Rev. X 8 (2018) 041028. doi:10.1103/PhysRevX.8.041028.DOI
  3. [3]H. Miao, T. T. Zhang, L. Wang, D. Meyers, A. H. Said, Y. L. Wang, Y. G. Shi, H. M. Weng, Z. Fang, M. P. M. Dean, Observation of double Weyl phonons in parity-breaking FeSi, Phys. Rev. Lett. 121 (2018) 035302. doi:10.1103/PhysRevLett.121.035302.DOI
  4. [4]C. Strohm, G. L. J. A. Rikken, P. Wyder, Phenomenological evidence for the phonon Hall effect, Phys. Rev. Lett. 95 (2005) 155901. doi:10.1103/PhysRevLett.95.155901.DOI
  5. [5]Y. Onose, T. Ideue, H. Katsura, Y. Shiomi, N. Nagaosa, Y. Tokura, Observation of the magnon Hall effect, Science 329 (5989) (2010) 297–299. doi:10.1126/science.1188260.DOI
  6. [6]R. Cheng, S. Okamoto, D. Xiao, Spin Nernst effect of magnons in collinear antiferromagnets, Phys. Rev. Lett. 117 (2016) 217202. doi:10.1103/PhysRevLett.117.217202.DOI
  7. [7]S. Park, B.-J. Yang, Phonon angular momentum Hall effect, Nano Lett. 20 (2020) 7694–7699. doi:10.1021/acs.nanolett.0c03220.DOI
  8. [8]S. Liu, A. Granados del Águila, D. Bhowmick, C. K. Gan, T. Thu Ha Do, M. A. Prosnikov, D. Sedmidubský, Z. Sofer, P. C. M. Christiansen, P. Sengupta, Q. Xiong, Direct observation of magnon-phonon strong coupling in two-dimensional antiferromagnet at high magnetic fields, Phys. Rev. Lett. 127 (2021) 097401. doi:10.1103/PhysRevLett.127.097401.DOI
  9. [9]T. Luo, H. Ning, B. Ilyas, A. von Hoegen, E. Viñas Boström, J. Park, J. Kim, J.-G. Park, D. M. Juraschek, A. Rubio, N. Gedik, Terahertz control of linear and nonlinear Magno-phononics, Nat. Commun. 16 (2025) 6863. doi:10.1038/s41467-025-62091-4.DOI
  10. [10]J. Cui, E. V. Boström, M. Ozerov, F. Wu, Q. Jiang, J.-H. Chu, C. Li, F. Liu, X. Xu, A. Rubio, Q. Zhang, Chirality selective magnon-phonon hybridization and magnon-induced chiral phonons in a layered zigzag antiferromagnet, Nat. Commun. 14 (2023) 3396. doi:10.1038/s41467-023-39123-y.DOI
  11. [11]S. Bao, Z.-L. Gu, Y. Shangguan, Z. Huang, J. Liao, X. Zhao, B. Zhang, Z.-Y. Dong, W. Wang, R. Kajimoto, M. Nakamura, T. Fennell, S.-L. Yu, J.-X. Li, J. Wen, Direct observation of topological magnon polarons in a multiferroic material, Nat. Commun. 14 (2023) 6093. doi:10.1038/s41467-023-41791-9.DOI
  12. [12]H. Bendin, A. Mook, I. Mertig, R. R. Neumann, D-wave phonon angular momentum texture in altermagnets by magnon-phonon hybridization, Phys. Rev. Lett. 137 (2026) 056701. doi:10.1103/r43h-ch8r.DOI
  13. [13]S. Toth, B. Lake, Linear spin wave theory for single-Q incommensurate magnetic structures, J. Phys.: Condens. Matter 27 (16) (2015) 166002. doi:10.1088/0953-8984/27/16/166002.DOI
  14. [14]D. Dahlbom, H. Zhang, C. Miles, S. Quinn, A. Niraula, B. Thipe, M. Wilson, S. Matin, H. Mankad, S. Hahn, D. Pajerowski, S. Johnston, Z. Wang, H. Lane, Y. W. Li, X. Bai, M. Mouirad, C. D. Batista, K. E. Barros, Sunnyjl: A Julia package for spin dynamics, J. Open Source Softw. 10 (116) (2025) 8138. doi:10.21105/joss.08138.DOI
  15. [15]P. Pandey, S. K. Pandey, PH-NODE: A DFPT and finite displacement supercell based Python code for searching nodes in topological phononic materials, Comput. Phys. Commun. 303 (2024) 109281. doi:10.1016/j.cpc.2024.109281.DOI
  16. [16]J. H. P. Colpa, Diagonalization of the quadratic boson Hamiltonian, Physica A 93 (1978) 327–353. doi:10.1016/0378-4371(78)90160-7.DOI
  17. [17]R. Matsumoto, R. Shindou, S. Murakami, Thermal Hall effect of magnons in magnets with dipolar interaction, Phys. Rev. B 89 (2014) 054420. doi:10.1103/PhysRevB.89.054420.DOI
  18. [18]T. Holstein, H. Primakoff, Field dependence of the intrinsic domain magnetization of a ferromagnet, Phys. Rev. 58 (1940) 1098–1113. doi:10.1103/PhysRev.58.1098.DOI
  19. [19]A. Togo, L. Chaput, T. Tadano, I. Tanaka, Implementation strategies in phonopy and phono3py, J. Phys.: Condens. Matter 35 (35) (2023) 353001. doi:10.1088/1361-648X/acd831.DOI
  20. [20]G. Go, S. K. Kim, K.-J. Lee, Topological magnon-phonon hybrid excitations in two-dimensional ferromagnets with tunable Chern numbers, Phys. Rev. Lett. 123 (2019) 237207. doi:10.1103/PhysRevLett.123.237207.DOI
  21. [21]M. V. Berry, Quantal phase factors accompanying adiabatic changes, Proc. R. Soc. Lond. A 392 (1802) (1984) 45–57. doi:10.1098/rspa.1984.0023.DOI
  22. [22]R. Shindou, R. Matsumoto, S. Murakami, J.-i. Ohe, Topological chiral magnonic edge mode in a magnonic crystal, Phys. Rev. B 87 (2013) 174427. doi:10.1103/PhysRevB.87.174427.DOI
  23. [23]D. J. Thouless, M. Kohmoto, M. P. Nightingale, M. den Nijs, Quantized Hall conductance in a two-dimensional periodic potential, Phys. Rev. Lett. 49 (1982) 405–408. doi:10.1103/PhysRevLett.49.405.DOI
  24. [24]T. Fukui, Y. Hatsugai, H. Suzuki, Chern numbers in discretized Brillouin zone: Efficient method of computing (spin) Hall conductances, J. Phys. Soc. Jpn. 74 (2005) 1674–1677. doi:10.1143/JPSJ.74.1674.DOI
  25. [25]L. Zhang, Q. Niu, Angular momentum of phonons and the Einstein–de Haas effect, Phys. Rev. Lett. 112 (2014) 085503. doi:10.1103/PhysRevLett.112.085503.DOI
  26. [26]V. A. Zyuzin, A. A. Kovalev, Magnon spin Nernst effect in antiferromagnets, Phys. Rev. Lett. 117 (2016) 217203. doi:10.1103/PhysRevLett.117.217203.DOI
  27. [27]G. Go, D. An, H.-W. Lee, S. K. Kim, Magnon orbital Nernst effect in honeycomb antiferromagnets without spin–orbit coupling, Nano Lett. 24 (20) (2024) 5968–5974. doi:10.1021/acs.nanolett.4c00430.DOI
  28. [28]F. Wilczek, A. Zee, Appearance of gauge structure in simple dynamical systems, Phys. Rev. Lett. 52 (1984) 2111–2114. doi:10.1103/PhysRevLett.52.2111.DOI
  29. [29]H. Kondo, Y. Akagi, Nonlinear magnon spin Nernst effect in antiferromagnets and strain-tunable pure spin current, Phys. Rev. Research 4 (2022) 013186. doi:10.1103/PhysRevResearch.4.013186.DOI
  30. [30]J. Ni, Y. Jin, Q. Du, G. Chang, Magnon nonlinear Hall effect in two-dimensional antiferromagnetic insulators, Phys. Rev. B 112 (2025) 054424. doi:10.1103/72sf-6km4.DOI
  31. [31]B. Flebus, K. Shen, T. Kikkawa, K.-i. Uchida, Z. Qiu, E. Saitoh, R. A. Duine, G. E. W. Bauer, Magnon-polaron transport in magnetic insulators, Phys. Rev. B 95 (2017) 144420. doi:10.1103/PhysRevB.95.144420.DOI
  32. [32]R. Matsumoto, S. Murakami, Theoretical prediction of a rotating magnon wave packet in ferromagnets, Phys. Rev. Lett. 106 (2011) 197202. doi:10.1103/PhysRevLett.106.197202.DOI
  33. [33]R. Matsumoto, S. Murakami, Rotational motion of magnons and the thermal Hall effect, Phys. Rev. B 84 (2011) 184406. doi:10.1103/PhysRevB.84.184406.DOI
  34. [34]R. Hoyer, R. Jaeschke-Ubiergo, K.-H. Ahn, L. Šmejkal, A. Mook, Spontaneous crystal thermal Hall effect in insulating altermagnets, Phys. Rev. B 111 (2025) L020412. doi:10.1103/PhysRevB.111.L020412.DOI
  35. [35]P. A. Pantaleón, Y. Xian, Analytical study of the edge states in the bosonic Haldane model, J. Phys.: Condens. Matter 29 (29) (2017) 295701, corrected manuscript: arXiv:1704.07746v3. doi:10.1088/1361-648X/aa75bf.DOI
  36. [36]L. Zhang, Q. Niu, Chiral phonons at high-symmetry points in monolayer hexagonal lattices, Phys. Rev. Lett. 115 (2015) 115502. doi:10.1103/PhysRevLett.115.115502.DOI

Paper details

vlnc:W_3bffxphp
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 3

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Codex

View statement
Looking for related papers…
Contents