SciELO - Scientific Electronic Library Online

 
vol.64 issue5Magnetic properties of free-standing finite linear Co chainsDifferential and integral cross sections for electron elastic scattering by ammonia for incident energies ranging from 10 eV to 20 KeV author indexsubject indexsearch form
Home Pagealphabetic serial listing  

Services on Demand

Journal

Article

Indicators

Related links

  • Have no similar articlesSimilars in SciELO

Share


Revista mexicana de física

Print version ISSN 0035-001X

Rev. mex. fis. vol.64 n.5 México Sep./Oct. 2018  Epub Nov 30, 2019

 

Research

Vegas: Software package for the atomistic simulation of magnetic materials

J.D. Alzate-Cardona1 

D. Sabogal-Suárez1 

O.D. Arbeláez-Echeverri1 

E. Restrepo-Parra1 

1Departamento de Física y Química, Universidad Nacional de Colombia, Sede Manizales, A.A. 127 Manizales, Colombia. *Tel: +57 6 8879300 Ext. 55631. e-mail: jdalzatec@unal.edu.co


Abstract

We present an open-source software package, Vegas, for the atomistic simulation of magnetic materials. Using the classical Heisenberg model and the Monte Carlo Metropolis algorithm, Vegas provides the required tools to simulate and analyze magnetic phenomena of a great variety of systems. Vegas stores the history of the simulation, i.e. the magnetization and energy of the system at every time step, allowing to analyze static and dynamic magnetic phenomena from results obtained in a single simulation. Also, standardized input and output file formats are employed to facilitate the simulation process and the exchange and archiving of data. We include results from simulations performed using Vegas, showing its applicability to study different magnetic phenomena.

Keywords: Atomistic simulation; classical spin model; Monte Carlo method; magnetic phenomena

PACS: 75.40.-s; 71.15.-m; 87.55.kd; 87.55.kh

1.Introduction

Magnetic materials are widely used in a diverse range of applications in modern society. In recent years, magnetic nanostructures have attracted much attention because of their promising properties that are not observed in larger structures and the miniaturization demand of magnetic devices. Properties like exchange bias and superparamagnetic behavior at room temperature make magnetic nanostructures ideal for magnetic recording media 1 and biomedical applications2, respectively.

Spin models have played an important role in understanding the magnetic behavior of magnetic materials. Specially, classical spin models bridge the gap between a full electronic description of a magnetic material and conventional micromagnetism 3. Classical spins can be represented as n dimensional vectors, such as Ising (n = 1), XY (n = 2) and Heisenberg (n = 3) spins. Because of the difficulty to solve by analytical approaches, the partition function of systems represented by classical spin models, numerical simulations employing the Monte Carlo method are usually used to estimate the thermodynamic quantities of the systems. Magnetic properties of different systems, such as thin films 4, simple and core-shell nanoparticles 5,6, mixed spin systems 7, torus nanorings 8, nanotubes 9, bit-patterned media 10 and bulk materials 11,12 have been studied by Monte Carlo simulations. These atomistic simulations allow to take into account changes in the magnetization that occur at atomic scale and the finite size effects which are considerable in magnetic nanomaterials 13.

Because of the complexity of the methods and algorithms used to perform atomistic simulation of magnetic materials, research in the area is usually restricted to experts with advanced knowledge in computer programming, where simulations are mostly based on codes developed by the researchers themselves. In view of that, different open source software packages, such as VAMPIRE 13 and ALPS 14, have been developed with the aim to make available these kind of simulations to the non-expert software developer. Furthermore, the development of new software is important to take into account improvements made to the current methods and implementations. An increase in the efficiency of the simulation and analysis processes can be achieved by the implementation of novel algorithms and the enhancement of the structure employed to describe the simulation input and output data. Besides, just part of the data is usually collected during a simulation, requiring several simulations to study distinct magnetic behavior of a given system. Taking these aspects into account, we present an open source software package, Vegas, for the static and dynamic atomistic simulation of magnetic materials.

