Abstract
In this work, we report on modeling results obtained with our recently developed simulation tool enabling nanoscopic description of electronic processes in Xray irradiated ferromagnetic materials. With this tool, we have studied the response of Co/Pt multilayer system irradiated by an ultrafast extreme ultraviolet pulse at the Medge of Co (photon energy ~60 eV). It was previously investigated experimentally at the FERMI freeelectronlaser facility, using the magnetic smallangle Xray scattering technique. Our simulations show that the magnetic scattering signal from cobalt decreases on femtosecond timescales due to electronic excitation, relaxation, and transport processes both in the cobalt and in the platinum layers, following the trend observed in the experimental data. The confirmation of the predominant role of electronic processes for Xray induced demagnetization in the regime below the structural damage threshold is a step toward quantitative control and manipulation of Xray induced magnetic processes on femtosecond timescales.
Introduction
Xray and extreme ultraviolet (XUV) freeelectron lasers (FELs)^{1,2,3,4,5} enable investigation of Xray induced demagnetization within magnetic materials on femtosecond timescales. FELs generate intense, coherent pulses of femtosecond duration and tunable wavelength, which can rapidly induce strong electronic excitation in solid materials. Historically, since its discovery in 1996^{6}, ultrafast demagnetization on subpicosecond timescales was studied mostly with lasers working in the infrared wavelength regime^{7,8,9,10}. Xray FELs provide not only an opportunity to probe magnetic properties of solids on femtosecond timescales and at nanometer length scales but they also enable to study ultrafast demagnetization induced by photons of much higher energies than those accessible with optical lasers^{11,12,13,14,15,16}. This is possible with resonant Xray magnetic scattering^{17,18,19}. The energy of photons in the FEL beam is then tuned to an absorption edge of a ferromagnetic element. Transient magnetic properties of the system can be followed, taking advantage of Xray magnetic circular dichroism (XMCD) effect, for example, by performing a resonant magnetic smallangle Xray scattering (mSAXS) measurement^{20,21}. In particular, for samples characterized by a strong perpendicular magnetic anisotropy, the latter scheme gives access to Xray induced ultrafast changes within magnetic domains^{22,23}. Let us emphasize that in such experiments^{11,12,13} the Xray pulse serves both as a pump and as a probe, exciting the material and simultaneously probing the excited state with magnetic scattering.
The mSAXS measurement principle is the following (see, e.g., ref. ^{20}). The resonant coherent elastic scattering amplitude for a magnetic ion includes a contribution from charge and magnetic scattering^{17,18}. For an Xray beam (i) arriving perpendicularly to the surface of a magnetic sample (with magnetization vectors also perpendicular to the surface), and (ii) scattered into a ring of a radius reflecting the spatial correlation of magnetic domains (typically on 100 nm length scales, i.e., large in comparison with charge heterogeneity, ~10 nm), the overall scattering amplitude reduces to the magnetic contribution only^{17,20}. In the electric dipole approximation, it reads:
The vectors e and \({{{{\bf{e}}}}}^{\prime}\) are polarization vectors of the incoming and scattered radiation, m is the unit vector of the magnetization. The complex dipoletransition matrix element, F^{m1}, describes the resonant magnetic scattering strength^{19}. It depends, among others, on the difference between the incoming photon energy and the resonant energy, and on the actual material magnetization, M.
As the resonant magnetic scattering strength, F^{m1}, is proportional to the magnetization of the sample^{11,13}, any changes of the magnetization within magnetic domains will be reflected by the change of the scattering signal. This, in particular, implies that any demagnetization of the sample will cause a decrease of the magnetic signal.
Let us emphasize that the modeling tool able to follow transient changes of magnetization has to take into account radiation damage processes in the sample induced by Xray irradiation. The damage processes have, in general, two components: (i) electronic damage due to Xray induced excitation and collisional relaxation of electrons, and (ii) structural damage resulting in atomic displacements. In this work, we report on a nanoscopic modeling tool, XSPIN, exploring only electronic damage. This restricts the applicability of our model to Xray fluences below the structural damage threshold. However, this is the fluence regime of the strongest interest and applicational potential, as the demagnetization is then a reversible process and, after a certain time, the material recovers its equilibrium magnetization. If the structural damage fluence threshold is exceeded, the changes in the material become irreversible, and its magnetic properties can be ultimately lost^{13,16,20}.
With the XSPIN tool, we analyze the results of a recent experiment^{11} on resonant magnetic scattering with ultrashort XUV pulses (tuned to the Medge of cobalt) from Co/Pt multilayer system with perpendicular magnetic anisotropy^{24}. The experiment was performed at the FERMI FEL facility. In particular, we demonstrate that the processes of electronic excitation, relaxation and transport induced by XUV radiation predominantly affect the behavior of the transient magnetization and hence the scattered magnetic signal.
Results
Modeling of Xray induced processes in solid materials
The hybrid code XTANT^{25,26} (discussed in detail in the ”Methods” section) was the base for the code XSPIN, which we have constructed and use in this study to follow Xray induced magnetic transitions in solid materials.
The XTANT code includes all predominant processes occurring in a solid material as a result of Xray irradiation. It is a hybrid simulation approach combining various modeling techniques. It enables a treatment of large samples and highly excited electronic states (up to keV energy) which is not yet feasible with fully ab initio approaches such as, e.g., those presented in^{27,28}. The XSPIN code is an extension of XTANT, which treats spin degrees of freedom in electronic subsystem. The following paragraphs summarize the modeling framework of XSPIN.
First, we assume that the incoming Xray pulses are not intense enough to cause any atomic displacements in a magnetic material during the exposure. We neglect also eventual shifts of electronic levels due to high electron temperature. As the nuclei positions are fixed, we can use an ab initio density of states (DOS) obtained for the material in equilibrium. For XSPIN simulations, it was calculated with the VASP (Vienna Ab initio Simulation Package) code which enables such highprecision DFT calculations for various materials^{29,30,31,32}.
Second, in XSPIN we imply spin nondegeneracy to all electrons. Thus, each electron has its own spin, with two states: spinup and spindown. We exclude any spin precession, as it is negligible on the subpicosecond ( ~100 fs) timescales considered here. Consequently, the magnetic domains are static, and demagnetization only affects the magnitude of the magnetization in each individual domain. The spinup and spindown valence electrons are initially distributed in the 3d band according to the total magnetic momentum of the material under thermal equilibrium. This scheme is similar to that used in the StonerWolfarth model, describing a single magnetic domain^{33,34}.
Third, the code treats with different simulation techniques nonthermalized highenergy fraction (HEF) of electrons and thermally equilibrated lowenergy fraction (LEF) of electrons, the latter involving electrons with energies below some specified energy cutoff (here, 15 eV). The photoinduced and the subsequent electronic collisional processes involving the electrons within HEF are simulated with the classical Monte Carlo scheme adopted from the XTANT code^{25,26,35}. Figure 1 shows schematically the electronic processes considered, i.e., photoionization, impact ionization, and Auger decay. After an Xray pulse starts to interact with a solid material, electrons from spinup and spindown subsystems are released due to the photoabsorption process. The excitation probabilities take into account the actual electronic occupations in the respective bands. If the photon energy is sufficient to trigger an electronic excitation from a coreshell, a spinup or spindown electron can be excited from the shell. After the photoabsorption, the energetic photoelectron joins the nonthermalized highenergy electron fraction, preserving its spin state. During the sequence of the following impact ionization events, the electron continuously loses its energy and may ultimately fall into the spinup or the spindown subsystem of the thermalized lowenergy electron fraction – depending on its spin state. The HEF electrons may excite further electrons, with the same or an opposite spin. The probability of such excitation depends on the actual occupations of the spinup and spindown electron levels in the LEF and in the core shells.
Core holes relax via Auger decay. A band electron with the same spin fills the hole, while the Auger electron is chosen randomly, according to the actual distribution of spinup and spindown electrons. The cross sections for photoionizations are taken from the EPDL database^{36} and for impact and Auger ionizations from the EADL database^{37}. The core ionizaton potentials are taken from the Xray Data Booklet^{38}.
All low energy electrons from the LEF, both within spinup and spindown subsystems, are assumed to stay in a common local thermal equlibrium. Therefore, at each time step all the electrons are instantly thermalized to follow a FermiDirac distribution. Note that the intraband collisions leading to the thermalization in the entire lowenergy electronic subsystem must then also include spinflip collisions. In other words, the spin redistribution in our model occurs through thermal collisions. Let us emphasize that XSPIN does not trace the overall angular momentum of the system.
At each time step, the actual number of electrons and the actual electron energy stored in both spinup and spindown subsystems of the electronic LEF (\({N}_{{{{\rm{e}}}}}^{{{{\rm{low}}}}}\) and \({E}_{{{{\rm{e}}}}}^{{{{\rm{low}}}}}\) respectively) are followed. Knowing them, a common temperature, T_{e}, and a common chemical potential of electrons, μ, can be calculated by solving the equations:
similarly as it was done in the code XTANT, therein with spin degeneracy^{25}. The energy E_{i,σ} is the energy of the ith level for spin σ = ↑, ↓; \({E}_{\min ,\sigma }\) and \({E}_{\max ,\sigma }\) are the minimal and maximal (cut off) electronic energies in the band σ respectively, and k_{B} is the Boltzmann constant. The energy levels in the lowenergy electron fraction are determined from the total spinpolarized density of states D_{σ}(ϵ) for fcc Co, calculated with the code VASP. The energy E_{i,σ} of ith level for spinσ electrons is then calculated from the equation: \(i=\int\nolimits_{\infty }^{{E}_{i,\sigma }}d\epsilon \,{D}_{\sigma }(\epsilon )\). Also, the number of energy levels is determined by this equation. For example, for 64 atoms the number of electron levels between the bottom of dband and the cutoff energy of 15 eV is 481 for spinup electrons, and 474 for spindown electrons. Below we list further features of the XSPIN model.

