Introduction

Magnetic materials frequently manifest multiple magnetic phases, wherein these distinct phases may interconvert under specific temperature or external physical fields. The phenomenon of magnetic phase transition holds considerable importance due to its broad spectrum of potential applications, including magnetic refrigeration1, which exploits such transitions to absorb or release heat, magnetic field sensors reliant on the magnetostrictive effect, and spin electronic devices2 that capitalize on the interplay between magnetic phase transitions and various physical fields. Given that the genesis of atomic magnetic moments stems from the distribution of electrons exhibiting diverse spin states, elucidating magnetic phases at the electronic scale assumes paramount significance in comprehending both the nature of magnetic phases and the processes governing phase transitions. Moreover, numerous non-trivial effects arising from electronic states in magnetic materials underscore the necessity of garnering electronic information pertaining to magnetic phases. With the density function theory, it is not difficult to perform first-principles calculations for complex magnetic states like spin spiral3 and skyrmion4,5. However, first-principles calculations elucidating magnetic phase transitions is still elusive up to now. Existing transition methodologies primarily operate at either the atomic scale or a mesoscopic scale delineated by micromagnetics, encompassing approaches such as the noncollinear extension of the Alexander-Anderson (NCAA) model6, the geodesic nudged elastic band (GNEB) method7, and other variations of the nudged elastic band (NEB) technique8,9,10.

The prevailing first-principle methodologies for scrutinizing phase transition processes predominantly cater to crystal structure transitions. These methodologies can be categorized into two principal classes: surface walking algorithms11,12,13 and interpolation algorithms14,15,16,17. Surface walking algorithms necessitate solely the final phase transition state as input to explore transition states, albeit their convergence performance tends to be suboptimal for multicomponent systems. Noteworthy surface walking methodologies encompass the gentlest ascent method18,19, the dimer method13,20, the optimization-based shrinking dimer (OSD) dynamics21, and so on. Compared to surface walking algorithms, interpolation algorithms exhibit greater robustness. The basic idea of interpolation algorithms involves the insertion of a series of intermediate states between the initial and final states of the phase transition, followed by iterative calculations of these intermediate states to achieve convergence. Notably, the NEB15,17 and the string method22,23,24 stand out as widely employed transition state calculation techniques within interpolation algorithms. Both approaches evolve the transition path based on the potential gradient. The primary distinction lies in NEB’s reliance on an additional parameter, k, to delineate the spring force linking states along the path, whereas the string method employs an intrinsic arc-length parameterization. Selecting an appropriate value for the spring force parameter k in NEB poses a nuanced challenge and can potentially impact the resultant transition path. In contrast to NEB, the string method offers a parameter-free parameterization and lends itself more readily to extension in situations when the energy landscape is rough. In the context of first-principle magnetic phase transition calculations, a natural inclination is to adapt the NEB or string method to magnetic systems. However, a significant impediment arises from the absence of precise calculations pertaining to magnetic excited states. Consequently, the gradient of potential essential for evolving the transition path in magnetic systems remains elusive.

The lacking of electronic scale transition state methods has become a constraint in the study of magnetic phase transitions. In response to this situation, combined with our inhouse magnetic constrained program which called DeltaSpin, we have developed a magnetic string method that can calculate magnetic transition states at the electronic scale. The basic idea is the same as the general string method, which is to make the phase transition path evolve along the gradient of the potential to find the minimum energy path. The key is how to obtain the potential energy surface of the magnetic system. The strategy we used is the first principle magnetic constrained calculation which is conducted by DeltaSpin. We demonstrate this method by taking the calculation of antiferromagnetism-ferromagnetism(AFM-FM) magnetic phase transition in FeRh alloy as an example. It has been found that FeRh alloy exhibits an AFM-FM phase transition at around 350K25,26 in experiments. Since the transition temperature is around room temperature and the phase transition can be triggered by multiple applied fields27,28, FeRh alloy stands out for the more promising applications comparing to other magnetic phase transition materials. It is also the reason why we choose FeRh as a platform to illustrate our magnetic phase transition method. The transition path and energy barrier of the magnetic phase transition of FeRh have been obtained. We further do an electronic structure and phonon calculation for magnetic transition states to analyze electronic and lattice dynamic contribution to this phase transition.

Results

Magnetic string method

The magnetic string method we developed is based on a assumption that the most possible phase transition path should be the minimum energy path between the initial and final states of the system. Suppose the magnetic potential energy of the system is V(x, m), and the phase transition path is γ = φ(x, m), where x = (x1, x2, . . . ) represents the coordinates of the atoms and m = (m1, m2, . . .) represents the magnetic moments of the atoms. According to the definition of minimum energy path, the phase transition path γ should satisfy the condition that the normal component along γ of the gradient of the potential energy is zero, as show in Eq. (1):