2.VEGAS software package

The aim of Vegas is to provide the required tools to build, simulate and analyze a great variety of magnetic systems with structural and magnetic characteristics that can be set with high flexibility. The main features of Vegas are the following:

  • The history of the simulation is stored, i.e. the magnetization and energy of the system are stored at every Monte Carlo Step (MCS) per temperature and magnetic field step. This allows to study the dynamic behavior of the system in addition to its static behavior from results obtained in a single simulation. This way, it is possible to estimate, among other things, equilibrium and non-equilibrium correlation times which can be used to enhance the quality of the statistics of the thermal averages.

  • High flexibility is provided for the building and simulation of a great variety of magnetic systems. It is possible to simulate systems with different structures and magnetic phases, where the statistics of each magnetic phase can be tracked independently. Any kind of ion can be simulated by providing its atomic magnetic moment and spin.

  • Several spin update policies, including a highly-efficient adaptive policy, are implemented in VEGAS to simulate accurately the magnetic behavior of different magnetic systems. It is possible to simulate a material with various magnetic phases employing a different update policy for each magnetic phase, e.g. a core/shell nanoparticle where the core is updated using a random move and the shell is updated using a spin-flip move. Also, Ising and mixed spin Ising systems can be modeled using the spin-flip and qIsing update policies, respectively.

  • The direction of every spin moment is stored per temperature and magnetic field step at the last MCS, where the system is expected to have reached equilibrium. Hence, it is possible to visualize the temperature/field evolution of the spin moments direction, which can contribute to a better understanding of the magnetic phenomena.

  • An estimation of the simulation time is given during the simulation.

  • VEGAS does not require to be built in order to be executed, it is composed by executables that can be run directly on Linux 64 bits and Windows 8 (or later) operating systems.

3. Model and method

3.1. Classical spin Hamiltonian

The magnetic systems simulated using Vegas are described by the classical Heisenberg model. Interactions at the atomic scale between spin moments in a magnetic material are modeled by the Heisenberg spin Hamiltonian, which includes the exchange, anisotropy and applied field interactions. The Heisenberg spin Hamiltonian is given by

H=-ijJijSiSJ-μsBiSini-Hani (1)

where J ij is the exchange interaction constant between sites i and j, B and n i are the magnetic field intensity and direction of site i, respectively, μs is the atomic magnetic moment, S i and S j are the spin moment directions of sites i and j, respectively, and Hani is the anisotropy term. The anisotropy term can take the form of uniaxial anisotropy

Haniuni=ikiuni(Si.ei)2 (2)

where kiuni and e i are the uniaxial anisotropy constant and direction of site i, respectively, or cubic anisotropy 15

Hanicub=ikicubSx2Sy2+Sy2Sz2+Sx2Sz2i (3)

where kicub is the cubic anisotropy constant, and Sx, Sy and Sz are the x, y and z components of the spin moment S, respectively.

3.2. Monte Carlo Metropolis algorithm

The time evolution of a classical spin magnetic system can be given by the Monte Carlo Metropolis algorithm, where new configurations of a system are generated from a previous state using a transition probability. The algorithm is developed as follows: an initial state is chosen for the magnetic system. Then, one single spin moment is randomly chosen and its direction is changed to a new trial direction according to an update policy (trial move). The energy of the system before and after the trial move is then evaluated according to Eq. (1) and the energy change ΔE is calculated. Finally, the trial move is accepted with a probability given by

p=exp-ΔEkBT (4)

where kB is the Boltzmann constant and T is the absolute temperature of the system. Repeating this process once per spin moment is called a MCS. The update policy has influence on the efficiency of the algorithm and its physical interpretation 3. Common update policies, including the spin-flip, random, small step and Gaussian moves 16, are implemented in Vegas. Furthermore, an adaptive move which keeps the acceptance rate of the new states near 50%, enhancing the efficiency of the Monte Carlo Metropolis algorithm is implemented.