(1)
We assume that the photons scattered due to the resonant magnetic scattering process do not induce further magnetic scattering. This assumption is justified by the very small cross section for the resonant magnetic scattering in comparison to the photoabsorption cross section^{39}.

(2)
We also assume that the Xray fluences applied do not cause a significant structural damage to the material during or shortly after the XUV pulse, i.e., on ~100 fs timescales. We give the justification below. A rigorous definition of structural damage threshold is difficult at the 100 fs timescale considered. The usual measure for a damage threshold in a metal is the threshold dose for its thermal melting. This dose for cobalt is estimated as 0.54 eV/atom. However, the thermal melting would require picosecond(s) to be completed. This time is needed for a transfer of a sufficient amount of energy from the electronic system to the lattice. At 100 fs timescale, we can only use this threshold dose as an indicator when structural modifications can start to play some role.
Therefore, in our model, we can assume that the atomic positions are fixed, i.e., the atoms do not change their positions during the simulations. This is because the timescale of atomic displacements during the structural transformation is then longer than the femtosecond pulse duration, see, e.g.,^{40,41,42}.We also neglect eventual shifts of electronic levels due to high electron temperature. These both assumptions guarantee a reasonable modeling accuracy even for the doses a few times higher than 0.54 eV/atom, on 100 fs timescales. However, at higher absorbed Xray doses or if the model should be applied at picosecond timescales (e.g., in order to follow the recovery of the magnetization), the possible atomic relocations should be taken into account. Such an extension of XSPIN is possible but it would require a significant modification of the anyway complex code, with much effort to be invested. Still, we plan this effort in future.

(3)
We assume that all band electrons (both from the spinup and from the spindown fractions) undergo instantaneous thermalization at each time step. The intraband collisions, which lead to the electron thermalization, also include spinflip collisional processes between spinup and spindown electrons (cf.^{43}). In such a way, the spinflip processes are implicitly included in our model. Electron–ion coupling is neglected here, due to ultrashort timescales considered.
Note that the assumption of the instantaneous electron thermalization limits the applicability of the XSPIN to model Xray irradiation with Xray pulses of duration longer than the timescale of electronic thermalization. We have performed dedicated simulations with the XCASCADE(3D) code^{44} to investigate the timescale of electron cascading process in Co and Pt, which is comparable to the timescale of electron thermalization. The calculations show that a photon of energy ~61.1 eV (as used in the experiment) creates on average 3.81 electrons in Co and 5.22 electrons in Pt within 0.2–0.4 fs, both through the excitations from valence band and from the uppermost core levels. This indicates that the XSPIN model should not be applied for subfemtosecond Xray pulses.