$$\nabla V{(\varphi (x,m))}^{\perp }=0$$
(1)

When Eq. (1) is not satisfied, the curve γ will continuously evolve under the drive of the potential energy at a velocity v(x, m) = − V(φ(x, m)). It should be noted that the velocity of the curve evolution is always along the normal direction of the curve. That is because the tangential component of the velocity only moves points along the curve and does not influence the evolution of the curve itself. And then we can get the dynamic equation of curve evolution:

$$\frac{\partial \varphi (x,m)}{\partial t}=-\nabla V{(\varphi (x,m))}^{\perp }$$
(2)

In the above discussion, the implicit assumption is that the system continuously changes from the initial state to the final state. But for magnetic phase transition, the transition states are some discrete states. In order to describe the distribution of the discrete states on the phase transition path, it is necessary to add a Lagrange multiplier term to the dynamic Eq. (2). The new curve evolution dynamics equation is:

$$\frac{\partial \varphi (x,m)}{\partial t}=-\nabla V{(\varphi (x,m))}^{\perp }+\lambda \hat{\tau }$$
(3)

where λ is a parameter, \(\hat{\tau }\) is the unit tangential component of the curve. As mentioned earlier, the tangential component of velocity does not affect the evolution of the curve. Therefore, the added Lagrange multiplier term only influences the distribution of transition states on the phase transition path and has no effect on the evolution of the phase transition path under potential energy. According Eq. (3), it is need to project the gradient of the potential energy function along the normal direction of the curve. However, the projection operation often reduces the accuracy of calculations. We introduce a transformation to avoid the projection, which transforms Eq. (3) to Eq. (4) using the relationship V(φ(x, m)) =  V(φ(x, m)) +  V(φ(x, m)).

$$\frac{\partial \varphi (x,m)}{\partial t}=-\nabla V(\varphi (x,m))+\bar{\lambda }\hat{\tau }$$
(4)

where \(\bar{\lambda }=\lambda +| \nabla V{(\varphi (x,m))}^{\parallel }|\) and V(φ(x, m)) represents the tangential component along γ of the gradient of the potential energy. The Eq. (4) is the final dynamic equation of curve evolution which we use in the calculation.

In the practical implements, the calculation of the magnetic transition path can be divided into three steps, which is shown in Fig. 123. First, we need to have a previous string, and in the first iteration it is generated randomly. In the second step, the previous string will be moved along the gradient of the potential which is shown in Eq. (4) to get the evolved string. In order to achieve the effect of evolution along the potential energy gradient, it needs to do two DFT calculations. One is a magnetic constrained calculation, the other is a special static calculation which performs only one or two electronic steps starting with the wave function obtained from the previous. The wave function of magnetic constrained calculation can represent the potential surface of the system, and the few electronic steps calculation is equivalent to evolve the system along the gradient of the potential. The medium images of the evolved string are usually not uniformed so that it will miss some information of the potential surface. To overcome this shortcut, the evolved string need be reparameterized in the final step. The reparameterization is also a requirement of the Lagrange multiplier term in Eq. (4). Since the Lagrange multiplier term is used to determine the distribution of medium images on the phase transition path, the effect is equivalent to reparameterization. The method we used to reparameterize the string is equal distance distribution. (The detail of reparameterization can be seen in the Method part). The reparameterized string will become the previous string in the next iteration. When the reparameterized string is the same as the last iteration, the loop will be terminated and the string obtained is the final phase transition path. In practical calculations, the convergence of the string is judged by the maximum energy difference between the corresponding magnetic configurations of the front and back loops. The convergence criterion is 5 × 10−3eV/atom in our calculation of transition states for FeRh.

Fig. 1: Work flow of magnetic string method.
figure 1

a The evolution process of the string. The previous string is randomly generated in the first iteration with the fixed initial and final state. The evolved string is obtained by evolving the previous string under the gradient of potential. The reparameterized string is generated by redistributing media states in evolving string and will become the previous string in the next iteration; b The calculation flow of the magnetic string method. The detailed instruction is displayed in right box.

Magnetic transition states of FeRh