For a comprehensive review of the atomistic spin model and the integration methods employed in the atomistic simulation of magnetic materials see 13.

3.3. File Formats

In order to facilitate the exchange and archiving of data, Vegas uses the standardized file formats, Json and Hdf5, for the input and output files of the simulations, respectively.

JSON uses universal data structures through which the simulation parameters can be defined using a name/value pair structure. An example of a JSON input file is shown in Fig. 1. In this file, the simulation parameters, including the temperature, magnetic field range and step, number of MCS and random number seed, for a hysteresis loop simulation are defined. Also, the material, anisotropy and initial state (if required) files, and the results output file are given. In order to take into account the atomic magnetic moment, the field input parameters corresponds to quantities of μsB (see Eq. (1)). In this case, the simulation parameters are normalized such that kB=1. Then, the exchange interaction, anisotropy and field parameters must be given in units of temperature. However, if the user intends to use other kind of normalization, it is necessary to use coherent units for all the parameters. For instance, if the user intends to use real units in the MKS system, the Boltzmann constant must be given in J/K and the exchange interaction, anisotropy and field parameters in J.

FIGURE 1 Example of a JSON input file defining the simulation parameters. 

On the other hand, Hdf5 is a data model and file format for storing and managing extremely large data, which is useful for storing and analyzing the simulation results in Vegas, specially the history of the simulation. Other input data, including the anisotropy and the material files, are given in plain text format. For these files, we designed simple data schemes to specify the anisotropy type and the magnetic and structural parameters of the material.

3.4. Vegas tools

Based on different python and C++ libraries, Vegas provides tools to build, simulate and analyze magnetic systems.

3.4.1 Material building

Vegas has a python-based tool, Vegas lattice, for building materials with different shapes, structures and magnetic properties. Vegas lattice provides the essential routines to generate regular graph lattices in linear time, as well as some cuts of those lattices for nanoparticles and randomly depleted lattices. Detailed documentation of Vegas lattice can be found at its GitHub repository 17.

It is also possible to build the material manually according to the material file format. The material file, which uses a plain text format, is essentially composed by four parts. The first part indicates the number of ions, links and ion types in the material. The second part is composed by identifiers for the different types of ions. The third part mainly corresponds to the geometric construction of the material, indicating the index, spatial coordinates, spin norm, spatial coordinates of the magnetic field axis, type and update policy of the ion. Finally, the fourth part indicates the exchange interactions between the ions. There are not limitations in terms of the size of the material; however, the time of the simulation increases linearly with the size of the material.

3.4.2.Simulation

The simulation model and methods are implemented in Vegas using C++ libraries. In order to initialize the simulation of a given magnetic material, Vegas reads the system and simulation parameters from the Json input file. Then, the simulation is carried out by routines implemented according to the classical Heisenberg model and the Monte Carlo Metropolis algorithm, while the simulation results are stored in the Hdf5 output file. During the simulation, an estimate of the simulation time is given.

3.4.3. Data analysis

Vegas has implemented multiple analyzers for the analysis and visualization of different magnetic phenomena. All the analyzers are written in PYTHON using the H5py library. The analyzers are developed based on the data structure of the simulation results, which are stored in HDF5 format. Different variables are employed to store the simulation result data, which include the temperature, magnetic field, ion positions, final states, energy and magnetization. Furthermore, the Boltzmann constant and the number of MCS are stored as attributes.

If the user requires a more specific or detailed analysis, it is possible to implement simple scripts to analyze the simulation results. Moreover, the HDF Group provides a visual tool, HDFView 18, to extract and analyze data from HDF5 files.

4.Applications

Static and dynamic magnetic properties, such as hysteresis loops, critical temperature, compensation behavior, reversal mechanisms, magnetic recording, critical exponents and correlation times, can be determined using VEGAS. In this Section, we present some examples of the applicability of Vegas to study different materials and magnetic phenomena.