(4)
Interactions between magnetic domains in (X, Y) plane are not included, consistently with the StonerWolfarth model framework of a single magnetic domain^{33,34}, used here. Results from a simplistic model with periodic domains (not shown) indicate that the details on domain structure in (X, Y) plane should not significantly affect our results on 100 fs timescales.

(5)
Xray pulses from FERMI facility have a high degree of coherence, as documented in ref. ^{5}. Therefore, the total signal scattered from the multilayer sample is calculated as a coherent superposition of the contributions from individual layers.

(6)
For the XSPIN analysis, we used average fluence values estimated by the experiment^{11}. They were estimated, knowing the beam energy focused into a FWHM focal spot. We assumed that the spatial profile of Xray pulse in our simulations was flattop, with an average fluence. No volume integration of the signal in the (X, Y) plane was performed. For a meaningful volume integration, we would need much more precise information on the spatial pulse profile than provided by the experiment, in particular, the information on the pulse wings shape.

(7)
We included the effect of interlayer electron transport in our predictions. The significant role of electron transport in demagnetization processes was indicated in earlier works on diffusive spin currents, e.g.,^{9,45,46}. In the 100 fs time regime, considered in this work (with the XUV pulse of duration 70 fs, acting both as a pump and as a probe), only the start phase of the spin currents, i.e., the ballistic transport regime, can be treated. Treatment of longrange electron transport is not necessary because such transport does not have enough time to develop. We then only focus on fast collisional processes influencing the electron distribution within the magnetically sensitive regime of the 3d band. Xray photoabsorption processes cause the emission of electrons, both through direct photoionization as well as through the 3p Auger processes. These ballistic electrons can excite further electrons in collisional processes. The resulting electron cascades then spread in the material. In our multilayer sample, the cascade electrons can also enter the neighboring layers. As mentioned in (3), dedicated simulations with the XCASCADE(3D) code^{44} predicted that a photon of energy ~61.1 eV (used in the experiment) created on average 3.81 electrons in Co and 5.22 electrons in Pt within 0.2–0.4 fs, i.e., almost instantaneously, both through the excitations from valence band and from the uppermost core levels. The averaging has been performed over 30000 MonteCarlo cascade realizations. The electron ranges^{47}, i.e., the maximal distances traveled by electrons released in a single photoabsorption event until their energy decreased below ionization threshold, were 1.49 nm and 10.51 nm for Co and Pt respectively. This clearly indicates that interlayer electron transport cannot be neglected in our multilayer sample, where layer thicknesses are only: d_{Co} = 0.8 nm and d_{Pt} = 1.4 nm. After the electron cascading stops, modifications within the magnetically sensitive regime of 3d band through collisional ionization processes stop as well. Low energy electrons propagate further through the material in a diffusive transport. As the energy of these electrons is located within the magnetically sensitive regime of 3d band, their diffusive transport throughout the sample, followed by interactions with local 3d electrons, can further modify magnetic properties of the system. However, it occurs on much longer timescales, as indicated by earlier works on diffusive spin currents, e.g.,^{9,45,46}.
The interlayer electron transport was modeled in the following way in the XSPIN code. First, the number of additional electrons in each Co layer which arrived from other layers was estimated, knowing the distribution of the absorbed photons and the electron range in Co and Pt materials. Repeated calculations were then performed with XSPIN, assuming a higher (effective) Xray pulse fluence, such that would lead to the production of the increased number of electrons (including additional electrons originating from interlayer transport). The XSPIN results on the resonant magnetic scattering signal from a multilayer system tested in the experiment^{11}, shown later in the paper, were calculated, taking the interlayer electron transport into account.

(8)
XSPIN simulations were performed for the supercell containing 64 Co atoms. As we consider fluences low enough not to cause atomic relocations, such number of atoms is sufficient to get a statistically reliable results. This expectation was confirmed by the preceding convergence tests of our results in respect to the size of the supercell (not shown).

