X-ray diffraction analysis of matter taking into account the second harmonic in the scattering of powerful ultrashort pulses of an electromagnetic field

It is well known that the scattering of ultrashort pulses (USPs) of an electromagnetic field in the X-ray frequency range can be used in diffraction analysis. When such USPs are scattered by various polyatomic objects, a diffraction pattern appears from which the structure of the object can be determined. Today, there is a technical possibility of creating powerful USP sources and the analysis of the scattering spectra of such pulses is a high-precision instrument for studying the structure of matter. As a rule, such scattering occurs at a frequency close to the carrier frequency of the incident USP. In this work, it is shown that for high-power USPs, where the magnetic component of USPs cannot be neglected, scattering at the second harmonic appears. The scattering of USPs by the second harmonic has a characteristic diffraction pattern which can be used to judge the structure of the scattering object; combining the scattering spectra at the first and second harmonics therefore greatly enhances the diffraction analysis of matter. Scattering spectra at the first and second harmonics are shown for various polyatomic objects: examples considered are 2D and 3D materials such as graphene, carbon nanotubes, and hybrid structures consisting of nanotubes. The theory developed in this work can be applied to various multivolume objects and is quite simple for X-ray structural analysis, because it is based on analytical expressions.

X-ray diffraction (XRD) analysis of matter, as well as X-ray crystallography (XRC) are the most powerful methods for determining the structure of matter [1][2][3][4][5] . Most crystal structures and many molecules were discovered by these methods. They underlie many modern discoveries in the fields of physics, chemistry, biology, medicine and crystallography, e.g. 2,[6][7][8][9][10] . Currently, these basic methods of X-ray structural analysis are supplemented and expanded in connection with the creation of new types of radiation sources, small sizes of objects under study, etc. As a result, separate directions in X-ray structural analysis appear, for example, grazing-incidence small-angle scattering (GISAS), transmission small-angle scattering (SAS), grazing-incidence diffraction (GID), diffuse reflectometry (DR), single crystal monochromatic diffraction (SXD), powder diffraction (EDX, ADX), fiber diffraction (FD) and others 2,3,5,11,12 . The theoretical basis of these methods has been understood for some time 1,3 ; their physical interpretation is based on X-ray diffraction from various polyatomic structures. By analyzing the diffraction pattern, the structure of the substance can be judged. Usually, the theory of X-ray diffraction by various periodic and complex structures is described as the scattering of plane waves of infinite duration in time 1,3 . However, the processes of scattering of high-power ultrashort pulses (USPs) with femto-and especially attosecond time resolution by structures of this kind have been little studied so far. Moreover, at present, powerful USP sources are being introduced, for example, the European X-ray Free Electron Laser (XFEL), the Linear Accelerator of a Coherent Light Source (LCLS), and the Free Electron laser Radiation for Multidisciplinary Investigations (FERMI), all of which now enable this kind of research to be carried out.
In the last two decades, the generation of isolated attosecond pulses through high harmonic generation has provided a powerful tool for studying many important physical processes on the attosecond timescale 13 . Indeed, there is a tendency towards an increase in the power of USPs of an electromagnetic field and a reduction in their duration [14][15][16] . Research is actively being carried out, the technique of X-ray free electron lasers (e.g. XFEL) is www.nature.com/scientificreports/ being improved 16 , and a subfemtosecond barrier with a high peak power has also been achieved, which makes it possible to study excitation in a molecular system, and the motion of valence electrons with high temporal and spatial resolution 17 . Studies of the structure and composition of nanosystems and biomolecules using USP scattering are possible for systems in both stationary and nonstationary states. Nonstationary objects can be studied only with the use of USPs, since the characteristic time in such systems is less than, or comparable to, the femtosecond timescale. Such processes can be the formation and rearrangement of chemical bonds, intra-atomic and molecular processes, etc. [18][19][20][21][22] . For example, the use of nanosystems in various devices is primarily associated with the charge transfer process, i.e. on changes in states over time 18 . It is for this reason that considerable interest is shown in real-time observations of electron dynamic processes.
The theoretical basis for carrying out this kind of research is rather poorly developed and often does not take into account the aspects of scattered USPs 14,16,[23][24][25][26][27][28] , which is why theoretical studies of the aspects of USPs in their scattering by various polyatomic systems are currently being carried out. In spite of this, the magnetic component of such USPs is usually not taken into account. Indeed, it is well known that the force acting on a charged particle from the magnetic component of the electromagnetic field is approximately c = 137 (au) times less than its electrical component. However, when considering some phenomena, its contribution is very significant and neglecting it can lead to a misunderstanding of certain processes. For example, in 29 , when considering tunneling ionization in a strong field regime, its contribution was found to be very significant. In 30 , taking into account the magnetic component of USPs led to the possibility of detecting the orientation of molecular anions in space; and in 28 , it was also shown that the magnetic component must be taken into account in the scattering of USPs by various polyatomic systems.
It was found that taking into account the magnetic component of a USP leads to the appearance of the second harmonic. A joint analysis of the spectra of USP scattering at the fundamental and second harmonics provides more information about the object under study. Objects such as graphene, carbon nanotubes (CNTs), and a hybrid structure consisting of CNTs are considered as examples. We will use the atomic system of units where = 1, |e| = 1, m e = 1.

