Elsevier

Computer Physics Communications

Volume 207, October 2016, Pages 350-361
Computer Physics Communications

SPILADY: A parallel CPU and GPU code for spin–lattice magnetic molecular dynamics simulations

https://doi.org/10.1016/j.cpc.2016.05.017Get rights and content

Abstract

Spin–lattice dynamics generalizes molecular dynamics to magnetic materials, where dynamic variables describing an evolving atomic system include not only coordinates and velocities of atoms but also directions and magnitudes of atomic magnetic moments (spins). Spin–lattice dynamics simulates the collective time evolution of spins and atoms, taking into account the effect of non-collinear magnetism on interatomic forces. Applications of the method include atomistic models for defects, dislocations and surfaces in magnetic materials, thermally activated diffusion of defects, magnetic phase transitions, and various magnetic and lattice relaxation phenomena. Spin–lattice dynamics retains all the capabilities of molecular dynamics, adding to them the treatment of non-collinear magnetic degrees of freedom. The spin–lattice dynamics time integration algorithm uses symplectic Suzuki–Trotter decomposition of atomic coordinate, velocity and spin evolution operators, and delivers highly accurate numerical solutions of dynamic evolution equations over extended intervals of time. The code is parallelized in coordinate and spin spaces, and is written in OpenMP C/C++ for CPU and in CUDA C/C++ for Nvidia GPU implementations. Temperatures of atoms and spins are controlled by Langevin thermostats. Conduction electrons are treated by coupling the discrete spin–lattice dynamics equations for atoms and spins to the heat transfer equation for the electrons. Worked examples include simulations of thermalization of ferromagnetic bcc iron, the dynamics of laser pulse demagnetization, and collision cascades.

Program summary

Program title: SPILADY, version 1.0

Catalogue identifier: AFAN_v1_0

Program summary URL:http://cpc.cs.qub.ac.uk/summaries/AFAN_v1_0.html

Program obtainable from: CPC Program Library, Queen’s University, Belfast, N. Ireland

Licensing provisions: Apache License, Version 2.0

No. of lines in distributed program, including test data, etc.: 1611165

No. of bytes in distributed program, including test data, etc.: 367246683

Distribution format: tar.gz

Programming language: OpenMP C/C++, CUDA C/C++.

Computer: Any computer with an OpenMP capable C/C++ compiler or computer with CUDA capable GPU card and an nvcc compiler.

Operating system: Linux, Unix, Windows.

RAM: At least 500 MB, depending on the number of atoms or atomic spins, and on the simulation type.

Classification: 7.7.

Nature of problem:

Excitation of magnetic degrees of freedom affects a broad range of properties of magnetic materials, including their equilibrium crystal structure and response to mechanical deformation. Existing atomistic simulation methods, for example molecular dynamics, do not treat magnetic degrees of freedom and do not describe the effect of magnetism on interatomic forces. This is addressed by the spin–lattice dynamics approach. The integration algorithm satisfies the requirement of phase volume conservation in the multi- dimensional space of atomic coordinates, velocities, and atomic spins, which is achieved through the application of the symplectic Suzuki–Trotter decomposition. Numerical solutions of spin–lattice dynamics equations retain high accuracy over extended intervals of time.

Solution method:

An atomic scale simulation technique for modelling the coupled dynamics of atomic coordinates and spins. The method generalizes molecular dynamics to the case of magnetic materials, and uses a parallel Suzuki–Trotter decomposition-based time integration algorithm.

Restrictions:

The current version assumes a single chemical element material composition. The spin Hamiltonian and equations of motion assume isotropic magnetic interactions. Evolution equations assume the validity of localized magnetic moment approximation.

Unusual features:

An open source spin–lattice dynamics code. The time integration algorithm uses the Suzuki–Trotter decomposition, which is a symplectic integration method retaining high accuracy over extended intervals of time. The code can be executed in parallel on multiple CPUs using OpenMP directives, or on an Nvidia GPU card.

Additional comments:

Further information available on website:

http://spilady.ccfe.ac.uk

Running time:

Similar to molecular dynamics, from several minutes to several weeks or months, depending on the number of atoms or spins involved in a simulation, and on the type of the simulation.

Introduction

Magnetic materials play pivotal roles in a diverse range of engineering applications, involving storage, recovery, transportation, manipulation and processing of information, and quantum computing. At the same time, magnetic excitations affect the stability of crystal structures of many magnetic alloys, including iron alloys and steels. For example, the body-centred cubic crystal structure of iron appears anomalous in the context of the Periodic Table, since it owes its stability to the fact that the ground state of iron is ferromagnetic  [1], [2]. Other elements in the same group of the Periodic Table have hexagonal crystal structure  [3]. The high temperature softening of the elastic constant C of iron  [4], [5] is fundamentally related to the αγ phase transition, which in turn is associated with the loss of magnetic order at the Curie temperature TC=1043K. The αγ and γδ phase transitions in iron stem from competing effects of phonon and magnon excitations, where magnetic excitations stabilize the bcc phase whereas thermal atomic vibrations favour fcc crystal structure [6], [7]. Another example is that at low temperatures a self-interstitial defect in iron adopts the 110 dumbbell configuration, whereas in non-magnetic bcc metals a self-interstitial defect is a 111 crowdion [8], [9]. These examples show that both the phase stability  [10] and dislocation-mediated mechanical properties  [11] of materials are strongly influenced by magnetism.

Landau–Lifshitz and Gilbert (LLG) equations  [12] describe the dissipative dynamics of spins (Spin Dynamics, SD) on a rigid lattice. Solutions of the LLG equations asymptotically converge to the ground state magnetic configuration of the material. Brown [13] extended the LLG treatment and included thermal excitation of spins through the use of a stochastic method based on the fluctuation–dissipation theorem (FDT) [14], [15]. The method makes it possible to drive a spin system to thermal equilibrium at a pre-defined temperature. Parameters of the model can be defined by assuming that stochastic exchange fields acting on spins describe coupling to an external thermostat.

Kinematic motion of atoms in non-magnetic materials can be modelled by molecular dynamics (MD). MD treats atoms as point objects interacting through forces that depend on atomic positions. MD does not treat the magnetic degrees of freedom of atoms. Models that incorporate magnetic effects in the many-body interatomic potential formalism were developed by Dudarev and Derlet [16], [17] and Ackland [18]. These models predict the magnitudes of atomic magnetic moments for a given atomic configuration  [19] but do not take into account the directional aspect of magnetic degrees of freedom necessary for the treatment of non-collinear magnetism, including for example the order–disorder magnetic transitions on a vibrating atomic lattice.

A dynamic model for spin waves, lattice vibrations, and their interaction at a finite temperature requires including magnetic degrees of freedom in molecular dynamics. Omelyan et al. [20] and Tsai et al.  [21] explored models that unify spin and lattice dynamics. They noted the advantages associated with the application of the Suzuki–Trotter decomposition (STD)  [22] algorithm to the treatment of non-commuting evolution operators that describe the lattice and spin degrees of freedom. The points that did not receive attention included the development of a realistic parameterization for the interatomic interaction law, the definition of the range of validity of the classical treatment of spin degrees of freedom, and the parallel computer implementation of spin–lattice dynamics.

In Refs.  [23], [24] we formulated a spin–lattice dynamics model with parameters derived from the ab initio data on bcc ferromagnetic iron. An algorithm for parallel spin–lattice dynamics simulations was developed in Ref. [25]. Further analysis showed how to evaluate temperature of a dynamic spin ensemble  [26]. Analytical formulae that help accelerate spin dynamics simulations were derived in Ref. [27]. Spin–lattice–electron dynamics, also incorporating the electronic degrees of freedom, was developed in Refs. [28], [29] together with the treatment of longitudinal magnetic fluctuations  [30].