(9)
Accuracy of DOS calculations performed for Co/Pt multilayer system: In Fig. 2a and b, the comparison is shown between: (i) the density of states calculated for a 4atomiclayer Co structure and the density of states calculated for bulk Co, and (ii) between the partial density of states extracted for Co atoms from the CoPt multilayer structure (4 atomic layers of Co followed by 6 atomic layers of Pt) and the density of states calculated for bulk Co atoms. The presented results clearly indicate that there are no significant differences between the calculated density of states in all considered cases. In particular, the overlap between Co and Pt electronic orbitals is of minor importance. Moreover, the densities of state for the 4atom Co layer in the vacuum and for the bulk Co system look similar. Thus, the usage of the density of states obtained for bulk Co for the parametrization of lowenergy electronic levels in our code XSPIN seems well justified.
Now we will describe in detail how magnetic signal from Xray irradiated Co layer is constructed in XSPIN. Xray magnetic dichroism arises from a directional spin alignment and the spinorbit coupling, and results in different Xray absorption of left and right circularly polarized light at the absorption edges of ferromagnetic materials^{48}. The absorption spectra reflect the actual positions of electronic energy levels and the actual occupations of the resonant electronic states. Let us consider a magnetic scattering signal from an Xray irradiated Co layer. Incoming Xray photons of energy ℏω_{γ} can then excite electrons from the 3p band to the 3d band (Fig. 3). The region in the 3d band to which the electrons can be excited from the 3p band extends from ℏω_{0} − Δ to ℏω_{0} + Δ, where ℏω_{0} is the difference between the photon energy and the position of Medge:
with E_{edge} = 60 eV for Medge of Co. Here, 2 ⋅ Δ is the 3p band width, which determines the number of states probed in the 3d band. The magnetization is proportional to the disparity between electronic populations at the resonant states in spinup and spindown subsystems:
where \({N}_{\sigma }^{{{{\rm{hole}}}}}({E}_{i,\sigma })=1{N}_{{{{\rm{e}}}},\sigma }^{{{{\rm{low}}}}}({E}_{i,\sigma })\) denotes the number of empty states at E_{i,σ} level. The coefficient \({N}_{{{{\rm{e}}}},\sigma }^{{{{\rm{low}}}}}({E}_{i,\sigma })=\left\{1+\exp \right.{\{[({E}_{i,\sigma }\mu )/({k}_{{{{\rm{B}}}}}{T}_{{{{\rm{e}}}}})]\}}^{1}\) defines the electronic occupation of the level E_{i,σ} (assumed to be a FermiDirac occupation at all times).
The XSPIN code calculates transient changes of \({N}_{\sigma }^{{{{\rm{hole}}}}}({E}_{i,\sigma })\) in response to a specific Xray pulse for the probed energy levels within the Co 3d band (i.e., within the interval ± Δ around the probed level ℏω_{0}). The transient magnetization of the system can then be calculated from Eq. (4).
Figure 4 shows an example of a typical shape of the demagnetization curve, ∣M(t)∣^{2}, normalized to its initial value, ∣M(t = 0)∣^{2}, obtained for a single Co layer. The temporal shape of the Xray pulse was Gaussian, with the full width at half maximum (FWHM) of 70 fs. The pulse fluence was 13 mJ/cm^{2}, corresponding to the average absorbed dose in the material of 0.93 eV/atom. The assumed thickness of the Co layer was 0.8 nm, i.e., much less than the photon attenuation length in Co for ~60 eV photon. This ensured a uniform distribution of absorbed energy within the Co layer. The decrease of the ∣M(t)∣^{2} curve follows the increase of the number of excited electrons (i.e., the electrons with energy above the Fermi level) in the sample, also depicted in Fig. 4. When the electron cascading saturates, the value of ∣M(t)∣^{2} stabilizes, here within ~70 fs after the pulse maximum.
The transient intensity of the resonant magnetic scattering signal (per unit surface), I^{magn}(t), (cf.^{11,20,48}) is:
where I(t) is the incoming Xray intensity, and F^{magn}(t) is the instantaneous amplitude for the resonant magnetic scattering taken from Eq. (1). If we separate out the magnetization from the the dipoletransition matrix element in F^{magn}(t) (see, e.g.,^{48}), assuming that energy level shifts and stimulated emission processes are only of minor importance – which is the case here – the magnetic scattering signal can be rewritten as:
where M(t) is the transient magnetization. The timeintegrated intensity, I^{magn}(t), yields the experimental observable, magnetic scattering efficiency, S(F):
where F = ∫ dt I(t) is the pulse fluence. The proportionality factor, P, in Eq. (7) depends both on the material properties and on the Xray beam parameters (e.g., polarization)^{11}. However, it does not depend on the Xray pulse fluence.
The formalism presented above works only for the case when a single XUV pulse serves both as a pump and a probe, and the timeintegrated mSAXS signal is recorded. Simulation of measurements with separate pump and probe pulses (e.g.,^{49}) would require a dedicated treatment with a respective modification of the Eq. (7), taking into account the actual time delay between the probing time and the response of the magnetic system to the pump pulse (e.g.,^{50}).
Magnetic signal recorded in mSAXS experiments
Experiments investigating Xray induced demagnetization use multilayer systems in order to strengthen the overall magnetic scattering signal (which then becomes a sum of contributions from individual layers), and to tune the magnetic domain size, see, e.g.,^{23}. The multilayer systems are composed of ferromagnetic and paramagnetic materials, e.g., Co/Pt^{11,20,23} or Co/Pd^{12,15,16}. In multilayer samples of such composition, magnetic maze domains are formed, with magnetization perpendicular to the layer surface and alternating up and down^{11}. In an mSAXS experiment, coherent X rays arrive with normal incidence at the top layer of the multilayer system and propagate through it (Fig. 5a). Two processes can then occur: (i) photoabsorption, and (ii) coherent scattering including resonant magnetic scattering if the radiation is tuned to the absorption edge. Magnetically scattered photons are recorded at the CCD detector. They form a scattering ring which radius reflects the spatial correlation of magnetic domains, being twice the domain size, ζ = 2π/Q_{m} (Fig. 5b), where Q_{m} is the length of the scattering vector Q_{m}, \({Q}_{{{{\rm{m}}}}}=\frac{4{{{\rm{\pi }}}}}{\lambda }\sin \theta\), with λ being the wavelength of the incoming radiation, and 2 ⋅ θ being the scattering angle. The total intensity of the ring reflects timeintegrated scattering efficiency of magnetic domains^{9}.
Figure 6 shows schematically the multilayer system studied in the experiment by Kobs et al.^{11} for which we will later present the corresponding XSPIN predictions. The FEL beam was first impinging at normal incidence on the Si_{3}N_{4} membrane (not shown) and then entered the top platinum layer, Pt_{in}. The spatial correlation, ζ, of the maze domains in the Co layers was of the order of 180 nm (corresponding to the peak scattering vector Q_{m} = 0.036 nm^{−1}), and lead to a pronounced mSAXS signal. The experiment used incoming photons of energy ~61.1 eV. Pulse fluences on the top Pt layer, F_{Pt,in}, were between 0.3 and 45 mJ/cm^{2}. The temporal shape of the XUV pulse was Gaussian, with full width at half maximum (FWHM) of 70 fs.
Theory predictions for mSAXS signal
Our goal is now to validate the XSPIN model predictions. For this purpose, we used the already existing experimental data from the mSAXS experiment^{11} performed with photon energies tuned to the Co Medge, which used Co/Pt multilayers.
In order to describe the response of the multilayer system (Fig. 6) to Xray/XUV irradiation, one has to analyse propagation of the radiation through the system. Let us first note that any reflection on Co or Pt layers can be neglected as the reflectivity coefficients for Co and Pt layers at 61.1 eV photon energy are of the order of ~10^{−2}–10^{−3}. The change of incoming Xray intensity after passing through a layer of a material can then be expressed as:
where α_{phot} is the photoabsorption coefficient, equal to the inverse of the photon attenuation length^{47}. The solution of this BeerLamberttype equation is wellknown (see, e.g.,^{14,47}). According to it, Xray pulse intensity changes as:
after passing through a Co layer of a thickness d_{Co}, where λ_{att,Co} is the photon attenuation length in cobalt. In our multilayer system (Fig. 6), this implies a recursive relation between the Xray intensities in two consecutive Co layers: the nth layer and the (n + 1)th layer of the same thickness d_{Co} at a time instant t,
where λ_{att,Pt} is the photon attenuation length in platinum, and a_{Co(Pt)} are material attenuation coefficients in Co or Pt, defined as \({a}_{{{{\rm{Co}}}}({{{\rm{Pt}}}})}={e}^{{d}_{{{{\rm{Co}}}}({{{\rm{Pt}}}})}/{\lambda }_{{{{\rm{att,Co(Pt)}}}}}}\). For 61.1 eV photons, λ_{att,Co} ~ 9.20 nm and λ_{att,Pt} ~ 9.13 nm respectively. They are ~ 4 times shorter than the overall thickness of the multilayer system (40.8 nm), i.e., the pulse intensity attenuation has to be taken into account. The initial condition for Eq. (10) is: I_{1}(t) = I_{Pt,in}(t) ⋅ a_{Pt,in}. Here we neglected any intensity attenuation due to resonant magnetic scattering as the corresponding cross section is much smaller than the photoabsorption cross section^{39}.
The timeintegrated scattered signal emitted into the magnetic ring, Q_{m}, is then a coherent sum of contributions from different Co layers within the multilayer system:
where I_{n}(t) also contains attenuation coefficients (see Eq. (10)). It can be shown that the overall product of the attenuation coefficients in Eq. (11) is the same for each layer, i.e., the total signal sums the contributions from different layers with the same attenuation weight. Note also that Eq. (11) accounts for the fact that during the passage of 61.1 eV photons through Pt layers only photoabsorption processes and no resonant magnetic scattering occur. To justify the latter assumption, we checked that platinum has absorption edges at 54 eV and 66 eV. However, as Fig. 2b in ref. ^{21} shows, the contribution of Pt magnetic resonances to the overall resonant magnetic scattering signal from Co and Pt at 61.1 eV is subleading, when compared with the contribution of Co. To illustrate, platinum peak heights at 54 eV and 66 eV are ~0.12 and ~0.15 respectively, and Co peak height is ~0.75 at 61.1 eV, see Fig. 2b in ref. ^{21}. Therefore, in the framework of our model, we neglected Pt contribution to the resonant scattering signal at 61.1 eV.
Comparison of XSPIN predictions to experimental data
We have calculated the magnetic scattering signal numerically, using XSPIN results for timedependent magnetization obtained for various (attenuated) Xray fluences in each Co layer of the multilayer system. Interlayer electron transport was also taken into account (for details, see ”Further features of XSPIN model” section). In what follows, we will use a simplified notation: F ≡ F_{Pt,in} and S(F) ≡ S(F, Q_{m}). Figure 7 shows the result on the normalized magnetic scattering signal, defined as: S_{norm}(F) = S(F) ⋅ F_{0}/S(F_{0}), for Δ = 1.2 eV. This value of Δ corresponds to the half of the FWHM of the Co Medge peak (see ref. ^{21}).
Figure 7 shows the experimental data on S_{norm}(F) for Xray irradiated multilayer system, retrieved from ref. ^{11} (blue points), with an exponential fitting function, \({S}_{{{{\rm{norm}}}}}(F)=F\cdot \exp (d+c\cdot F)\) (orange dashed line), yielding the coefficients, c = −0.035 and d = −0.034 (cf.^{11}). The experimental data are compared to the theoretical prediction for S_{norm}(F) obtained with the XSPIN model (black solid line). The prediction takes the interlayer electron transport into account. Note that the calculation of S_{norm}(F) for the theoretical predictions involves the multiplication of the theoretical raw signal S(F) by the factor, F_{0}/S(F_{0}), similarly as it was done for the experimental data in^{11}. Therein, F_{0} ≈ 0.4 mJ/cm^{2}. The error bars plotted weight the theoretical results with the relative experimental error, calculated for the factor, F_{0}/S(F_{0}), from the experimental data. The calculation used specifically the experimental errorbars for the fluence, F_{0}, and for the normalized scattering efficiency, I_{eff} (^{11}; Fig. 2 therein). The error bars give an estimate for the uncertainty of the applied signal scaling. Note that the experimental data and theory predictions lay within the errorbars.
In the plot, we also show the S_{norm}(F) obtained, when assuming a constant magnetization of the sample at all times, i.e., M(t) = M(0). It starts to deviate from the normalized signal including demagnetization already for fluences of a few mJ/cm^{2}, indicating the onset of the demagnetization contribution. This observation is in agreement with the trend seen in the experimental data.
Generally, the limited range of fluences available for the actual experimental points (up to ~40 mJ/cm^{2}) and the large error bars do not allow us to accurately extrapolate the data towards higher fluences. For this purpose, an additional measurement of magnetic signal at higher fluence values would be helpful. However, one can expect that at very higher fluences, when structural damage strongly affects the sample, the magnetic scattering signal should ultimately disappear. Such behavior has been experimentally observed at high Xray fluences in ref. ^{13}.
In any case, it should be emphasized that the region of interest for potential practical applications of Xray induced demagnetization lies below the structural damage threshold. In this region, the demagnetization is a reversible process, i.e., the magnetization of the sample, after a certain recovery time needed for excited electrons to relax, recovers its equilibrium value. The material can then be demagnetized with X rays again. With this analysis, we have shown that electronic processes strongly influence magnetic properties of the sample in this regime. In particular, our XSPIN model that treats electronic damage processes was able to describe the actual experimental data^{11} with a good accuracy. The model can then be applied for predicting responses of various magnetic samples to Xray pulses. Such study would be a significant step towards understanding and controlling Xray induced femtosecond demagnetization in magnetic materials.
Discussion
With the theoretical model, XSPIN, we followed magnetic properties of Xray irradiated magnetic multilayer system. We have shown that the demagnetization of such system, induced by Xray pulses of fluences below the structural damage threshold, follows as a result of electronic damage processes. During the electronic relaxation, the occupations of magnetically sensitive levels in ferromagnetic Co transiently change, resulting in the ultrafast decrease of Co magnetization. Within tens of femtoseconds, the magnetization reaches an equilibrium value, which remains stable on hundred femtosecond timescale. When one increases the fluence of Xray pulse, the magnetization decreases to a lower final value. This is reflected by the decrease of the timeintegrated magnetic scattering signal with increasing Xray fluence. However, the timescale of the magnetization decrease is not affected by a change of pulse fluence.
Further, we have shown that a similar behavior of magnetic scattering efficiency can be observed for experimentally investigated multilayer systems. The electronic damage within the system layers is additionally influenced by pulse intensity attenuation and interlayer electron transport, which our model takes into account. Good agreement of our predictions with the data from the experiment by Kobs et al.^{11} (within the limits of experimental accuracy) confirms the fidelity of this physical picture. However, for ultimate model validation, it would be necessary to compare the XSPIN predictions on transient XUV induced magnetization to the respective timeresolved XUV experimental data, such as those obtained in^{6,9} for NIR induced demagnetization. An experiment performed for a single Co layer: (i) with magnetization aligned by an external magnetic field, (ii) then pumped with XUV rays, and (iii) probed with NIR pulses at varying time delays, would enable to collect such timeresolved data on magnetization which could then be compared to the XSPIN predictions. Such comparison would also require a significant extension of the XSPIN code, in order to take into account possible effects of longrange electron transport, as indicated in ref. ^{9}. This would be challenging, in particular, due to the large spatial scales involved in the transport modeling. They would make the simulation computationally expensive.
Up to our knowledge, the XSPIN model is the first model which couples a comprehensive quantitative description of Xray induced electronic damage processes in solids, checked by earlier comparisons of its predictions with several experimental results on nonmagnetic systems, with the description of transient magnetic processes in solids. An earlier theory model^{14} ascribed the decrease of the magnetic scattering signal (tuned to the Co L_{3} resonance) to the existence of a stimulated elastic scattering into the forward direction^{15}. This mechanism has not been confirmed by later experiments tuned to the Co M resonance^{11,12}.
Let us emphasize that the current model does not claim an immediate applicability for magnetic samples irradiated with infrared radiation. Different processes, acting on different timescales, can lead to demagnetization. In the Xray/XUV regime and at 100 fs timescales, the electronic damage seems the fastest process which can drive it. It changes the magnetic state of the sample on a femtosecond timescale before an onset of any other—slower—process which could otherwise demagnetize the material.
The predominant role of electronic damage for Xray induced demagnetization, confirmed by our theoretical study, opens a promising prospect for ultrafast demagnetization control. We can now predict with XSPIN how to affect the magnitude and timescale of the demagnetization by adjusting Xray pulse parameters (wavelength, pulse duration, and fluence), as well as by the choice of a magnetic material. Further experimental studies, supported by theory predictions with XSPIN, can then be performed, investigating the possible options for the control of demagnetization. This is a step toward prospective technological applications, e.g., XUV/Xray lightcontrolled nanoscopic magnetic switches, operating on femtosecond timescales.
Methods
Modeling interaction of X rays with solid materials, using the code XTANT
Modeling radiation damage in nanoscopic samples and solid materials has been performed for several years with various simulation techniques, e.g.,^{25,51,52,53}. One of the tools is the hybrid code XTANT (Xrayinduced Thermal And Nonthermal Transitions)^{25,26,35,54}. Using periodic boundary conditions, the XTANT can simulate evolution of Xray irradiated bulk materials. The code consists of a few modules dedicated to simulate various processes induced by the incoming Xray FEL radiation:

(a)
The core of the XTANT model is a band structure module (in refs. ^{25,26,35,54} based on transferable tight binding Hamiltonian, in ref. ^{55} replaced by the DFTB+ code^{56}), which calculates the transient electronic band structure of thermalized LEF electrons and the atomic potential energy surface. The latter also evolves in time, depending on the positions of atoms in the simulation box, and is used to calculate the actual forces acting on nuclei.

(b)
After the forces act on atoms, the atoms move. Their actual positions are propagated in time, using a classical molecular dynamics (MD) scheme. It solves Newton equations for nuclei, with the potential energy surface evaluated from the band structure module.

(c)
Electron occupation numbers, distributed on the transient energy levels, are assumed to follow FermiDirac distribution with a transient temperature and chemical potential evolving in time. The electron temperature changes due to the interaction of band electrons with Xrays and highenergy electrons; or due to their nonadiabatic interaction with nuclei (through electron–ion scattering^{54}).

(d)
Nonequilibrium fraction of electrons at high energies (HEF) and Auger decays of core holes are treated with a classical eventbyevent Monte Carlo (MC) simulation. It stochastically models Xray induced photoelectron emission from deep shells or from the valence band, the Auger decays, and the scattering of highenergy electrons. In the code, at each time step an intrinsic averaging over 30000 different Monte Carlo realizations of electron (and core hole) trajectories is performed, in order to calculate the average electronic distribution which is then applied at the next time step.

(e)
Electron–ion energy exchange is calculated, using a nonadiabatic approach^{54}. This energy is transferred to atoms by the respective velocity scaling at each MD step.
XTANT’s hybrid approach enables computationally inexpensive simulations of relatively large supercells (containing up to 1000 atoms). The code treats all predominant excitation and relaxation processes within an Xray FEL irradiated sample, including its nonequilibrium evolution stage, thermal and nonthermal processes, and structural transformations^{57}. In particular, all Xray induced processes exciting electrons are taken into account in the model. Ballistic electrons are considered as high energy electrons. In the bulk material, they propagate with the restriction of periodic boundaries.
Data availability
The data that support the findings of this study are available from the corresponding authors upon reasonable request.
Code availability
The XSPIN code that supports the conclusions within this paper and other findings of this study is available under a license agreement. The licensor is Deutsches ElektronenSynchrotron DESY, Notkestr. 85, 22607 Hamburg, Germany. Please contact the corresponding authors for more details.
References
Ackermann, W. et al. Operation of a freeelectron laser from the extreme ultraviolet to the water window. Nat. Photonics 1, 336–342 (2007).
Emma, P. et al. First lasing and operation of an ångstromwavelength freeelectron laser. Nat. Photonics 4, 641–647 (2010).
Pile, D. First light from SACLA. Nat. Photonics 5, 456–457 (2011).
Allaria, E. et al. Highly coherent and stable pulses from the FERMI seeded freeelectron laser in the extreme ultraviolet. Nat. Photonics 6, 699–704 (2012).
Capotondi, F. et al. Invited article: coherent imaging using seeded freeelectron laser pulses with variable polarization: First results and research opportunities. Rev. Sci. Instrum. 84, 051301 (2013).
Beaurepaire, E., Merle, J.C., Daunois, A. & Bigot, J.Y. Ultrafast spin dynamics in ferromagnetic nickel. Phys. Rev. Lett. 76, 4250–4253 (1996).
Kirilyuk, A., Kimel, A. V. & Rasing, T. Ultrafast optical manipulation of magnetic order. Rev. Mod. Phys. 82, 2731–2784 (2010).
Koopmans, B. et al. Explaining the paradoxical diversity of ultrafast laserinduced demagnetization. Nat. Mater. 9, 259–265 (2010).
Pfau, B. et al. Ultrafast optical demagnetization manipulates nanoscale spin structure in domain walls. Nat. Commun. 3, 1100 (2012).
Sander, D. et al. The 2017 magnetism roadmap. J. Phys. D: Appl. Phys. 50, 363001 (2017).
PhilippiKobs, A. et al. Ultrafast demagnetization excited by extreme ultraviolet light from a freeelectron laser (2021). Preprint at https://www.researchsquare.com/article/rs955056/v1.
Schneider, M. et al. Ultrafast demagnetization dominates fluence dependence of magnetic scattering at Co M edges. Phys. Rev. Lett. 125, 127201 (2020).
Mueller, L. et al. Breakdown of the xray resonant magnetic scattering signal during intense pulses of extreme ultraviolet freeelectronlaser radiation. Phys. Rev. Lett. 110, 234801 (2013).
Stöhr, J. & Scherz, A. Creation of xray transparency of matter by stimulated elastic forward scattering. Phys. Rev. Lett. 115, 107402 (2015).
Wu, B. et al. Elimination of xray diffraction through stimulated xray transmission. Phys. Rev. Lett. 117, 027401 (2016).
Wang, T. et al. Femtosecond singleshot imaging of nanoscale ferromagnetic order in Co/Pd multilayers using resonant xray holography. Phys. Rev. Lett. 108, 267403 (2012).
Hannon, J. P., Trammell, G. T., Blume, M. & Gibbs, D. Xray resonance exchange scattering. Phys. Rev. Lett. 61, 1245–1248 (1988).
Hill, J. P. & McMorrow, D. F. Xray resonant exchange scattering: polarization dependence and correlation functions. Acta Cryst. A52, 236–244 (1996).
Brueckel, T. Atomic and magnetic structures in crystalline materials: neutron and xray scattering. Schr. Forschungszent. Juelich, Mater. Mater. 34, D1/1–D1/47 (2007).
Gutt, C. et al. Singlepulse resonant magnetic scattering using a soft xray freeelectron laser. Phys. Rev. B 81, 100401 (2010).
Willems, F. et al. Multicolor imaging of magnetic Co/Pt heterostructures. Str. Dyn. 4, 014301 (2017).
Riepp, M. et al. Ultrafast magnetisation dynamics at the lowfluence limit supported by external magnetic fields. In 39th Free Electron Laser Conference (FEL’19), Hamburg, Germany, 2630 August 2019, 574577 (JACOW Publishing, Geneva, Switzerland, 2019).
Bran, C. Domain structure and magnetization processes of complex magnetic multilayers. PhD Thesis, Technical Univ. Dresden. https://dnb.info/1009523279/34 (2010).
Hellwig, O., Berger, A., Kortright, J. & Fullerton, E. Domain structure and magnetization reversal of antiferromagnetically coupled perpendicular anisotropy films. J. Magn. Magn. Mater. 319, 13–55 (2007).
Medvedev, N., Jeschke, H. O. & Ziaja, B. Nonthermal phase transitions in semiconductors induced by a femtosecond extreme ultraviolet laser pulse. N. J. Phys. 15, 015016 (2013).
Medvedev, N., Tkachenko, V., Lipp, V., Li, Z. & Ziaja, B. Various damage mechanisms in carbon and silicon materials under femtosecond xray irradiation. 4open 1, 3 (2018).
Werner, P., Eckstein, M., Mueller, M. & Refael, G. Lightinduced symmetry breaking in the Hubbard model. Nat. Commun. 10, 5556 (2019).
Sandholzer, K. et al. Quantum simulation meets nonequilibrium dynamical meanfield theory: exploring the periodically driven, strongly correlated FermiHubbard model. Phys. Rev. Lett. 123, 193602 (2019).
VASP. The Vienna ab initio simulation package: Atomic scale materials modelling from first principles (2022). https://www.vasp.at.
Kresse, G. & Hafner, J. Ab initio moleculardynamics simulation of the liquidmetal–amorphoussemiconductor transition in germanium. Phys. Rev. B 49, 14251–14269 (1994).
Kresse, G. & Furthmüller, J. Efficient iterative schemes for ab initio totalenergy calculations using a planewave basis set. Phys. Rev. B 54, 11169–11186 (1996).
Kresse, G. & Joubert, D. From ultrasoft pseudopotentials to the projector augmentedwave method. Phys. Rev. B 59, 1758–1775 (1999).
Stoner, E. C. & Wohlfarth, E. P. A mechanism of magnetic hysteresis in hereogeneous alloys. Philos. Trans. R. Soc. Lond. A 240, 599–642 (1948).
Tannous, C. & Gieraltowski, J. The StonerWohlfarth model of ferromagnetism. Eur. J. Phys. 29, 475–487 (2008).
Medvedev, N. & Ziaja, B. Multistep transition of diamond to warm dense matter state revealed by femtosecond xray diffraction. Sci. Rep. 8, 5284 (2018).
Cullen, D. E., Hubbell, J. H. & Kissel, L.EPDL97: the evaluated photo data library ’97 version (UCRLLR50400 Vol. 6 Rev. 5; Lawrence Livermore National Lab., 1997). https://doi.org/10.2172/295438.
Perkins, S. T. et al. Tables and graphs of atomic subshell and relaxation data derived from the LLNL Evaluated Atomic Data Library (EADL), Z = 1 − 100 (UCRL50400Vol.30; Lawrence Livermore National Lab., 1991). https://doi.org/10.2172/10121422.
Thompson, A. et al. Xray Data Booklet 3rd edn (Lawrence Berkeley National Laboratory, University of California, 2009).
Son, S.K., Young, L. & Santra, R. Impact of hollowatom formation on coherent xray scattering at high intensity. Phys. Rev. A 83, 033402 (2011).
Tavella, F. et al. Soft xray induced femtosecond solidtosolid phase transition. High. Energy Density Phys. 24, 22–27 (2017).
Inoue, I. et al. Atomicscale visualization of ultrafast bond breaking in Xrayexcited diamond. Phys. Rev. Lett. 126, 117403 (2021).
Tkachenko, V. et al. Limitations of structural insight into ultrafast melting of solid materials with xray diffraction imaging. Appl. Sci. 11, 5157 (2021).
Carva, K., Battiato, M. & Oppeneer, P. M. Ab initio investigation of the ElliottYafet electronphonon mechanism in laserinduced ultrafast demagnetization. Phys. Rev. Lett. 107, 207201 (2011).
Lipp, V., Medvedev, N. & Ziaja, B. Classical MonteCarlo simulations of xray induced electron cascades in various materials. Proc. SPIE 10239, 102360H (2017).
Battiato, M., Carva, K. & Oppeneer, P. M. Superdiffusive spin transport as a mechanism of ultrafast demagnetization. Phys. Rev. Lett. 105, 027203 (2010).
Battiato, M., Carva, K. & Oppeneer, P. M. Theory of laserinduced ultrafast superdiffusive spin transport in layered heterostructures. Phys. Rev. B 86, 024404 (2012).
Follath, R. et al. Xray induced damage of B_{4}Ccoated multilayer materials under various irradiation geometries. Sci. Rep. 9, 2029 (2019).
Stöhr, J. & Siegmann, H. C. Magnetism: From Fundamentals to Nanoscale Dynamics (Springer Series in SolidState Sciences vol. 152, Springer, 2006).
Hennes, M. et al. Timeresolved XUV absorption spectroscopy and magnetic circular dichroism at the Ni M_{2,3}edges. Appl. Sci. 11, 325 (2021).
Carva, K., Legut, D. & Oppeneer, P. M. Influence of laserexcited electron distributions on the xray magnetic circular dichroism spectra: Implications for femtosecond demagnetization in Ni. EPL 86, 57002 (2009).
Murphy, B. et al. Femtosecond xrayinduced explosion of C_{60} at extreme intensity. Nat. Commun. 5, 4281 (2014).
Ho, P. J. et al. The role of transient resonances for ultrafast imaging of single sucrose nanoclusters. Nat. Commun. 11, 167 (2020).
Beyerlein, K. R. et al. Ultrafast nonthermal heating of water initiated by an xray freeelectron laser. Proc. Natl Acad. Sci. USA 115, 5652–5657 (2018).
Medvedev, N., Li, Z., Tkachenko, V. & Ziaja, B. Electronion coupling in semiconductors beyond Fermi’s golden rule. Phys. Rev. B 95, 014309 (2017).
Lipp, V. et al. Density functional tight binding approach utilized to study xrayinduced transitions in solid materials. Sci. Rep. 12, 1551 (2022).
Hourahine, B. et al. DFTB+, a software package for efficient approximate density functional theory based atomistic simulations. J. Chem. Phys. 152, 124101 (2020).
Medvedev, N., Jeschke, H. & Ziaja, B. Nonthermal graphitization of diamond induced by a femtosecond xray laser pulse. Phys. Rev. B 88, 224304 (2013).
Acknowledgements
We thank Christian Gutt, Dmitriy Ksenzov, Vladimir Lipp, and Jan Luening for helpful discussions. V.T., A.L., S.M., B.Z. acknowledge the funding received from the Collaboration Grant of the European XFEL and the Institute of Nuclear Physics, Polish Academy of Sciences. K.J.K. thanks the Polish National Agency for Academic Exchange for funding in the frame of the Bekker programme (PPN/BEK/2020/1/00184). K.J.K. acknowledges also the CFELDESY Theory group for the hospitality during his sixmonth research stay in Hamburg in 2019–2020 financed by the National Science Centre (Poland) under the program SONATINA 1 no. 2017/24/C/ST3/00276. L.M. and A.P.K. acknowledge funding by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)  SFB925  project 170620586.
Funding
Open Access funding enabled and organized by Projekt DEAL.
Author information
Authors and Affiliations
Contributions
B.Z., A.L., and S.M. initiated this project; Further studies were led with the contributions of all authors; K.J.K. and V.T. performed the XTANT code extension to XSPIN—in interactive discussion with B.Z., A.P.K., L.M., F.C.—and performed all calculations. All authors critically discussed the results and contributed to the manuscript, which initial version was written by K.J.K. and V.T.; K.J.K. and V.T. contributed equally to this work.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Kapcia, K.J., Tkachenko, V., Capotondi, F. et al. Modeling of ultrafast Xray induced magnetization dynamics in magnetic multilayer systems. npj Comput Mater 8, 212 (2022). https://doi.org/10.1038/s41524022008954
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41524022008954