Theoretical basis
Consider an arbitrary polyatomic system on which a USP is falling in the direction n 0 . The duration of such a pulse will be assumed to be much less than the characteristic atomic time τ a ∼ 1 , i.e. τ τ a ≪ 1 . This will allow us to use the sudden disturbance approximation, in which the intrinsic Hamiltonian of the system can be neglected, since the electron in the atom does not have time to evolve under the action of the atomic field 26 . It should be added that the condition τ τ a ≪ 1 for using our approximation is not strict, and it is sufficient to assume, as shown in 26 , that ω 0 τ a ≫ 1 , where ω 0 is the carrier frequency of the falling USP. Obviously, the condition ω 0 τ a ≫ 1 is satisfied for X-ray frequencies. Let us consider the intensity of the electromagnetic field of a USP in a general form, i.e. it will be assumed to depend on coordinates and time E(r, t) . We are interested in electromagnetic fields that are not strong enough to allow for relativistic effects. As obtained in 28 (see also 26,27 ), taking these approximations into account, the probability W of a photon being created of a given frequency ω per unit solid angle k with a simultaneous transition of a polyatomic system from the main state to all possible final states (hereinafter, the scattering spectrum of USPs) is determined: where S(ω, n, n 0 ) = G(ω, n, n 0 ) − F(ω, n, n 0 ) , N a is the total number of atoms in the system, N e is the number of the electrons in an atom, c is the speed of light, n is the direction of the created photon emission, G(ω, n, n 0 ) and F(ω, n, n 0 ) are the mean values expressed in terms of electron density ρ(r) in the form: Also in Eq. (2), δ N (p) is a factor that completely determines the geometric arrangement of atoms in the target, which is calculated in a general form as: Summation in Eq. (3) is carried out over all atoms of the considered system. We will use the electronic density ρ(r) of the Dirac-Hartree-Fock-Slater model, in which ρ(r) = N e 4πr 3 i=1 A i α 2 i e −α i r , where A i , α i are the tabular coefficients that determine the electron density in an atom 31 . Using this model, we can find expressions for G(ω, n, n 0 ) and F(ω, n, n 0 ) in an analytical form. As a result, we obtain 28 N a N e S(ω, n, n 0 ) + δ N (p)N 2 e F(ω, n, n 0 ) , www.nature.com/scientificreports/ where p = ω c (n − n 0 ) = k − k 0 has the meaning of a recoil pulse in the scattering of a U S P, d e t e r m i n e d : is a unit vector along USP, γ is the spectral width parameter, ω 0 is the carrier frequency, i.e.v(x, γ , ω 0 ) sets the form of the USP. Further, for complete definiteness of the scattering spectrum, we define the functions F 1 (ω) and F 2 (ω) . For this, we will consider a USP of the Gaussian form: In Eq. (5), k 0 = n 0 ω 0 c , and the pulse duration is τ = 1/γ , where γ is a damping parameter in a Gaussian pulse. We will assume that the USP is multi-cycle, i.e. ω 0 γ ≫ 1 . In such a high-cycle case, the condition ∞ −∞ E(r, t)dt = 0 will be met. It is usually used in the case of laser light sources. It should be added that the choice of USP in the form of Eq. (5) is not strictly fixed in our theory. The pulse selection can be arbitrary depending on the USP source. The Gaussian pulse is chosen as one of the best known for describing the USP. For example, in 32 , an exact description of a subcycle pulsed beam (SCPB) was found, where, in the case considered in this paper ( ω 0 γ ≫ 1 ), the solution has the form of a Gaussian pulse. Further, by taking into account only those terms that will make a significant contribution to the scattering, we obtain: Also, we define the value f (r a,e ) , which contains information about the USP field [see Eqs. (1) and (2)] as: From Eqs. (6) and (7) it can be seen that the contribution to the magnetic component is determined by the factor F 2 . This factor becomes significant only with high-power USPs, which can be seen from Eq. (7). In this case, taking into account the magnetic component will lead to the appearance of the second harmonic, which is clearly seen from the second function in Eq. (6). The line width at the fundamental and second harmonic is determined by the parameter γ . It should be added that the magnetic component in the scattering of USPs is usually not considered in diffraction analysis, on the basis that its contribution is too small. In fact, if high-power USPs are used, the contribution of the magnetic component can be significant and even comparable with the contribution of the fundamental harmonic. Let us estimate at what power of USP the magnetic component can already be taken into account. In the atomic units in Eq. (7), we can assume that r a,e ∼ 1 . As a result, we must . These relations show the magnitude of the magnetic component contribution of the of the USP during its scattering. Modern USP sources can generate radiation intensities I = cE 2 0 /8π ≈ 10 22 W/cm 2 and even greater (e.g. 3 ), which correspond to E 0 ≈ 10 12 V /cm and above. In atomic units, these correspond to E 0 ∼ 10 3 and above (the atomic unit of field strength E a = 5.14 × 10 9 V/cm ).
In this case, it is seen that for E 0 ∼ 10 3 , the parameter E 0 137 2 may be significant E 0 137 2 ∼ 1/10 and even greater than this value for E 0 > 10 3 . Consider the second , which differs from the first factor ω 0 c . This parameter can be even larger than the first when ω 0 c > 1 and make a greater contribution. In other words, the magnetic component of USPs can be significant for powerful USP sources. From Eq. (1) it can be seen that the diffraction pattern is determined mainly by the expression δ N (p)F(ω, n, n 0 ) , which is obvious since the factor δ N (p) determines the geometric arrangement of atoms in the target. It is also seen from Eqs. (1) and (3) that in the case of a polyatomic system, the main part in the scattering spectrum is introduced by the last term in Eq. (1), since the maximum value δ max N (p) = N 2 a . At present, it is technically possible to conduct research not only on polyatomic systems, but also on systems where the number of atoms is not large. In this case, we must take into account not only the last term in Eq. (1), but also all the terms in full. In general, Eq. (1) contains both incoherent and coherent parts of the spectrum. In other words, the scattering spectrum can be ∝ N e N a for the incoherent part of the spectrum. This case corresponds to scattering of USP by atomic electrons independently of each other. In the case of the coherent part, the scattering spectrum ∝ N 2 e N 2 a . This case corresponds to the scattering of the USP by atomic electrons together.

