research papers\(\def\hfill{\hskip 5em}\def\hfil{\hskip 3em}\def\eqno#1{\hfil {#1}}\)

Journal logoJOURNAL OF
APPLIED
CRYSTALLOGRAPHY
ISSN: 1600-5767

Accurate simulations of magnetic excitations in the neutron simulation package McStas

crossmark logo

aNanoscience Center, Niels Bohr Institute, University of Copenhagen, Denmark, and bInstitute of Physics, École Polytechnique Fédérale de Lausanne (EPFL), CH-1015 Lausanne, Switzerland
*Correspondence e-mail: [email protected]

Edited by N. B. Christensen, Technical University of Denmark (Received 3 December 2025; accepted 6 March 2026; online 30 April 2026)

This article is part of a collection of articles related to the International Conference on Neutron Scattering, ICNS2025.

An algorithm for the accurate simulation of neutron scattering from magnetic excitations has been developed and implemented as new component for the neutron ray-tracing software McStas. The component SpinWave_BCO simulates inelastic neutron scattering from ferro-, antiferro- and altermagnetic excitations in a body-centred orthorhombic crystal structure, where the dispersion relation and scattered neutron intensities are derived using linear spin wave theory. Data from a simulated triple-axis spectrometer with an extremely high resolution have been verified by direct comparison with theory and by comparison with data simulated using the package SpinW. The component serves as a proof of concept for the implementation of a more general linear spin wave component in McStas.

1. Introduction

Neutron scattering is an essential tool for investigating the structure and dynamics of condensed matter, being sensitive to both the nuclei and the magnetic moments in a sample (Boothroyd, 2020View full citation). In a neutron scattering experiment, one generally measures both the neutron energy and momentum transfers:

Mathematical equation

Mathematical equation

where Mathematical equation is the neutron mass, ℏ is Planck's constant, E is the neutron energy, k is the neutron wavevector, and the indices `i' and `f' denote the initial and final neutron states, respectively.

Since access to neutron scattering beam time is limited, much instrumental design and preparation is carried out by neutron ray-tracing simulations. Here, virtual experiments (Lefmann et al., 2008View full citation) on digital twins of neutron instruments can provide valuable insight into instrument performance, experiment feasibility, experiment resolution, multiple scattering effects and signal-to-background relations. In addition, much simulation work is performed for the analysis and design of novel neutron instrumentation, e.g. at the upcoming European Spallation Source, ESS (Andersen et al., 2020View full citation).

One of the most used ray-tracing tools is McStas, a package originating from the 1990s (Lefmann & Nielsen, 1999View full citation) and continuously upgraded since. In the package, neutron instruments are assembled by positioning tailor-made or system-provided components (Willendrup & Lefmann, 2020View full citation). Among many existing system components, McStas contains a number of model neutron scattering samples, providing incoherent scattering, small-angle scattering, reflectivity and crystal diffraction (Willendrup et al., 2006View full citation; Willendrup & Lefmann, 2021View full citation; Christensen et al., 2026View full citation). However, the number of inelastic scattering samples in McStas is at present very limited, the only examples being a flat inelastic mode (akin to a crystal electric field level), a single quasielastic Lorentzian line and a one-branch phonon sample. This seriously limits the breadth of inelastic virtual experiments that can be performed in McStas.

A component for magnon scattering, called Magnon_bcc, currently exists in the McStas component library and was written by some of us. However, this component is limited in scope and has never been fully developed or validated. In addition, we note that the simulation package McVine contains simulations of general dispersion relations, although the full algorithm is to our knowledge not published (Lin et al., 2016View full citation; Lin et al., 2019View full citation).

In this work, we remedy this situation by presenting the new McStas component SpinWave_BCO, which calculates and simulates the spin waves of a ferromagnet or a two-sublattice antiferromagnet in the body-centred orthorhombic structure. The component has been tested in a simple virtual experiment using a thermal triple-axis spectrometer with an unrealistically good resolution in both Mathematical equation and q. The simulated dispersion and intensity match convincingly both with analytical calculations and with the output of the package SpinW (Toth & Lake, 2015View full citation). We expect this component to be useful as a test of instrument design as well as for detailed analysis of spin wave data. The component can be readily upgraded to accept a more general lattice geometry and interaction pattern.

2. Spin wave theory

We here describe the theory of quantized spin waves (magnons), also known as linear spin wave theory, that we have used as a basis for our simulations. Although this topic has been known for more than half a century, spin wave theory comes in different variations, e.g. how to specify anisotropy constants and infamous factor 2 variations in definitions of the interaction constants. For these reasons, we deem it necessary to document exactly which equations lie behind our simulations. The main focus will be on the antiferromagnetic spin waves in the body-centred orthorhombic structure. However, the component will in addition simulate ferromagnetic spin waves in the same crystal structure, so a short introduction to the ferromagnetic case is also given.

The magnetism in the system of interest is governed by Heisenberg interactions with coupling strength Jij, uniaxial anisotropy parametrized by the constant D and an applied magnetic field with field strength B. For simplicity, we here align both the easy axis and the field along the crystallographic c axis (the z direction). The field is applied to stabilize the spins (si) in the positive z direction. The system is thus described by the Hamiltonian

Mathematical equation

where Mathematical equation is the electron gyromagnetic ratio and Mathematical equation meV T−1 is the Bohr magneton. When Mathematical equation dominates, the system is said to be ferromagnetic, while Mathematical equation dominating leads to an antiferromagnetic system.

2.1. Ferromagnetic spin waves

The ferromagnetic (FM) case for Mathematical equation is relatively simple, as the eigenstate of the Hamiltonian equals the classical ground state, where all spins are oriented along the +z direction.

The magnetic dynamics of the system are found using linear spin wave theory, where the deviations from the ground state are assumed to be small. The Hamiltonian is written using the spin raising and lowering operators for spins at position Mathematical equation: Mathematical equation. This is then reduced to second order by the Holstein–Primakoff transformation (Boothroyd, 2020View full citation):

Mathematical equation

Mathematical equation

Mathematical equation

where S (unitless) is the spin value, and Mathematical equation and its Hermitian conjugate are bosonic operators satisfying the commutation relation Mathematical equation.

Using a first-order expansion of the Holstein–Primakoff transformations in the Hamiltonian, and further Fourier transforming the bosonic operators, leads directly to the diagonal Hamiltonian

Mathematical equation

Here E0 is the energy of the ground state and Mathematical equation counts the number of magnons of wavevector Mathematical equation and energy Mathematical equation, with Mathematical equation defined within the first Brillouin zone. The spin wave dispersion relation is given by

Mathematical equation

Here we have defined the Fourier transform of the coupling constants as

Mathematical equation

where Mathematical equation are vectors connecting one particular spin to its neighbours. We assume couplings ja, jb and jc to the nearest neighbours along each crystallographic axis in our body-centred orthorhombic structure. In addition, we add couplings j to the spins in all body-centred positions. The system is shown in Fig. 1[link] (left). It is convenient to separate Mathematical equation into two parts accounting for the interactions with the body-centred spins and spins along the crystallographic axes, respectively. We then obtain

Mathematical equation

with

Mathematical equation

and

Mathematical equation

Neutron scattering from magnons happens at low temperatures primarily via the creation or annihilation of a single magnon. The partial differential cross section for unpolarized neutron scattering from single magnons in the ferromagnet is (Marshall & Lovesey, 1971View full citation)

Mathematical equation

where + (Mathematical equation) refers to the creation (annihilation) of a magnon with energy Mathematical equation. In the expression, Mathematical equation is the neutron gyromagnetic ratio, Mathematical equation fm is the classical electron radius, Mathematical equation is the z component of a unit vector along the neutron scattering vector q, v0 is the volume of the magnetic unit cell and Mathematical equation is the thermal occupation number of (bosonic) magnons at temperature T, with kb the Boltzmann constant. The vectors τ are the reciprocal lattice vectors of a sublattice. Both the magnetic form factor, Mathematical equation, and the Debye–Waller factor, Mathematical equation, will be approximated as constants equal to 1.

[Figure 1]
Figure 1
Magnetic structure and exchange parameters for the ferromagnetic (left) and antiferromagnetic (right) system. The plots are generated using SpinW (Toth & Lake, 2015View full citation).

2.2. Antiferromagnetic spin waves

In this section we describe the dynamics of spin waves in a classical two-sublattice antiferromagnet (the Néel state). The magnetic unit cell of such an antiferromagnetic (AFM) system is shown in Fig. 1[link] (right).

As with the ferromagnet, the magnetic dynamics are found using linear spin wave theory. In this case we perform the Holstein–Primakoff transformations for each sublattice, where the Mathematical equation operators represent the spin operators of the `down' sublattice rotated by 180° about the x axis:

Mathematical equation

Mathematical equation

Mathematical equation

After expanding to first order and Fourier transforming to the operators Mathematical equation and Mathematical equation, the resulting Hamiltonian can be diagonalized by a Bogoliubov transformation to bosonic operators Mathematical equation and Mathematical equation via

Mathematical equation

where Mathematical equation and Mathematical equation are real coefficients fixed by requiring that all operators satisfy the relevant commutation relations, e.g. Mathematical equation and Mathematical equation. This leads to the final Hamiltonian

Mathematical equation

where E0 is the energy of the approximate ground state. Mathematical equation denote the two spin wave dispersion relations, which read (Marshall & Lovesey, 1971View full citation)

Mathematical equation

Mathematical equation is the mode index, which refers to the positive and negative signs of the Zeeman term, respectively, and

Mathematical equation

where the Fourier-transformed coupling constants are again given by equations (11) and (12).

The partial differential cross section for unpolarized neutron scattering from single magnons in an antiferromagnet is (Marshall & Lovesey, 1971View full citation)

Mathematical equation

The factor in the last line of the equation is denoted the coherence factor and consists of the coefficients of the Bogoliubov transformation. The vector Mathematical equation connects nearest-neighbour spins on different sublattices and is given by Mathematical equation for the body-centred structure. One can show that given the condition for conservation of crystal momentum Mathematical equation the following identity holds:

Mathematical equation

meaning that the coherence factor can be calculated directly from the neutron scattering vector Mathematical equation. Using this, the coherence factor is given by

Mathematical equation

Since Mathematical equation has a period of two Brillouin zones, as can be seen from equation (8), the coherence factor causes the scattered intensity to vary between different Brillouin zones, having the highest value when q′ is close to an antiferromagnetic ordering vector.

3. Implementation

We now describe the calculations implemented in the new component SpinWave_BCO in McStas. This component simulates the spin wave spectrum of the magnetic systems described above, incorporating both the dispersion relations (8) and (19) and the scattered intensity, which will be derived from equations (13) and (21).

McStas simulates neutron scattering experiments using Monte Carlo ray-tracing techniques. Neutrons are treated as classical rays defined by the components of their position, velocity and spin. To economize computing power, each ray is treated as a number of neutrons, with the equivalent neutron number given by a (non-integer) weight factor, p, assigned to each ray (Willendrup & Lefmann, 2020View full citation). When a ray interacts with a component, the ray parameters, including its weight, are subject to change. The weight factor is modified by the weight multiplier w, such that the weight factor after the interaction with component j is given by

Mathematical equation

Scattering events are simulated using Monte Carlo sampling, where we denote the sampling probability of a given event a by Mathematical equation. The weight multiplier wa is then the ratio between the physical probability of that event Pa, which is found from the cross section, and the sampling probability Mathematical equation (Willendrup & Lefmann, 2021View full citation):

Mathematical equation

As an example, to simulate reflection in a neutron guide, one would only simulate reflected neutrons, meaning Mathematical equation. If e.g. the probability of reflection is Mathematical equation, we would obtain a weight multiplier of Mathematical equation.

For the SpinWave_BCO component, the Monte Carlo choices consist of (a) selecting a scattering direction, Mathematical equation, and (for the antiferromagnetic system) (b) selecting one spin wave mode out of Mathematical equation possibilities. The former is determined with a uniform distribution within a predefined solid-angle interval, Mathematical equation. When a neutron scatters from an excitation following a dispersion relation Mathematical equation, in this case a magnon in the chosen magnetic system, it must obey the kinematic constraint

Mathematical equation

where the spin wave dispersion Mathematical equation is now generalized to the neutron wavevector Mathematical equation by periodicity. Via the kinematic constraint, the neutron fulfils one of the delta functions in equation (13) or (21). Given that the direction of Mathematical equation is already chosen, the kinematic constraint can be solved, giving Mathematical equation possible values of the final neutron speed Mathematical equation (Squires, 1977View full citation). These values of Mathematical equation are determined, and a third MC choice (c) selects one of these values. This algorithm is essentially equivalent to MC simulation of phonon scattering, implemented in McStas through the components Phonon_simple and Phonon_PG and described by Davidsen et al. (2026View full citation). It is here derived that the weight multiplier of the component is given by

Mathematical equation

where Mathematical equation is the path length of that particular neutron ray inside the sample if it does not scatter, Nv0 is the total volume of the sample and Mathematical equation is the differential cross section. The differential cross section is defined as

Mathematical equation

where Ψ is the flux of the incoming neutron beam. The cross section thus describes the total number of neutrons scattered into a particular direction, regardless of their energy (Booth­royd, 2020View full citation).

When searching for solutions to the kinematic constraint, the initial neutron velocity and the direction of the neutrons' final velocity, Mathematical equation and Mathematical equation, respectively, are kept fixed, while the neutron scattering vector and energy transfer are defined by the final neutron speed according to

Mathematical equation

Mathematical equation

This transforms the kinematic constraint into a one-dimensional problem, easily solved by standard numerical techniques; for details of this procedure, see Davidsen et al. (2026View full citation). The differential cross section Mathematical equation is calculated from Mathematical equation [equations (13) and (21) for the ferromagnet and antiferromagnet, respectively] by integrating over Mathematical equation. To do this, we utilize the relation

Mathematical equation

Here, xj is the jth (out of Mathematical equation) positive zero of f(x), and we have defined Mathematical equation. We can now perform the integration of the inelastic cross section, leading to the expression for the differential cross section for the creation (annihilation) of a single magnon with final speed Mathematical equation out of the Mathematical equation possible values. For the ferromagnetic case, this leads to

Mathematical equation

while for the antiferromagnetic case, the expression for mode a is

Mathematical equation

In the simulation, Mathematical equation is found numerically for the selected value of Mathematical equation.

The input parameters for the component are listed in Table 1[link].

Table 1
Table of input parameters for the spin wave component SpinWave_BCO

Parameter name Description
radius, yheight [m] Radius and height of cylindrical sample.
sigma_inc, sigma_abs [barns] Cross sections for incoherent scattering and absorption.
target_index Relative index of component to focus at with next component being +1.
target_x, target_y, target_z [m] Coordinates to focus at (alternative to target_index).
focus_xw, focus_yh [m] Width and height of focusing.
focus_aw, focus_ah [°] Direct specification of ΔΩ (alternative to focus_xw and focus_yh)
FM Flag for type of order. Default is 0 (antiferromagnet), 1 selects ferromagnetic.
a, b, c [Å] Lattice constants of orthorhombic lattice unit cell.
S Spin of magnetic ions.
j [meV] Magnetic interaction constant to the eight equivalent neighbours in the body-centred positions.
j_a, j_b, j_c [meV] Magnetic interaction constants to the neighbours along the a, b and c axes, respectively.
j_110, j_110_prime [meV] Magnetic interaction constants for altermagnetic splitting when FM = 0 (see Section 5[link]). Both are 0 by default.
D [meV] Uniaxial single-ion anisotropy constant.
B [T] Magnetic field strength.
T [K] Temperature.
mode_input If FM = 0: Parameter to specify which mode is simulated. Value of 2 (default) simulates both modes. Value of 0 or 1 simulates only the corresponding mode.

The component takes the form of a cylindrical sample. When it is placed without rotation, the a, b and c axes lie along the x, y and z axes of the McStas coordinate system, respectively.

The main functionality of the component is listed in Algorithm 1[link]:

[Scheme 1]
In these calculations, by far the largest computational power is expended in finding the relevant values of Mathematical equation that simultaneously fulfil the dispersion relation and the kinematic constraint.

The component also conducts a number of checks of the calculated expressions to ensure that the input parameters lead to physically meaningful results. An error message is produced if the dispersion becomes negative or imaginary and if the coherence factor becomes negative when simulating an antiferromagnetic system.

These would probably be caused by the input parameters that do not correspond to the chosen ground state (FM or AFM). When simulating a ferromagnetic system, the value of B is forced to be positive (or zero), such that the applied field always stabilizes the ground state. For the antiferromagnetic system, the magnetic field strength is set to zero if it induces a spin-flop transition, i.e. if the dispersion for the low-energy mode becomes negative.

4. Validation

The component was validated by comparing theoretical calculations with simulated data. This includes a validation of both the simulated dispersion relation, by extracting the Hamiltonian parameters from simulated data, and the simulated absolute intensities.

The main focus was on the validation of the antiferromagnet. This was done by modelling the spin wave spectrum of MnF2. This material has previously been understood as a classical antiferromagnet, with the magnetic Mn2+ ion situated in a body-centred tetragonal lattice. The crystal and Hamiltonian parameters for MnF2 used in the simulations are listed in Table 2(b)[link].

Table 2
Input parameters to the spin wave component used in the validation process

The antiferromagnetic parameters (b) match those modelled for the compound MnF2; adopted from Okazaki et al. (1964View full citation) and Nikotin et al. (1969View full citation).

(a)   (b)
Ferromagnet   Antiferromagnet
Parameter Value   Parameter Value
Mathematical equation 4.873 Å   Mathematical equation 4.873 Å
c 3.130 Å   c 3.130 Å
S 2.5   S 2.5
j −0.304 meV   j 0.304 meV
jc −0.056 meV   jc −0.056 meV
Mathematical equation −0.008 meV   Mathematical equation 0.008 meV
D −0.023 meV   D −0.023 meV

We employ a virtual thermal triple-axis spectrometer (TAS), operating with a fixed final energy of Mathematical equation meV. The instrument was previously used to test the Phonon_PG component and is described by Davidsen et al. (2026View full citation). The simulated instrument is tuned to have an unrealistically high resolution by reducing the sizes of the instrument components, such as the source, monochromator, sample and analyser. The energy FWHM of the instrument at the elastic line was found to be 0.08 meV using a simulation with the Incoherent sample component. Furthermore, the simulations do not include any sources of background or elastic scattering from the crystal. All of this aids in the comparison between the simulated datasets and the linear spin wave theory results. For the simulations, an initial number of 105 rays were used for each collected data point.

The data for the simulated dispersion were obtained as constant-energy scans along four paths in q space, each of which was confined to the (h0l) plane. Each scan was performed with a step size of 0.01 meV from 0 to 8 meV for the antiferromagnet and 0 to 13.2 meV for the ferromagnet. The sample temperature was set to Mathematical equation K for all simulations, much lower than the ordering temperature of MnF2, Mathematical equation K (Okazaki et al., 1964View full citation).

We will start by showing that the ferromagnet produces the result expected from theory. To do this, we artificially set all exchange interactions to be FM (negative), keeping their magnitude the same as those for AFM MnF2. The exchange interactions are displayed in Table 2[link].

4.1. The ferromagnetic case

The ferromagnetic dispersion has been simulated along (10l). A magnetic field of Mathematical equation T is applied to increase the size of the gap at the Brillouin zone centre. This is done to separate the spin wave creation and annihilation signals. A very small overlap between these two signals is still present, but the effect is relatively small. Gaussian line shapes were fitted to the constant-q scans to give a rough estimate of the intensity peak centres. The analytic expression for the dispersion given by equation (8) was fitted to the Mathematical equation dependence of the fitted peak positions, and the resulting parameters were compared with the original model parameters to demonstrate the consistency of our method. Since the scan is along l, only jc, j and D were kept as free parameters in the fit (Table 3[link]). The intensity data, fitted peak positions, and dispersions calculated from the fitted parameters and the original model parameters, respectively, can all be seen in Fig. 2[link] (top left). In Fig. 2[link] (bottom left) we show how the fitted peak positions and fitted dispersion (the dispersion calculated from the parameters extracted from the fit) deviate from the model dispersion. The deviations for both the points and the fitted dispersion are small. They generally follow each other as expected, except at q = (1, 0, 1), where mixing with the annihilation signals leads to lower energy values for the fitted peak positions.

Table 3
Ferromagnetic dispersion parameters obtained from a fit to constant-q scans, compared with the original values used in the simulation

Parameter Value from fit [meV] Input value to simulation [meV]
j −0.303184 (8) −0.304
jc −0.05659 (3) −0.056
D −±0.0332 (1) −0.023
[Figure 2]
Figure 2
Simulated data for the ferromagnetic systems. (Top left) Simulated dispersion compared with theory. Red points show the fitted peak positions. The solid white line shows the dispersion calculated from the fitted parameters and the dashed magenta line shows the dispersion calculated from the original model parameters. (Bottom left) The difference between the fitted peak positions and the original dispersion (red points), and the difference between the fitted dispersion and the original dispersion (solid line). Ideally, they should be as close to zero as possible (dashed line). (Right) Integrated differential cross section compared with theory.

Although the shape of the fitted dispersion is seen to match theory, the extracted parameters do not exactly match those used in the simulation; the value of the anisotropy constant D deviates by around 50%. However, given that D is very small and mainly determined by the data near the gap, where the creation and annihilation signals overlap, it is not surprising that this analysis exhibits minor deviations. For the antiferromagnetic case we show how a more in-depth analysis is able to reproduce the simulation parameters with a much higher accuracy.

In addition to fitting the dispersion, we compare the simulated relative intensities with those expected from theory. The intensities are first normalized to the incoming flux and then integrated along the energy transfer, which also removes the instrument-dependent energy broadening. The values from theory are normalized to the Mathematical equation point of the data, and the comparison is shown in Fig. 2[link] (right). The simulated data are seen to reproduce the theoretical values with excellent agreement.

4.2. The antiferromagnetic case

For the antiferromagnetic system, we simulate constant-q scans from the classical antiferromagnet MnF2. The Hamiltonian input parameters were taken from Okazaki et al. (1964View full citation) and Nikotin et al. (1969View full citation) and are listed in Table 2(b)[link].

The dispersion was simulated along four directions in reciprocal space, as illustrated in Fig. 3[link].

[Figure 3]
Figure 3
Map over scanned directions in reciprocal space for the antiferromagnetic case. Labels correspond to those in Fig. 5.

As in the ferromagnetic case, the centre of each constant-q scan intensity peak was found by fitting Gaussian line shapes to the data, as illustrated in Fig. 4[link]. Due to the instrumental resolution function, the shape of the intensity peaks varies between different values of q. A symmetric Gaussian function is used to fit most peaks. However, near the Brillouin zone centres, at the bottom of the dispersion, the resolution function makes the peaks highly asymmetric. For these scans, an approximate resolution convoluted gap function for TAS instruments [described by Lenander et al. (2026View full citation)] is used to fit the mode positions. In this function, it is assumed that the q resolution is coarse in two out of three directions, and at the gap, the dispersion follows a parabola, which are both valid in this setup. The function describes the asymmetric shape well; examples of the fits can be observed in Fig. 4[link] at low energies. Due to the extremely high energy resolution of the instrument and the assumption that the energy resolution is not correlated to the q resolution, the fitted mode positions are slightly underestimated (deviations less than 0.1 meV).

[Figure 4]
Figure 4
Examples of constant-q scans for the antiferromagnetic case (left) along (10l) and (right) along (h01). The solid lines show the fitted functions used to find the intensity peak centres and the dashed lines show the peak centres from theory.

The analytical expression for the dispersion given by equation (19) is fitted to the q dependence of the fitted peak positions. We fitted all four datasets at once, where only the interaction parameters j, ja, jc and D are allowed to vary. This gives us a direct comparison with the theoretical dispersion relation.

In Fig. 5[link] we perform this comparison by displaying the raw intensity data, the peak positions obtained from the constant-q fits, and the dispersion relations calculated from the fitted parameters and the original model parameters, respectively.

[Figure 5]
Figure 5
Simulated intensity data measured along four directions in q space. Points show fits to intensity peaks. The solid white line is the dispersion calculated from the fitted parameters and the dashed magenta line shows the dispersion calculated from the original model parameters.

The values of the fitted parameters are reported in Table 4[link], with the statistical uncertainties from the fits. The general agreement with the actual interaction values used as input to the component is excellent, with the largest deviation being only around 2.6% (for the small D parameter). This shows that our simulation method produces the correct dispersion and is self-consistent.

Table 4
Antiferromagnetic dispersion parameters obtained from a fit to constant-q scans, compared with the original values used in the simulations

Parameter Value from fit [meV] Input value to simulation [meV]
j 0.30372 (1) 0.304
ja 0.00800 (2) 0.008
jc −0.05713 (2) −0.056
D −0.02359 (1) −0.023

We will further validate the intensities simulated by the component used for the case of MnF2. This is done by recording the simulated differential cross section, obtained through equation (28), at several points on the dispersion curve. In the simulations, we directly recorded the incoming flux and the outgoing intensity by placing energy-sensitive monitors just before the sample and analyser in the TAS setup. The solid angle was calculated from known geometry parameters.

We compare these values with the results of spin wave theory through equation (33), as shown in Table 5[link]. The agreement is generally excellent. The largest relative deviation is around 12% for the very weak annihilation signal: Mathematical equation meV. The deviation is around 6% near the low-intensity ferromagnetic point (1, 0, 1). All other deviations are on the order of 2% or lower.

Table 5
Simulated (`sim') differential cross sections compared with results calculated from the analytic (`ana') expression at different points on the dispersion, defined by the point Mathematical equation and index of the simulated mode

Here Ψmon is the simulated flux at the monitor placed just before the sample, while Idet is the simulated intensity at the detector placed just before the analyser in the TAS setup.

h k l ω [meV] Mode B [T] Ψmon [cm−2 s−1] Idet [s−1] (dσ/dΩ)(sim) [cm−2] (dσ/dΩ)(ana) [cm−2]
1 0 0 1.06 0 0 Mathematical equation Mathematical equation Mathematical equation Mathematical equation
1 0 0 −1.06 0 0 Mathematical equation Mathematical equation Mathematical equation Mathematical equation
1 0 1 1.06 0 0 Mathematical equation Mathematical equation Mathematical equation Mathematical equation
1 0 0.5 6.73 0 0 Mathematical equation Mathematical equation Mathematical equation Mathematical equation
0.5 0 0.5 6.65 0 0 Mathematical equation Mathematical equation Mathematical equation Mathematical equation
2 0 0.3 5.48 0 0 Mathematical equation Mathematical equation Mathematical equation Mathematical equation
0.7 0 0.1 5.15 0 0 Mathematical equation Mathematical equation Mathematical equation Mathematical equation
1 0 0 1.29 0 2 Mathematical equation Mathematical equation Mathematical equation Mathematical equation
1 0 0 0.83 1 2 Mathematical equation Mathematical equation Mathematical equation Mathematical equation

The simulated intensities are also compared with a simulation of the dynamical correlation function performed using the MATLAB library SpinW (Toth & Lake, 2015View full citation). The datasets simulated along the (10l) direction were used for this. To compare the two simulated datasets, each was converted to quantities proportional to the inelastic cross section. The McStas intensities were normalized and integrated along the energy transfer, as was done for the ferromagnetic data.

The SpinW data were multiplied by the instrument-dependent factor Mathematical equation, and this was then normalized to the Mathematical equation point of the McStas data for comparison. The two datasets can be seen in Fig. 6[link], where we also show that our model is compatible with the SpinW simulation. An excellent agreement is found, demonstrating that the SpinWave_BCO component is able, within a constant scaling factor, to accurately reproduce results obtained by SpinW.

[Figure 6]
Figure 6
Comparison of integrated inelastic cross section between McStas, theory and SpinW. The theoretical model is shown to be compatible with the SpinW simulation. Data have been normalized to the Mathematical equation point.

The difference between the direct measurement of the differential cross section in Table 5[link] and the integrated cross section in Fig. 6[link] is a clear demonstration of the two distinctly different ways to integrate through reciprocal space: the differential cross section is an integration over Mathematical equation while keeping the scattering angle fixed, leading to the Jacobian, while Fig. 6[link] shows an integration over Mathematical equation, keeping Mathematical equation fixed, leading to data that are symmetric within a given Brillouin zone. As we demonstrate, these two equivalent methods both yield accurate results.

To further demonstrate the capabilities of the component, a simulation was performed with an applied magnetic field of Mathematical equation T. The data are shown in Fig. 7[link]. The two modes are split by the magnetic field, as expected. The magenta lines show the calculated spin wave mode dispersions, demonstrating that the simulated data again match well with theory. The area within the red outline was simulated using a q spacing six times smaller than the rest of the data. These data are shown integrated along the energy transfer on the right in Fig. 7[link]. This clearly illustrates how the splitting is not always resolved. In this case this is due to the orientation of the resolution ellipsoid, leading to a focusing and a defocusing branch of the dispersion relation remeasurements simulated on the triple-axis spectrometer (Shirane et al., 2002View full citation), which is also seen in Fig. 5[link]. This effect is important to consider, even for our high-resolution TAS.

[Figure 7]
Figure 7
Result of simulations made with an applied magnetic field of Mathematical equation T. (Left) The full Mathematical equation map showing all simulation data. (Right) A cut through these data at Mathematical equation meV and integrated along energy transfer with Mathematical equation meV (red dashed outline in the left panel).

5. Altermagnetism in MnF2

As an additional functionality, we have implemented a simple altermagnetic dispersion. Altermagnetism in MnF2 was suggested by Šmejkal et al. (2022View full citation). While previous searches for the altermagnetic splitting of the magnon modes in MnF2 were unsuccessful (Morano et al., 2025View full citation), a recent study revealed this splitting using polarized neutron scattering (Faure et al., 2025View full citation). In the latter study, the spin-wave spectrum was modelled using both altermagnetic exchange couplings and long-ranged dipolar couplings. We will use a simpler model, only including the altermagnetic couplings, to show how the SpinWave_BCO component can be used for this purpose.

The theory of exchange-driven altermagnetic spin waves in MnF2 is described by McClarty et al. (2025View full citation). The lowest-order exchange interactions which lead to altermagnetic ordering are those between Mn 2+ ions on the same sublattice at positions characterized by the vectors Mathematical equation and Mathematical equation, respectively. These coupling constants will be denoted j110 and Mathematical equation, respectively. Including these in the Hamiltonian and performing the same diagonalization procedure as for the antiferromagnetic case leads to the altermagnetic dispersion relation. First, the Fourier transform of the coupling constants within each sublattice reads

Mathematical equation

with Mathematical equation given by equation (12). Using the new Mathematical equation, the spin wave dispersion becomes

Mathematical equation

For Mathematical equation, this reduces to the known antiferromagnetic result. For Mathematical equation the two modes are split by the extra Mathematical equation-dependent term. This term is essentially added to the magnetic field, and just as the coherence factor is independent of the field, it is also independent of this term. Therefore, the intensity is essentially unchanged by the altermagnetic splitting. For this reason, we have implemented the altermagnetic splitting by simply modifying the dispersion relation according to equation (35). A simulation of the altermagnetic dispersion has been performed on the same TAS setup as used before.

To show the splitting, the values of j110 and Mathematical equation and the difference between them are made very large: Mathematical equation and Mathematical equation. The simulated spectrum can be seen in Fig. 8[link], where the theoretical dispersion relation has been plotted for comparison. The altermagnetic splitting is clearly seen in the data.

[Figure 8]
Figure 8
Simulated altermagnetic dispersion along (h,h+1,0). The dashed magenta lines show the theoretical dispersion relations for the split spin wave modes.

6. Discussion and conclusion

We have demonstrated the implementation of accurate magnetic dynamics in McStas with a new sample component SpinWave_BCO, which simulates inelastic neutron scattering from spin waves in a ferromagnet or a two-sublattice antiferromagnet in a body-centred orthorhombic crystal structure. In addition, we have implemented and tested an altermagnetic splitting of the antiferromagnetic spin wave dispersion.

The simulated dispersion relation and differential cross section are found from linear spin wave theory. Simulated data have been compared directly with theory and with the program SpinW to verify the McStas simulations. This was exemplified by simulating the antiferromagnetic spin wave spectrum of MnF2. However, since the magnetic form factor is not taken into account, the simulated intensities are reliable only at small values of |q|.

We find that the simulated dispersions and absolute intensities agree extremely well with linear spin wave theory, both for magnon creation and for annihilation. This has been tested for many different values of |q|.

While our present work is an important step towards the description of magnetic dynamics in McStas, much development work lies ahead in this direction. The feature of greatest relevance will surely be to expand the description of lattice geometries and interactions to be able to model all crystal classes and also accommodate spin waves from n-sublattice systems and spiral order, in analogy with SpinW (Toth & Lake, 2015View full citation). To promote the calculation of realistic intensities, it could be of relevance to include a library of the magnetic structure factors, Mathematical equation, for the most common magnetic ions. It would also be relevant to evaluate other possible sampling methods, such as a pre-compiled grid of solutions to the kinematic constraint (26). A very ambitious, but also relevant, update would be to include a full description of neutron polarization, which is generally accommodated in McStas (Knudsen et al., 2014View full citation) but the effect of which is not included in the SpinWave_BCO component.

Acknowledgements

We thank Rasmus Toft-Petersen for expressing the need for this spin wave component to be developed and Henrik M. Rønnow for suggesting to include the altermagnetic dispersion. Furthermore, we thank Amalie F. Davidsen and Frida B. Nielsen for useful discussions on inelastic scattering in McStas. We also thank Jakob Lass for supplying the SpinW simulations of MnF2 used to validate the McStas simulations. Finally, we thank Peter Willendrup and Mads Bertelsen for including the SpinWave_BCO component in the McStas component library.

Conflict of interest

The authors declare no conflicts of interest.

Data availability

All simulation files, simulated data and scripts for data analysis can be obtained from the authors upon reasonable request. The SpinWave_BCO component is included in the McStas component library, available from the homepage https://www.mcstas.org/.

Funding information

This project was supported by the Danish Committee for Research Infrastructure (NUFI) through funding to the `ESS-Lighthouse' Q-MAT.

References

Return to citationAndersen, K. H., Argyriou, D. N., Jackson, A. J., Houston, J., Henry, P. F., Deen, P. P., Toft-Petersen, R., Beran, P., Strobl, M., Arnold, T., Wacklin-Knecht, H., Tsapatsaris, N., Oksanen, E., Woracek, R., Schweika, W., Mannix, D., Hiess, A., Kennedy, S., Kirstein, O., Petersson Årsköld, S., Taylor, J., Hagen, M. E., Laszlo, G., Kanaki, K., Piscitelli, F., Khaplanov, A., Stefanescu, I., Kittelmann, Th., Pfeiffer, D., Hall-Wilton, R., Lopez, C. I., Aprigliano, G., Whitelegg, L., Moreira, F. Y., Olsson, M., Bordallo, H. N., Martín-Rodríguez, D., Schneider, H., Sharp, M., Hartl, M., Nagy, G., Ansell, S., Pullen, S., Vickery, A., Fedrigo, A., Mezei, F., Arai, M., Heenan, R. K., Halcrow, W., Turner, D., Raspino, D., Orszulik, A., Cooper, J., Webb, N., Galsworthy, P., Nightingale, J., Langridge, S., Elmer, J., Frielinghaus, H., Hanslik, R., Gussen, A., Jaksch, S., Engels, R., Kozielewski, T., Butterweck, S., Feygenson, M., Harbott, P., Poqué, A., Schwaab, A., Lieutenant, K., Violini, N., Voigt, J., Brückel, T., Koenen, M., Kämmerling, H., Babcock, E., Salhi, Z., Wischnewski, A., Heynen, A., Désert, S., Jestin, J., Porcher, F., Fabrèges, X., Fabrèges, G., Annighöfer, B., Klimko, S., Dupont, Th., Robillard, Th., Goukassov, A., Longeville, S., Alba-Simionesco, Ch., Bourges, P., Guyon Le Bouffy, J., Lavie, P., Rodrigues, S., Calzada, E., Lerche, M., Schillinger, B., Schmakat, P., Schulz, M., Seifert, M., Lohstroh, W., Petry, W., Neuhaus, J., Loaiza, L., Tartaglione, A., Glavic, A., Schütz, S., Stahn, J., Lehmann, E., Morgano, M., Schefer, J., Filges, U., Klauser, Ch., Niedermayer, Ch., Fenske, J., Nowak, G., Rouijaa, M., Siemers, D. J., Kiehn, R., Müller, M., Carlsen, H., Udby, L., Lefmann, K., Birk, J. O., Holm-Dahlin, S., Bertelsen, M., Hansen, U. B., Olsen, M. A., Christensen, M., Iversen, K., Christensen, N. B., Rønnow, H. M., Freeman, P. G., Hauback, B. C., Kolevatov, R., Llamas-Jansa, I., Orecchini, A., Sacchetti, F., Petrillo, C., Paciaroni, A., Tozzi, P., Zanatta, M., Luna, P., Herranz, I., del Moral, O. G., Huerta, M., Magán, M., Mosconi, M., Abad, E., Aguilar, J., Stepanyan, S., Bakedano, G., Vivanco, R., Bustinduy, I., Sordo, F., Martínez, J. L., Lechner, R. E., Villacorta, F. J., Šaroun, J., Lukáš, P., Markó, M., Zanetti, M., Bellissima, S., del Rosso, L., Masi, F., Bovo, C., Chowdhury, M., De Bonis, A., Di Fresco, L., Scatigno, C., Parker, S. F., Fernandez-Alonso, F., Colognesi, D., Senesi, R., Andreani, C., Gorini, G., Scionti, G. & Schreyer, A. (2020). Nucl. Instrum. Methods Phys. Res. A 957, 163402.  Web of Science CrossRef Google Scholar
Return to citationBoothroyd, A. T. (2020). Principles of Neutron Scattering from Condensed Matter. Oxford, New York: Oxford University Press.  Google Scholar
Return to citationChristensen, D. L. et al. (2026). J. Appl. Cryst. In preparation.  Google Scholar
Return to citationDavidsen, A. F., Nielsen, F. B., Krighaar, K. M. L., Wang, X., Avery, J. & Lefmann, K. (2026). J. Appl. Cryst. In preparation.  Google Scholar
Return to citationFaure, Q., Bounoua, D., BaléDent, V., Gukasov, A., Garlea, V. O., Ribeiro, A., Rau, J. G., Petit, S. & McClarty, P. (2025). arXiv, 2509.07087, https://arxiv.org/abs/2509.07087Google Scholar
Return to citationKnudsen, E. B., Tranum-Rømer, A., Willendrup, P. K., Christiansen, P. & Lefmann, K. (2014). J. Neutron Res. 17, 27–34.  CrossRef CAS Google Scholar
Return to citationLefmann, K. & Nielsen, K. (1999). Neutron News 10(3), 20–23.  CrossRef Google Scholar
Return to citationLefmann, K., Willendrup, P. K., Udby, L., Lebech, B., Mortensen, K., Birk, J. O., Klenø, K., Knudsen, E., Christiansen, P., Saroun, J., Kulda, J., Filges, U., Konnecke, M., Tregenna-Piggott, P., Peters, J., Lieutenant, K., Zsigmond, G., Bentley, P. & Farhi, E. (2008). J. Neutron Res. 16, 97–111.  CrossRef CAS Google Scholar
Return to citationLenander, E. Y., Schack, S. B., Lefmann, K. & Rønnow, H. M. (2026). J. Appl. Cryst. 59, 783–798.  CrossRef IUCr Journals Google Scholar
Return to citationLin, J. Y. Y., Islam, F., Sala, G., Lumsden, I., Smith, H., Doucet, M., Stone, M. B., Abernathy, D. L., Ehlers, G., Ankner, J. F. & Granroth, G. E. (2019). J. Phys. Commun. 3, 085005.  CrossRef Google Scholar
Return to citationLin, J. Y. Y., Smith, H. L., Granroth, G. E., Abernathy, D. L., Lumsden, M. D., Winn, B., Aczel, A. A., Aivazis, M. & Fultz, B. (2016). Nucl. Instrum. Methods Phys. Res. A 810, 86–99.  Web of Science CrossRef CAS Google Scholar
Return to citationMarshall, W. & Lovesey, S. W. (1971). Theory of Thermal Neutron Scattering. Oxford University Press.  Google Scholar
Return to citationMcClarty, P. A., Gukasov, A. & Rau, J. G. (2025). Phys. Rev. B 111, L060405.  Web of Science CrossRef Google Scholar
Return to citationMorano, W. C., Maesen, Z., Nikitin, S. E., Lass, J., Mazzone, D. G. & Zaharko, O. (2025). Phys. Rev. Lett. 134, 226702.  Web of Science CrossRef PubMed Google Scholar
Return to citationNikotin, O., Lindgård, P. A. & Dietrich, O. W. (1969). J. Phys. C Solid State Phys. 2, 1168–1173.  CrossRef CAS Web of Science Google Scholar
Return to citationOkazaki, A., Turberfield, K. & Stevenson, R. (1964). Phys. Lett. 8, 9–11.  CrossRef CAS Web of Science Google Scholar
Return to citationShirane, G., Shapiro, S. M. & Tranquada, J. M. (2002). Neutron Scattering with a Triple-Axis Spectrometer. Cambridge University Press.  Google Scholar
Return to citationŠmejkal, L., Sinova, J. & Jungwirth, T. (2022). Phys. Rev. X 12, 031042.  Google Scholar
Return to citationSquires, G. L. (1977). Introduction to the Theory of Thermal Neutron Scattering. Cambridge University Press.  Google Scholar
Return to citationToth, S. & Lake, B. (2015). J. Phys. Condens. Matter 27, 166002.  Web of Science CrossRef PubMed Google Scholar
Return to citationWillendrup, P., Filges, U., Keller, L., Farhi, E. & Lefmann, K. (2006). Physica B 385–386, 1032–1034.  Web of Science CrossRef CAS Google Scholar
Return to citationWillendrup, P. K. & Lefmann, K. (2020). J. Neutron Res. 22, 1–16.  Web of Science CrossRef Google Scholar
Return to citationWillendrup, P. K. & Lefmann, K. (2021). J. Neutron Res. 23, 7–27.  Web of Science CrossRef Google Scholar

This is an open-access article distributed under the terms of the Creative Commons Attribution (CC-BY) Licence, which permits unrestricted use, distribution, and reproduction in any medium, provided the original authors and source are cited.

Journal logoJOURNAL OF
APPLIED
CRYSTALLOGRAPHY
ISSN: 1600-5767
Follow J. Appl. Cryst.
Sign up for e-alerts
Follow J. Appl. Cryst. on Twitter
Follow us on facebook
Sign up for RSS feeds