4.1.Materials with different shapes and structures

Materials with simple and complex shapes, such as core/shell nanoparticles, nanotubes, nanowires, nanorings, bit patterned media, thin films, multilayers and bulk systems, and crystal structures, such as simple, body-centered and face-centered cubic, can be simulated in Vegas. Samples of some materials are shown in Fig. 2.

FIGURE 2 Samples of a a) spherical core/shell nanoparticle, b) core/shell nanowire and c) multilayer. 

4.2. Thermal averages

Thermal averages can be easily extracted and visualized from the simulation results output file. Figure 3 shows the thermal dependence of the magnetization (M) and the susceptibility (X), and a hysteresis loop of a bulk material simulated using the structure and magnetic parameters of iron, namely, J=44.01 meV/link and k=3.53×10-3 meV/atom 13. From these results, important magnetic properties of the material, such as the critical temperature (T c) and the coercivity (Hc), can be determined.

FIGURE 3 a) Thermal dependence of the magnetization and susceptibility, and b) hysteresis loop at 10 K of an iron bulk material. Inset in Fig. 3a) shows the BCC crystal structure of iron. 

The hard disk space required for a simulation depends on parameters as the size of the system and the number of Monte Carlo, temperature, and field steps of the simulation. For instance, the simulation of the thermal dependence of M and X (see Fig. 3a) was made considering a system with N=2000 sites with 8 nearest neighbors each one, BCC structure and uniaxial anisotropy. The temperature was varied from a high to a low value with a total of 200 temperature steps, while the magnetic field was set to a single value of 0 T. 20000 MCS were performed at each temperature step. For this simulation, the size of the Hdf5 file, which stores the history of the simulation, is approximately 209 MB. The running time, in a Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80 GHz with an x86_64 architecture, was 1.31 hours ± 24.48 seconds. All the information, including the thermal averages, magnetization states and dynamic data of the system, is extracted from this single file.

4.3. Dynamic behavior

Besides the static magnetic properties, the dynamic properties of a magnetic system can be extracted from a single simulation 19. Figure 4 shows the equilibrium correlation times (τ) for a ferromagnetic bulk material with generic parameters. The correlation times were computed for some of the different spin update policies implemented in Vegas. Overall, the adaptive policy produces the lowest correlation times at all temperatures, indicating that it is a very efficient update policy for this kind of system.

FIGURE 4 Equilibrium correlation times for a bulk material using adaptive, Hinzke-Nowak combinational 16 (for a small-step opening angle of 15 and 30±) and random update policies. 

4.4. Critical exponents

Phase transitions can be characterized by simulating the critical behavior of the magnetic systems. Using the finite size scaling method, it is possible to extract values for critical exponents by observing the variation of the thermal averages with the system size 19,20. Figure 5 shows log-log plots of the maxima of the susceptibility (χmax), and the first ( V1max) and second order (V2max) cumulants of the magnetization as a function of the system size (L) for a ferromagnetic 2D Ising system with generic parameters. The critical exponents γ and v are obtained from the slope of the plots in Figs. 5a and 5b, respectively.

FIGURE 5 Log-log plots of (a) the maxima of the susceptibility, and (b) the first and second order cumulants of the magnetization as a function of system size for a 2D Ising system. 

4.5. Magnetization switching processes

Simulation of magnetization switching processes are of great importance for the development of recording devices based on magnetic nanoparticles. Figures 6a and 6b show cross-sectional views of magnetization states in a ferromagnetic torus nanoring. Two magnetization states, vortex (see Fig. 6a) and reverse vortex (see Fig. 6) states, can be formed in the torus nanoring and convenientbly employed to represent the bits 0 and 1. Figure 6c shows the temperature dependence of the magnetization in the θ^ direction (Mθ) of two independent simulations where a torus nanoring with generic parameters was cooled down from a high temperature. During the cooling down process and in a short temperature range (shaded region), an external circular magnetic field was applied. In one of the simulations, the external magnetic field switches the magnetization of the torus nanoring producing a reverse vortex state (solid line), while in the other simulation, it does not switch the magnetization producing a vortex state (dashed line). This kind of behavior indicates that there is a switching probability which depends on the temperature range at which the external magnetic field is applied 8.