Diffraction analysis taking into account the magnetic component of the USP
In this section, using specific examples, we show the effect of the magnetic component of USPs on the scattering spectra. By taking into account the magnetic component of the USP, we also show that the diffraction pattern provides enough information to enable the use of the second harmonic for the diffraction analysis of matter. First, we will look at 2D materials-a group of rings on a plane (or plane group of rings (PGR)), and graphene, and then 3D materials such as a nanotube and a hybrid system consisting of nanotubes. Consider a group of rings consisting of N n identical atoms on the nth ring, located along the circumference of the ring with radius R n , equidistant from each other, see Fig. 1. We introduce a rectangular coordinate system so that the origin of the coordinate system is in the center of the ring, and the x, y axes lie in the plane of the ring. As a result, the factor δ N (p) for such a system will be in the form 28 : where M is the number of rings, J 0 is the zero-order Bessel function, N n is the number of atoms in a ring with radius R n , L 1 , L 2 are the numbers of nodes on the x, y axes, respectively, and d 1 , d 2 are the lattice periods.
Using Eqs. (1) and (8) we now calculate the spectra for the scattering of USPs on such a system for different spatial locations of the detector, as specified by the angles Θ and ϕ. An example of such a calculation is shown in Fig. 1: 3D plots show the spatial distribution of the intensity of the scattered USP; 2D plots show the same distribution, but in the form of contour plots, which demonstrate the magnitude of the scattering spectra of the USPs. It can be seen that scattering at the first harmonic, and hence without taking into account the magnetic field, has certain diffraction maxima that are characteristic of this system. Of these diffraction maxima, there is one main maximum, the intensity of which is significantly higher than the others. This maximum has a clearly (8) Figure 1. 3D radiation pattern of the scattering spectra USP [see Eq. (1)] and the contour plot for the spectra, where θ and φ are angles (in radians) with a spherical coordinate system, i.e. polar and azimuth angles, respectively. Inserts in contour plots show an enlarged (more contrasting) scatter spectrum. The first harmonic is in the figures above, and the second harmonic is below. A USP was selected with a frequency ω 0 =100 au, a pulse duration γ corresponding to 43 as and amplitude E 0 =1000 au. For the plane group of rings, the number of atoms in the ring is N = 6, the radius of the ring is R = 4 au, the number of grid nodes is 5 × 5 au, (25 rings), and the distance between the centers of adjacent rings is d = 7 au. The angle of incidence αbetween n 0 and the z axis was selected asα = π/4. www.nature.com/scientificreports/ pronounced direction in the direction of the falling pulse n 0 . If we consider scattering at the second harmonic, i.e. taking into account the magnetic component of the USP, we will also see the diffraction maxima. There are noticeably more of these maxima than at the first harmonic, and they are more pronounced. In other words, the diffraction pattern at the second harmonic is more informative. In contrast to the first harmonic, the direction of the scattered USP at the second harmonic differs markedly from the direction n 0 of the falling pulse. Both parts of the spectrum are sensitive to the number of ring atoms: the greater the number of atoms, the smaller the solid angle of the diffraction peak. Thus, most of the radiation falls on the carrier frequency ω 0. With an increase in the radius of the system and the number of atoms in it, the spectrum degenerates into a delta function.
Next, we consider another 2D material: graphene. The factor δ N (p) for graphene was partially calculated in 33 . As a result, the factor δ N (p) can be represented as: where L is the number of graphene ribbons, N is the number of the cells in graphene tape, d is the distance between atoms along the x axis, and i and j are unit vectors along the x and y axes, respectively, see Fig. 2.
Using Eqs. (1) and (9), the spectra were calculated for the scattering of USPs on graphene. An example of such a calculation is shown in Fig. 2; the 3D and 2D graphs are described similarly to those in Fig. 1. Scattering at the first harmonic, and therefore without taking into account the magnetic field, has certain diffraction maxima that are characteristic of this system. It should be noted that the diffraction pattern at the first harmonic is quite close to the diffraction pattern when USPs are scattered by a system of rings (see Fig. 1). In the case of scattering at the second harmonic, the diffraction maxima characteristic of graphene can also be seen. There are noticeably more bright peaks than at the first harmonic, and they are more pronounced. The diffraction pattern presented in the www.nature.com/scientificreports/ second harmonic scattering spectra among these 2D objects (PGR, graphene) has obvious differences. Therefore, the analysis of the spectra will make it possible to more correctly determine the studied system. We now consider a 3D system in the form of a CNT, in the approximation of an axially symmetric group of rings, see Fig. 3. The factor δ N (p) for such a system was studied in 28 , and as a result: where N n is number of atoms in a ring n with radius R n , L is the number of planes with rings, d is the step between planes, and k is the unit vector directed along the z axis. Thus, we can define the analog of both a single layer M = 1 and a multi-layer M > 1 CNT.
Below we demonstrate the scattering spectra of USPs by a CNT for different spatial locations of the detector as specified by the angles Θ and ϕ. An example of such a calculation is shown in Fig. 3; the 3D and 2D graphs are described similarly to those in Fig. 1. It can be seen that the scattering at the first harmonic has certain diffraction maxima that are characteristic of this system; of these, there is one main maximum, the intensity of which is significantly higher than the others. This maximum has a clearly defined direction along the vector n 0 , i.e. in the direction of the falling pulse. If we consider the scattering at the second harmonic, we will see that there are more maxima than at the first harmonic, and they are more pronounced. The diffraction pattern at the second harmonic carries more information than at the first. The direction of the scattered USP at the second harmonic differs markedly from the direction n 0 of the pulse falling, in contrast to the first harmonic. Both parts of the spectrum are sensitive to both the number of ring atoms and the angle of incidence of the pulse. With an increase in the number of atoms, the spectrum acquires a smaller solid angle of the diffraction peak. Figure 3. 3D radiation pattern of the scattering spectra USP [see Eq. (1)] and the contour plot for the spectra, where θ and φ are angles (in radians) with a spherical coordinate system, i.e. polar and azimuth angles, respectively. Inserts in contour plots show an enlarged (more contrasting) scatter spectrum. The first harmonic is in the figures above, and the second harmonic is below. A USP was selected with a frequency ω 0 =100 au, a pulse duration γ corresponding to 43 as. and amplitude E 0 = 1000 au. The number of planesL = 8 , the distance between planes d = 2au, and the ring radius R = 4au. The angle of incidenceαbetween n 0 and the z axis was selected as α = π/4. www.nature.com/scientificreports/ We now consider a composite nanostructure, that of a hybrid system consisting of CNTs and PRG, see Fig. 4. In such a system, CNTs connect the two PRG planes discussed above. We will consider the case where CNTs alternate through one ring in the PGR plane (like a chessboard). The factor for such a system δ N (p) , has not yet been studied, but is simple to obtain from the previous cases for PGR and a CNT: where d 1 and d 2 are the periods of the lattice in the centers of which the rings are located along the x and y axes, respectively (x and y are in the plane of the rings), n 3 is the number of nodes along the z axis, [n 1 ] and [n 2 ] are the numbers of odd atoms along the x and y axis, respectively, and [n Below, we present the calculations of the scattering spectra of USPs on a composite carbon system. An example of such a calculation is shown in Fig. 4; 3D and 2D graphs are described similarly to those in Fig. 1. The scattering at the first harmonic has certain diffraction maxima that are characteristic of this system; of these there is one main maximum, the intensity of which is significantly higher than the others. This maximum has a clearly defined direction along the vector n 0 , i.e. in the direction of the falling pulse. If we consider the scattering at the second harmonic, we will see that there are more maxima than at the first harmonic, and they are more pronounced. The direction of the scattered USP at the second harmonic differs markedly from the direction n 0 of the falling pulse. Both parts of the spectrum are sensitive to the number of ring atoms. (11)  www.nature.com/scientificreports/ It can be seen from the presented plots that taking into account the magnetic component of the USP, which leads to the appearance of the second harmonic in the scattering spectrum, i.e. makes a noticeable contribution to the overall diffraction pattern. At the second harmonic, this pattern has more than one clearly pronounced diffraction maximum, in contrast to the first harmonic. It should be added that the absolute value of the spectrum at the second harmonic can be significantly greater if a larger value is chosen E 0 и ω 0 .

Discussion and conclusion
We have shown that by using Eq. (1), it is possible to calculate the scattering spectra of USPs with allowance for the magnetic component of the electromagnetic field. The magnetic component leads to the generation of the second harmonic, which can be used for X-ray diffraction analysis of the substance. The above examples demonstrate that the second harmonic leads to a diffraction pattern that has more maxima and is more pronounced than the diffraction pattern at the first harmonic. We should add that this important result is applicable not only to the cases considered above, but is a fundamental consequence of the USP scattering with allowance for the second harmonic and is general. We will show this using Eq. (3). Since the factor is responsible for the geometric arrangement of atoms in the system, it is responsible for the diffraction pattern. The factor can be presented in another form: where δ(R − R a ) is the Dirac delta function. Since we assume that ω 0 γ ≫ 1 , then in this case the value dW/d� k [see Eq. (1)], when integrated over frequencies, will be concentrated near the two frequencies ω 0 and 2ω 0 . In this case the vector p is also concentrated near two frequencies p 1 = ω 0 /c(n − n 0 ) and p 2 = 2ω 0 /c(n − n 0 ) . This, in turn, leads to the fact that the factor δ N (p) is also situated near the first ω 0 and 2ω 0 harmonics. Since p 2 = 2p 1 , then the number of oscillations as a result of integration in ρ(R)e ip 2 R d 3 R will be more than ρ(R)e ip 1 R d 3 R , leading to the fact that there will be more diffraction maxima at the second harmonic. For example, this can be seen directly from the factors δ N (p) in Eqs. (8)- (11), and is easily shown in the case of a rectangular lattice, where the delta factor (see e.g. 34 ) is determined: where d 1 , d 2 , d 3 are the interatomic distances and directions along the x, y, z axes, respectively, and N 1 , N 2 , N 3 are the numbers of atoms along selected x, y, z axes, respectively. With a sufficiently large number of atoms in the system, Eq. (13) shows that the peaks will be at: ω 0 /c(n − n 0 )d 1 = 2πn, ω 0 /c(n − n 0 )d 2 = 2πm, ω 0 /c(n − n 0 )d 3 = 2πk , where n, m, k = 0, 1, 2, ... are integers. This is the Laue condition if we assume that the scattering occurs at the fundamental frequency ω 0 . If we consider scattering by the second harmonic, then we obtain a certain analog of the Laue condition in the form:ω 0 /c(n − n 0 )d 1 = πn, ω 0 /c(n − n 0 )d 2 = πm, ω 0 /c(n − n 0 )d 3 = π k . Comparing these two expressions, it can be seen that the second harmonic does indeed have a large number of diffraction peaks.
As a result, we obtain two diffraction patterns on the fundamental and second harmonics, both of which were derived from the same USP and on a given polyatomic system. As a result, diffraction analysis can be carried out by studying two diffraction patterns at once, which allows you to get more details about the research object. It should be added that the approach developed here, as also shown in 28 , is a special case corresponding to wellknown techniques in X-ray and diffraction analysis.
The theory developed here takes into account aspects of the interaction of USPs with matter. Note that using Eq. (1), both stationary and dynamic systems can be studied. In this case, it is necessary to replace in Eq. (1) the density ρ(r) by ρ(r, t) , where is the moment in time at which the USP acts on the system under study 19 . These dynamic systems include complex molecules, including biomolecules, where bonds are broken or formed, as well as peptides and biological systems within which there is charge migration.
It should be added that the sizes of the objects that were considered here and which we are interested in are less than the extinction length in dynamic diffraction. This means that dynamic diffraction can be neglected. Although the diffraction at the second harmonic will also be on larger objects, where dynamic diffraction cannot be neglected. How scattering at the second harmonic will affect the effects in the dynamic theory of diffraction is an interesting question and can be investigated in the future.
Thus, the method presented here is sensitive to the geometry of nano-objects and may soon supplement X-ray structural analysis. The authors expect their work to become a starting point for experimental research aimed at studying biomolecules and various dynamic systems, as well as for detecting defects in 2D and 3D nanosystems. www.nature.com/scientificreports/ 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 licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence 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 licence, visit http://creat iveco mmons .org/licen ses/by/4.0/.