Applications of spin–lattice dynamics (SLD) include simulations of magnetism in iron thin films  [31], self-diffusion in iron [32], [33], and a dynamic model for the magnetocaloric effect in iron and gadolinium  [34]. SLD simulations have been recently performed by several research groups worldwide [35], [36], [37], [38], [39], [40]. Since a practical implementation of SLD is somewhat more intricate than that of MD, it appears timely that a working version of a spin–lattice dynamics computer code (SPILADY), suitable for carrying out a diverse range of atomistic simulations involving also the magnetic degrees of freedom of atoms, should be made available as an open source computer program.

In what follows we briefly describe the underlying theory, algorithms and parameters that control the execution of a spin–lattice dynamics simulation, and give three worked examples of application of spin–lattice dynamics. For further information we refer an interested reader to the user manual of SPILADY, version 1.0, which describes in detail the control options and variables of spin–lattice dynamics. The manual also gives extra examples showing how to use SPILADY to perform MD, SD and SLD simulations.

Section snippets

Theory

In this section we briefly describe the Hamiltonian and equations of motion for MD, SD and SLD, the incorporation of longitudinal magnetic fluctuations, the coupled heat transfer equation for the conduction electronic subsystem, and a method for treating local collective motion of atoms. Although these theories were described in detail elsewhere, we give a brief summary of the relevant concepts here.

Algorithm

Fig. 1 shows the flow chart of SPILADY. The basic structure of SPILADY is similar to that of a conventional MD program [46]. It starts with the initialization of the time variable, the lattice structure, momenta, spins, the linked cells structure, the tables describing interatomic potentials, various random numbers, and–if necessary–the parameters controlling the execution of the program on a GPU. It also calculates the initial effective electron densities, energies, forces and temperatures.

Controls

There are various control parameters and files that direct the execution of SPILADY, including compilation of the program, and the way it inputs and outputs data. After downloading the program as a compressed file spilady1.0.tar.gz, one needs to decompress it. There are several files that require attention here. They are make.sh, control.h, and variables.in. To perform an MD or an SLD simulation, one needs a many-body potential file, for example DD05.cpp. To perform an SD or SLD simulation, one

Applications

Three examples illustrating application of SPILADY program are given below, and more examples can be found in the user manual. Without changing any source code, SPILADY is ready to tackle diverse problems that MD can tackle, e.g. the evolution of crystal defects, radiation damage, shock wave propagations, etc. At the same time, it opens a new door allowing people to investigate the effect of magnetic excitations on all these issues. One may also use it to study magnetic system using spin

Conclusion

In this paper we describe the main features of a spin–lattice dynamics simulation program, SPILADY version 1.0. A user of SPILADY can perform molecular dynamics, spin dynamics, spin–lattice dynamics, and spin–lattice–electron dynamics simulations, including where necessary longitudinal spin fluctuations. The program is written in OpenMP C/C++ and CUDA C/C++. It can be run in parallel on CPUs, or on an Nvidia GPU. This paper describes the underlying theoretical concepts, algorithms and

Acknowledgements

This work has been carried out within the framework of the EUROFusion Consortium and has received funding from the Euratom research and training programme 2014–2018 under grant agreement No. 633053 and from the RCUK Energy Programme [Grant No. EP/I501045]. To obtain further information on the data and models underlying the paper please contact [email protected]. The views and opinions expressed herein do not necessarily reflect those of the European Commission.