FIGURE 6 a) Vortex and b) reverse vortex magnetization states in a torus nanoring, and c) temperature dependence of the magnetization in the θ^ direction of a torus nanoring cooled down from a high temperature. 

4.6. Histogram and multiple histogram methods

From results obtained using Vegas, it is also possible to apply data analysis techniques such as the single and multiple histogram method. These methods allow to take a single simulation performed at some temperature and extrapolate or interpolate results to give predictions of observable quantities at other temperatures 20. Figure 7 show histograms of the energy per ion site (E/N) obtained at different temperatures in a ferromagnetic 2D Ising system with generic parameters. Using the multiple histogram method, it is possible to interpolate observable quantities, such as the energy and magnetization, at other temperatures with high accuracy.

FIGURE 7 Histograms of the energy per ion site obtained at different temperatures in a ferromagnetic 2D Ising system. 

4.7. Identification of magnetization states

The feature of Vegas that allows to store the direction of every spin moment at the last MCS is very useful to identify different magnetization states, which is difficult from the thermal average quantities alone. Figure 8 shows a cross-sectional view of different magnetization states produced in a spherical ferromagnetic nanoparticle with core kc and Néel surface ks anisotropy. The magnetization state depends on the ratio ks/kc. When ks/kc0, 100, and -100, “collinear”, “throttled”, “hedgehog” and “artichoke” states are produced, respectively 6.

FIGURE 8 a) “Collinear”, b) “throttled”, c) “hedgehog” and d) “artichoke” magnetization states produced in a ferromagnetic spherical nanoparticle with core and Néel surface anisotropy. 

Figures 2, 6a, 6b, 8 and the inset in Fig. 3a were generated using POV-Ray 21.

Worked examples, tutorials and a detailed description of the use of Vegas can be found at its web page https://pcm-ca.github.io/vegas/.

5. Perspectives

VEGAS is a software package under active development. Important improvements are planned for the sample building and data analysis libraries, increasing the flexibility in the construction of complex magnetic systems and providing different tools for the analysis and visualization of all kind of simulation results. Addition of new Hamiltonian terms, such as the dipolar and Dzyaloshinskii-Moriya interactions, are expected to be included in the Hamiltonian. Parallelization techniques are also planned to be applied to the Monte Carlo Metropolis algorithm to reduce simulation times. Because the storing of the history of the simulation generates significantly long files, and for some applications this information is not necessary, it is planned to introduce an input parameter to set the frequency of the storing of the data. This could also enhance the efficiency of the simulation by avoiding the storing of correlated data. Furthermore, it is expected to develop a functionality to resume a simulation, that has crashed for an external factor, from the data stored before the crash. Finally, in order to complement the dynamic study of a system, a functionality will be developed to allow the visualization of the time evolution of the system spin configuration. This can be achieved by storing the spin moments direction every given number of MCS at a specific temperature/field. Researchers are encouraged to contribute to the development of Vegas at its GitHub repository 22.

Acknowledgments

Simulations in this work were done using resources provided by the Open Science Grid 23, which is supported by the National Science Foundation and the U.S. Department of Energy’s Office of Science. We acknowledge support by COLCIENCIAS under the program Jóvenes Investigadores e Innovadores 2016 (Grant No. 761).

References

1. P. Nordblad, Nature Materials 14 (2015) 655-656. [ Links ]

2. T. Neuberger, B. Schöpf, H. Hofmann, M. Hofmann, and B. von Rechenberg, Journal of Magnetism and Magnetic Materials 293 (2005) 483-496. [ Links ]