The AFM-FM magnetic phase transition states of FeRh have been calculated using the magnetic string method and DeltaSpin. Figure 2 shows the energy of transition states and corresponding magnetic configuration along the transition path. The images denote different magnetic transition states. Image No.1 is the initial AFM state, and image No.11 is the final FM state. The blue ball in the inner pictures denotes Fe atom, and the white is Rh atom. The red arrow denotes the magnetic moment localized on the atom. Our results clearly illustrate the evolution process of magnetic moment during the phase transition. For Fe atoms, there are two kinds of magnetic moment evolution. One is that the magnetic moments will deviate a small angle to the equilibrium position, and then go back in the final. It is opposite to the intuition that the magnetic moment will contain the same direction during the phase transition since the initial and final state for these Fe atoms is totally the same as each other. The other kind of magnetic moment evolution is the direction will completely flip, but the magnitude will maintain around the same value during the transition. For Rh atoms, the magnetic moments will gradually increase during the transition, and rotate to the direction paralleling with Fe atoms in the final state. According to Fig. 2, the energy barrier of the phase transition is ΔE = 0.035 eV/atom. Using the relationship E = kBT, we can estimate the corresponding transition temperature Ttransition = 406.16K, which matches reasonably with the experimental results \({T}_{transition}^{exp}=340-370K\)25,26. As mentioned above, the initial path(the previous string in the first iteration) is generated randomly. In order to check the influence of the initial path on the results, two independent initial paths have been generated. The results of the another initial path are very similar to the previous, including the evolution of the magnetic moments and the energy barrier which is \(\Delta {E}^{{\prime} }=0.033eV/atom\)(the corresponding transition temperature \({T}_{transition}^{{\prime} }=382.95K\)).

Fig. 2: Energy and magnetic configuration along the transition path between AFM and FM state.
figure 2

The images denote different magnetic transition states. Image No.1 is the initial AFM state, and image No.11 is the final FM state. Insert pictures demonstrate the magnetic configuration of different transition states. The blue ball denotes Fe atom, and the white is Rh atom. The red arrow denotes the magnetic moment localized on the atom. The energy barrier (which is calculated using image No.1 and image No.9) is ΔE = 0.035 eV/atom.

Electronic structure of transition states

Figure 3 shows the differential charge density between the magnetic transition states during the AFM-FM phase transition of FeRh. The differential charge density here refers to the difference of charge density between the same system but in different states. According to the results, the electrons of Rh atoms in axis directions will decrease during the transition, but that in diagonal direction will increase. Combining with the orientation of the orbital of d electrons, we can know that the electrons in eg orbital of Rh atoms will decrease, while the electrons in t2g orbital will increase. Since the net magnetic moment in the Rh atom emerges during the phase transition, it corresponds to a low-spin to high-spin (LS-HS)29 transition. Therefore, we can say that the charge transfer from eg to t2g is associated with the LS-HS transition. This phenomena can also be found in other alloy materials30. In addition to the direction of charge transfer, the change trend of the magnitude of charge transfer can also be obtained from Fig. 3c–f. From image No.5 to image No.8, the magnitude of charge transfer between adjacent images becomes larger and larger. However, from image No.8 to image No.9, the magnitude of charge transfer declines sharply, especially for Rh atoms, of which the charge density remains basically unchanged. Since the image No.8 and image No.9 are similar to the final state in energy level and magnetic structure, both states can be characterized by HS state. And the result of Fig. 3f can be understood that the charge transfer from eg to t2g is very small between the two HS states.

Fig. 3: Differential charge density of magnetic phase transition states.
figure 3

The differential charge density here refers to the difference of charge density between the same system but in different states. The blue surface denotes charge increase, and the red denotes charge decrease. For showing the results clearly, (c)–(f) use different isosurfaces with (a), (b).

Phonon of transition states

We have calculated the phonon spectra for different magnetic transition states during the AFM-FM phase transition, as shown in Fig. 4. There exists imaginary frequency at X point for AFM (image No.1) state, which is consistent with the earlier theoretical calculations31. The imaginary frequency at X point will disappear during the phase transition, and a similar increase in phonon frequency can also be found at K and U point. All these results show that the acoustic phonon of the lowest energy becomes hardening during the phase transition. Given that this acoustic mode corresponds to an isotropic vibration, it suggests that the FM state exhibits a significantly greater preference for isotropic vibrations than the AFM state. This outcome is quite intuitive. In the FM state, all iron atoms are equivalent to one another(the same applies to rhodium atoms) in terms of both lattice structure and magnetic properties. While for the optical modes, the situation becomes more complex. There is no evident trend of change during the phase transition. A more detailed analysis is reserved for future research. It should be noted that for G point, the imaginary frequency emerges in image No.9 but disappears in FM (image No.11) state. It can be understood that the image No.9 is the highest energy state along the transition path.

Fig. 4: Phonon dispersion relations calculated for different magnetic transition states of FeRh alloy in the framework of the harmonic approximation at zero temperature.
figure 4

Different color lines denote the different transition state. The insert boxes show areas where the phonon frequency increases apparently.

Discussion

Before concluding our study, we briefly highlight two limitations of our magnetic string method. First, since the magnetic constrained calculations become very challenging when inducing ionic relaxation, the lattice change is not yet considered in our method. As a result, the method is not suitable for the magnetic phase transition accompanied by obvious lattice distortions. The second limitation is inherited from DFT calculation. Because current DFT can not describe strongly correlated electron systems reasonably, the magnetic phase transition of strongly correlated electron systems is excluded from our method.