References (49)

  • S.L. Dudarev et al.

    J. Comput.-Aided Mater. Des.

    (2007)
  • P.-W. Ma et al.

    J. Appl. Phys.

    (2007)
  • A.K. Zhuravlev et al.

    J. Exp. Theor. Phys.

    (2014)
  • M.E.A. Coury et al.

    Phys. Rev. B

    (2016)
  • H.C. Herper et al.

    Phys. Rev. B

    (1999)
  • M. Friák et al.

    Phys. Rev. B

    (2001)
  • D.G. Pettifor

    Bonding and Structure of Molecules and Solids

    (1996)
  • D.J. Dever

    J. Appl. Phys.

    (1972)
  • H. Hasegawa et al.

    J. Phys. F: Met. Phys.

    (1987)
  • H. Hasegawa et al.

    Phys. Rev. Lett.

    (1983)
  • M.Y. Lavrentiev et al.

    Phys. Rev. B

    (2010)
  • D. Nguyen-Manh et al.

    Phys. Rev. B

    (2006)
  • P.M. Derlet et al.

    Phys. Rev. B

    (2007)
  • F. Körmann et al.

    Phys. Status Solidi b

    (2014)
  • S.L. Dudarev et al.

    Phys. Rev. Lett.

    (2008)
  • T.L. Gilbert

    IEEE Trans. Magn.

    (2004)
  • W.F. Brown

    Phys. Rev.

    (1963)
  • S. Chandrasekhar

    Rev. Modern Phys.

    (1943)
  • R. Kubo

    Rep. Progr. Phys.

    (1966)
  • S.L. Dudarev et al.

    J. Phys.: Condens. Matter

    (2005)
    P.M. Derlet et al.

    Prog. Mater. Sci.

    (2007)
  • G.J. Ackland

    J. Nucl. Mater.

    (2006)
  • I.P. Omelyan et al.

    Phys. Rev. Lett.

    (2001)
    I.P. Omelyan et al.

    Phys. Rev. E

    (2001)
    I.P. Omelyan et al.

    Phys. Rev. E

    (2002)
  • S.H. Tsai et al.

    Braz. J. Phys.

    (2004)
    S.H. Tsai et al.

    Amer. J. Phys.

    (2005)
  • N. Hatano et al.

    Lecture Notes in Phys.

    (2005)
  • Cited by (45)

    • Temperature-dependent magnetism in Fe foams via spin-lattice dynamics

      2022, Computational Materials Science
      Citation Excerpt :

      Recent developments in the technique of coupled classical atomistic and spin dynamics simulations [1–4], also called Spin-Lattice Dynamics (SLD) simulations, have enabled calculations of the magnetization dynamics of large-scale metallic systems.

    • Spin-lattice dynamics simulation of the Einstein–de Haas effect

      2022, Computational Materials Science
      Citation Excerpt :

      The remaining material is organized as follows. In Section 2, we give a brief outline of the SLD model of ferromagnetic exchange previously implemented in SPILADY [33] and demonstrate analytically that it conserves angular momentum. However, we show that angular momentum exchange is not possible when only the isotropic ferromagnetic exchange term is considered in the model.

    • Influence of vacancies on the temperature-dependent magnetism of bulk Fe: A spin-lattice dynamics approach

      2022, Computational Condensed Matter
      Citation Excerpt :

      For problems investigating magnetic properties of materials at larger scales – as in the present study – one has, therefore, to resort to classical approaches, which allow for multi-million atom calculations. One of the first classical SLD codes has been published under the name of SPILADY by Ma et al. [14]. Later, SLD has been included in the well-known public-domain molecular dynamics software package LAMMPS [25] which allows in particular for efficient MPI parallelization [26,27].

    • UDKM1DSIM – a Python toolbox for simulating 1D ultrafast dynamics in condensed matter

      2021, Computer Physics Communications
      Citation Excerpt :

      In order to understand and interpret such experimental data, one relies on a bunch of simulations for modeling and fitting, which are available as software tool-kits or as published formalisms. A list of required dynamic simulations might include the simplistic N-temperature model (NTM) as initially proposed by Anisimov et al. [10] as well as its modifications and implementations [1,11,12], coherent phonon dynamics in a masses-and-spring model [13,14], molecular dynamics for simulations of spin lattice coupling [15,16], magnetic simulations combining a 2-temperature-model with the Landau-Lifschitz-Bloch equation [17], or full magnetic simulations [18–21]. Other aspects can be the spatial absorption profile of the laser excitation in the sample [22,23] and, moreover, the calculation of the actual observable, e.g. the scattered light intensity in the framework of kinematical or dynamical scattering theories [24–29] with possible inclusion of resonant and magnetic scattering effects.

    • The Einstein-de Haas effect in an Fe<inf>15</inf> cluster

      2023, Journal of Physics Condensed Matter
    View all citing articles on Scopus

    This paper and its associated computer program are available via the Computer Physics Communication homepage on ScienceDirect (http://www.sciencedirect.com/science/journal/00104655).

    View full text