3. U. Nowak, Classical Spin Models, in Handjournal of Magnetism and Advanced Magnetic Materials, vol. 100 of Lecture Notes in Physics, Chichester, UK: (John Wiley & Sons, Ltd, 2007). pp. 858-876. [ Links ]

4. D. Sabogal-Suúrez, J. Alzate-Cardona, and E. Restrepo-Parra, Physica A: Statistical Mechanics and its Applications 434 (2015) 60-67. [ Links ]

5. R. F. L. Evans, D. Bate, R. W. Chantrell, R. Yanes, and O. Chubykalo-Fesenko, Physical Review B 84 (2011) 092404. [ Links ]

6. J. Alzate-Cardona , S. Ruta, R. Chantrell, O. Arbeláez-Echeverri, and E. Restrepo-Parra , Journal of Magnetism and Magnetic Materials 424 (2017) 451-458. [ Links ]

7. J. Alzate-Cardona , D. Sabogal-Suárez, and E. Restrepo-Parra , Journal of Magnetism and Magnetic Materials 429 (2017) 34-39. [ Links ]

8. J. Alzate-Cardona, D. Sabogal-Suárez , and E. Restrepo-Parra , Journal of Magnetism and Magnetic Materials 442 (2017) 231-235. [ Links ]

9. C. Salazar-Enriquez, E. Restrepo-Parra , and J. Restrepo, Physica E: Low-dimensional Systems and Nanostructures 52 (2013) 86-91. [ Links ]

10. O. Arbeláez-Echeverri , J. Agudelo-Giraldo, and E. Restrepo-Parra , Physica E: Low-dimensional Systems and Nanostructures 83 (2016) 486-490. [ Links ]

11. E. Restrepo-Parra , C. Salazar-Enríquez, J. Londoño-Navarro, J. Jurado, and J. Restrepo , Journal of Magnetism and Magnetic Materials 323 (2011) 1477-1483. [ Links ]

12. J. Agudelo-Giraldo , E. Restrepo-Parra , and J. Restrepo , Journal of Magnetism and Magnetic Materials 391 (2015) 129-135, oct. [ Links ]

13. R. F. L. Evans , W. J. Fan, P. Chureemart, T. a. Ostler, M. O. a. Ellis, and R. W. Chantrell , Journal of Physics: Condensed Matter 26 (2014) 103202. [ Links ]

14. F. Alet, P. Dayal, A. Grzesik, and A. Honecker, J. Phys. Soc. (2005) 3. [ Links ]

15. R. Skomski, Simple Models of Magnetism. New York, (NY: Oxford University Press, 2008). [ Links ]

16. D. Hinzke and U. Nowak , Computer Physics Communications 121-122 (1999) 334-337. [ Links ]

17. O. Arbeláez-Echeverri , Vegas lattice (2018). doi:10.5281/zenodo.889714. [ Links ]

18. The HDF Group, HDFView, 2017. Available at https://support.hdfgroup.org/products/java/hdfview/, release 3.0.0. [ Links ]

19. D. P. Landau and K. Binder, A guide to Monte-Carlo similations in statistical physics. New York, (NY: Cambridge University Press, second ed., 2009). [ Links ]

20. M. Newman and G. Barkema, Monte Carlo Methods in Statistical Physics. New York, (NY: Oxford University Press, 1999). [ Links ]

21. Persistence of Vision Pty. Ltd., Persistence of Vision Raytracer (2013). Available at release 3.7.0. [ Links ]

22. J. Alzate-Cardona, D. Sabogal-Suárez, O. Arbeláez-Echeverri, and E. Restrepo-Parra, VEGAS, 2018. doi:10.5281/zenodo. 160228. [ Links ]

23. R. Pordes et al., Journal of Physics: Conference Series 78 (2007) 012057. [ Links ]

Received: April 05, 2018; Accepted: June 15, 2018

Creative Commons License This is an open-access article distributed under the terms of the Creative Commons Attribution License