However, even having some limitations mentioned above, the magnetic string method shows remarkable superiority to the current magnetic phase transition methods, such as magnetic NEB and NCAA model. Most of the current magnetic NEB methods are based on atomic scale molecular dynamics simulations with Landau-Lifshitz-Gilbert equations as the dynamic equations, which are completely lacking the electronic scale information. Our magnetic string method is based on DFT magnetic constrained calculations, which can give detailed electronic scale information of the phase transition path. This is the mainly superiority of the magnetic string method over the traditional magnetic NEB. NCAA is a model Hamiltonian method, which is parameter dependent and rely on the accuracy of the model to construct Hamiltonian. The magnetic string method requires only the magnetic configurations of the initial and final states of the phase transition, with no other adjustable parameters that have an impact on the results. And constructing Hamiltonian artificially is avoided, since our method is based on the first principle calculations.

To summarize, we have developed a magnetic string method that can calculate magnetic transition states at the electronic scale. Using the AFM-FM phase transition in FeRh alloy as a case study, we demonstrate a precise calculation of phase transition energy barrier and their influence on magnetic moment due to charge distribution. This method will be a powerful tool to investigate the interplay between electron and magnetization in materials, and we expect it to shed light on the fundamental mechanisms underlying magnetic phase transitions.

Methods

Reparameterization in magnetic string method

The method we used to reparameterize the string is equal distance distribution. The detailed process is as follows. First, the distance between the medium images and the initial state is calculated. The distance is defined by the length of a functional curve \(r=\frac{\theta }{\beta }(b-a)+a\), where a, b are the magnitudes of the magnetic moments of the initial and final states, β is the angle between the magnetic moments of the initial and final states, and θ is the angle between the magnetic moments of the medium images and the initial state. Then, taking the distances as the independent variable and the corresponding magnetic configurations of medium images as the dependent variable, a one-dimensional function is obtained using the usual interpolation algorithm (such as Python’s iterp1d() function). Finally, using equally spaced distances as input to the interpolation function obtained above, the output magnetic configuration is the reparameterized string.

Density functional calculations

All calculations in this work are first principles calculations based on density functional theory (DFT)32,33,34. Under the generalized gradient approximation (GGA), DFT can provide a reasonable description for many systems. When the studied system contains transition metal elements, due to the strong Coulombic interaction between d or f electrons, the GGA+U35 method often provides a more accurate description of the system. The U represents the on site Coulomb interaction, which is an approximation of the strong Coulomb interaction between electrons. However, according to the results of ref. 36, the GGA+U method may cause the instability of the like face centered cubic structure, which is a metastable state of FeRh found in experiments. Therefore, the GGA+U method is not suitable for the FeRh system, and we have not used it in our calculations.

The program used for the first principles calculations is Vienna Ab initio Simulation Package (VASP)32,33,34. The magnetic constrained DFT calculations have been performed using the self-adaptive spin-constraining algorithm DeltaSpin37, which has been implemented as a loadable module for VASP. The magnetic constrained calculations in DeltaSpin is achieved by optimizing the Lagrange term in the Hamiltonian. By adding the optimization of the Lagrange multiplier λ to the electronic step loop of the ordinary DFT calculation, it is able to adaptively find the optimal λ to achieve more accurate convergence to the target magnetic moment. The root-mean-square error (RMSE) between the obtained and target magnetic moments is used to evaluate the convergence of the magnetic constrained calculation in DeltaSpin. For common magnetic materials, the RMSE can be up to 10−5μB ~ 10−4μB. In our calculation, the RMSE is around 10−4μB. More detailed instructions of DeltaSpin algorithm can be found in ref. 37.

All calculations use the GGA exchange correlation functions with the PBE (the parameterization of Perdew, Burke, and Enzerhof) pseudopotential38. The interactions between ions and electrons are described using the projector augmented-wave (PAW) method39,40. The energy cutoff of the plane wave basis vector is 550 eV. The convergence criterion for electronic steps is 10−4 eV. For the magnetic phase transition calculation, a 2 × 2 × 2 supercell is used, and the Brillouin zone is sampled using the Monkhorst Pack k-point mesh of a 4 × 4 × 4 grid. It should be noted that the small volume change during the transition has not been taken into account.

Phonon calculations

The phonon spectrum of transition states are computed using the finite difference method implemented in the PHONOPY code41,42. In order to distinguish the magnetic structure of different transition states, the unitcell uses a 4 atoms fcc-like structure. A 3 × 3 × 3 supercell is used to calculate the harmonic and force constants.