User Guide of Vampire at Atom Level
User Guide of Vampire at Atom Level
User Manual
VAMPIRE
User Manual
Software version 5.0
The entire VAMPIRE package is available under the GNU General Public License.
You are free to use vampire for personal, academic and commercial research,
and to modify the source code as you wish. For details of the licence, check the
README file in the source code or consult www.gnu.org/copyleft/gpl.html.
1
Table of Contents
Table of Contents 2
Preface 9
Introducing VAMPIRE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1 Background theory 10
Atomistic Spin Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
The spin Hamiltonian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Spin Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Citations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2 Installation 14
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Binary installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Compiling from source . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Compiling on Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Compiling on Mac OSX . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Compiling on Windows . . . . . . . . . . . . . . . . . . . . . . . . . 15
Compiling for ARCHER . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Compiling for GPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4 Getting Started 19
Feature Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Input and Output Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Sample input files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2
5 Unit Cell Files 22
The unit cell file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Example: Simple Cubic System . . . . . . . . . . . . . . . . . . . . . . . . 25
3
create:interfacial-roughness-height-field-resolution . . . . . . . . . 29
create:alloy-random-seed . . . . . . . . . . . . . . . . . . . . . . . . 29
create:grain-random-seed . . . . . . . . . . . . . . . . . . . . . . . . 29
create:dilution-random-seed . . . . . . . . . . . . . . . . . . . . . . 30
create:intermixing-random-seed . . . . . . . . . . . . . . . . . . . . 30
System dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
dimensions:unit-cell-size . . . . . . . . . . . . . . . . . . . . . . . . 30
dimensions:unit-cell-size-x . . . . . . . . . . . . . . . . . . . . . . . 30
dimensions:unit-cell-size-y . . . . . . . . . . . . . . . . . . . . . . . 30
dimensions:unit-cell-size-z . . . . . . . . . . . . . . . . . . . . . . . 30
dimensions:system-size . . . . . . . . . . . . . . . . . . . . . . . . . 30
dimensions:system-size-x . . . . . . . . . . . . . . . . . . . . . . . . 30
dimensions:system-size-y . . . . . . . . . . . . . . . . . . . . . . . . 30
dimensions:system-size-z . . . . . . . . . . . . . . . . . . . . . . . . 30
dimensions:particle-size . . . . . . . . . . . . . . . . . . . . . . . . . 30
dimensions:particle-spacing . . . . . . . . . . . . . . . . . . . . . . 30
dimensions:particle-shape-factor-x . . . . . . . . . . . . . . . . . . 31
dimensions:particle-shape-factor-y . . . . . . . . . . . . . . . . . . 31
dimensions:particle-shape-factor-z . . . . . . . . . . . . . . . . . . . 31
dimensions:particle-array-offset-x . . . . . . . . . . . . . . . . . . . 31
dimensions:particle-array-offset-y . . . . . . . . . . . . . . . . . . . 31
dimensions:macro-cell-size . . . . . . . . . . . . . . . . . . . . . . . 31
Anisotropy calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
anisotropy:surface-anisotropy-threshold . . . . . . . . . . . . . . . 31
anisotropy:surface-anisotropy-nearest-neighbour-range . . . . . . 32
anisotropy:enable-bulk-neel-anisotropy . . . . . . . . . . . . . . . . 32
Dipole field calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
dipole:solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Simulation Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
sim:integrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
sim:program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
sim:enable-dipole-fields . . . . . . . . . . . . . . . . . . . . . . . . . 34
sim:enable-fmr-field . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
sim:enable-fast-dipole-fields . . . . . . . . . . . . . . . . . . . . . . 34
sim:dipole-field-update-rate . . . . . . . . . . . . . . . . . . . . . . 34
sim:time-step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
sim:total-time-steps . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
sim:loop-time-steps . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4
sim:time-steps-increment . . . . . . . . . . . . . . . . . . . . . . . . 35
sim:equilibration-time-steps . . . . . . . . . . . . . . . . . . . . . . 35
sim:simulation-cycles . . . . . . . . . . . . . . . . . . . . . . . . . . 35
sim:maximum-temperature . . . . . . . . . . . . . . . . . . . . . . . 35
sim:minimum-temperature . . . . . . . . . . . . . . . . . . . . . . . 35
sim:equilibration-temperature . . . . . . . . . . . . . . . . . . . . . 35
sim:temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
sim:temperature-increment . . . . . . . . . . . . . . . . . . . . . . . 35
sim:cooling-time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
sim:laser-pulse-temporal-profile . . . . . . . . . . . . . . . . . . . . 35
sim:laser-pulse-time . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
sim:laser-pulse-power . . . . . . . . . . . . . . . . . . . . . . . . . . 35
sim:second-laser-pulse-time . . . . . . . . . . . . . . . . . . . . . . 35
sim:second-laser-pulse-power . . . . . . . . . . . . . . . . . . . . . 35
sim:second-laser-pulse-maximum-temperature . . . . . . . . . . . 35
sim:second-laser-pulse-delay-time . . . . . . . . . . . . . . . . . . . 35
sim:two-temperature-heat-sink-coupling . . . . . . . . . . . . . . . 35
sim:two-temperature-electron-heat-capacity . . . . . . . . . . . . . 35
sim:two-temperature-phonon-heat-capacity . . . . . . . . . . . . . 36
sim:two-temperature-electron-phonon-coupling . . . . . . . . . . . 36
sim:cooling-function . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
sim:applied-field-strength . . . . . . . . . . . . . . . . . . . . . . . . 36
sim:maximum-applied-field-strength . . . . . . . . . . . . . . . . . 36
sim:equilibration-applied-field-strength . . . . . . . . . . . . . . . . 36
sim:applied-field-strength-increment . . . . . . . . . . . . . . . . . 36
sim:applied-field-angle-theta . . . . . . . . . . . . . . . . . . . . . . 36
sim:applied-field-angle-phi . . . . . . . . . . . . . . . . . . . . . . . 36
sim:applied-field-unit-vector . . . . . . . . . . . . . . . . . . . . . . 36
sim:demagnetisation-factor . . . . . . . . . . . . . . . . . . . . . . . 36
sim:integrator-random-seed . . . . . . . . . . . . . . . . . . . . . . 36
sim:constraint-rotation-update . . . . . . . . . . . . . . . . . . . . . 37
sim:constraint-angle-theta . . . . . . . . . . . . . . . . . . . . . . . 37
sim:constraint-angle-theta-minimum . . . . . . . . . . . . . . . . . 37
sim:constraint-angle-theta-maximum . . . . . . . . . . . . . . . . . 37
sim:constraint-angle-theta-increment . . . . . . . . . . . . . . . . . 37
sim:constraint-angle-phi . . . . . . . . . . . . . . . . . . . . . . . . . 37
sim:constraint-angle-phi-minimum . . . . . . . . . . . . . . . . . . . 37
sim:constraint-angle-phi-maximum . . . . . . . . . . . . . . . . . . 37
5
sim:constraint-angle-phi-increment . . . . . . . . . . . . . . . . . . 37
sim:monte-carlo-algorithm . . . . . . . . . . . . . . . . . . . . . . . 37
sim:checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
sim:preconditioning-steps . . . . . . . . . . . . . . . . . . . . . . . . 37
Data output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
output:time-steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
output:real-time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
output:temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
output:applied-field-strength . . . . . . . . . . . . . . . . . . . . . . 38
output:applied-field-unit-vector . . . . . . . . . . . . . . . . . . . . 38
output:applied-field-alignment . . . . . . . . . . . . . . . . . . . . . 38
output:material-applied-field-alignment . . . . . . . . . . . . . . . . 38
output:magnetisation . . . . . . . . . . . . . . . . . . . . . . . . . . 39
output:magnetisation-length . . . . . . . . . . . . . . . . . . . . . . 39
output:mean-magnetisation-length . . . . . . . . . . . . . . . . . . 39
output:mean-magnetisation . . . . . . . . . . . . . . . . . . . . . . 39
output:material-magnetisation . . . . . . . . . . . . . . . . . . . . . 39
output:material-mean-magnetisation-length . . . . . . . . . . . . . 39
output:material-mean-magnetisation . . . . . . . . . . . . . . . . . 39
output:total-torque . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
output:mean-total-torque . . . . . . . . . . . . . . . . . . . . . . . . 40
output:constraint-phi . . . . . . . . . . . . . . . . . . . . . . . . . . 40
output:constraint-theta . . . . . . . . . . . . . . . . . . . . . . . . . 40
output:material-mean-torque . . . . . . . . . . . . . . . . . . . . . . 40
output:mean-susceptibility . . . . . . . . . . . . . . . . . . . . . . . 40
output:mean-material-susceptibility . . . . . . . . . . . . . . . . . . 41
output:electron-temperature . . . . . . . . . . . . . . . . . . . . . . 41
output:phonon-temperature . . . . . . . . . . . . . . . . . . . . . . 41
output:total-energy . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
output:mean-total-energy . . . . . . . . . . . . . . . . . . . . . . . . 41
output:anisotropy-energy . . . . . . . . . . . . . . . . . . . . . . . . 41
output:mean-anisotropy-energy . . . . . . . . . . . . . . . . . . . . 41
output:exchange-energy . . . . . . . . . . . . . . . . . . . . . . . . . 41
output:mean-exchange-energy . . . . . . . . . . . . . . . . . . . . . 41
output:applied-field-energy . . . . . . . . . . . . . . . . . . . . . . . 41
output:mean-applied-field-energy . . . . . . . . . . . . . . . . . . . 41
output:magnetostatic-energy . . . . . . . . . . . . . . . . . . . . . . 41
output:mean-magnetostatic-energy . . . . . . . . . . . . . . . . . . 41
6
output:mpi-timings . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
output:gnuplot-array-format . . . . . . . . . . . . . . . . . . . . . . 41
output:output-rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
output:precision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
output:fixed-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Configuration output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
config:atoms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
config:atoms-output-rate . . . . . . . . . . . . . . . . . . . . . . . . 42
config:atoms-min-x . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
config:atoms-min-y . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
config:atoms-min-z . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
config:atoms-max-x . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
config:atoms-max-y . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
config:atoms-max-z . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
config:macro-cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
config:macro-cells-output-rate . . . . . . . . . . . . . . . . . . . . . 43
config:output-format . . . . . . . . . . . . . . . . . . . . . . . . . . 43
config:output-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
config:output-nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7
material:material-element . . . . . . . . . . . . . . . . . . . . . . . 50
material:geometry-file . . . . . . . . . . . . . . . . . . . . . . . . . . 50
material:alloy-host . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
material:alloy-fraction . . . . . . . . . . . . . . . . . . . . . . . . . . 50
material:minimum-height . . . . . . . . . . . . . . . . . . . . . . . . 50
material:maximum-height . . . . . . . . . . . . . . . . . . . . . . . . 51
material:core-shell-size . . . . . . . . . . . . . . . . . . . . . . . . . 51
material:interface-roughness . . . . . . . . . . . . . . . . . . . . . . 51
material:intermixing . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
material:density . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
material:continuous . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
material:fill-space . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
material:couple-to-phononic-temperature . . . . . . . . . . . . . . 52
material:temperature-rescaling-exponent . . . . . . . . . . . . . . . 53
material:temperature-rescaling-curie-temperature . . . . . . . . . . 53
material:non-magnetic . . . . . . . . . . . . . . . . . . . . . . . . . 53
Example material files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Bibliography 54
8
Introducing VAMPIRE
The VAMPIRE project is still very much under active development, with an open
development of all code features. The features are always available during the
development stages from the develop branch of the code, but with the caveat that
they are not always fully reliable. Feedback of any bugs or errors to the VAMPIRE
developers is always welcome, as well as any feature requests or enhancements.
We hope that as the VAMPIRE project develops it will become a useful tool for
the magnetics community for specialists and non-specialists alike.
9
1 Background theory
While the underlying theory behind the atomistic spin model is well known in
the scientific literature, in the following a very brief overview of the fundamental
theory is presented for the benefit of those who do not wish to study the methods
in great detail. If more information is required then a comprehensive review of
the methods implemented in VAMPIRE is available from the project website.
10
The Spin Hamiltonian
The basis of the atomistic spin model is the spin Hamiltonian, which describes
the fundamental spin-dependent interactions at the atomic level (neglecting
the effects of potential and kinetic energy and electron correlations). The spin
Hamiltonian is typically defined as
H =− Jij Si · Sj − k2 Sz2 − µS Bapp · Si
i<j i i
Spin Dynamics
The spin Hamiltonian describes the energetics of the system, but says nothing
about the dynamic behaviour. For that the Landau-Lifshitz-Gilbert (LLG) equation
is used to describe the dynamics of atomic spins. The LLG is given by
∂Si γ
=− [Si × Bieff + λSi × (Si × Bieff )] (1.1)
∂t (1 + λ2 )
11
where Si is a unit vector representing the direction of the magnetic spin moment
of site i, γ is the gyromagnetic ratio and Bieff is the net magnetic field on each
spin. The atomistic LLG equation describes the interaction of an atomic spin
moment i with an effective magnetic field, which is obtained from the negative
first derivative of the complete spin Hamiltonian, such that:
1 ∂H
Bieff = − (1.2)
µS ∂Si
where µS is the local spin moment. The inclusion of the spin moment within
the effective field is significant, in that the field is then expressed in units of
Tesla, given a Hamiltonian in Joules. The LLG is integrated numerically using the
Heun numerical scheme, which allows the time evolution of the spin system to be
simulated.
Citations
If you use VAMPIRE for your research, it is helpful to acknowledge the authors of
the code by citing relevant papers and include a statement in the paper such as
the following:
The simulations in this work made use of the VAMPIRE software package [1]
In addition, it is recommended for reproducibility that you include the githash for
the specific version of the code, which enables someone to checkout the specific
version of the code used for the simulations. [1] VAMPIRE software package ver-
12
If you use the constrained Monte Carlo method, in addition please cite:
Constrained Monte Carlo method and calculation of the temperature dependence of mag-
netic anisotropy
P. Asselin, R. F. L. Evans, J. Barker, R. W. Chantrell, R. Yanes, O. Chubykalo-Fesenko, D. Hinzke
and U. Nowak
Phys. Rev. B. 82, 054415 (2010)
13
2 Installation
This chapter covers the requirements, installation and support for VAMPIRE on
different platforms.
System Requirements
VAMPIRE is designed to be generally portable and compilable on Linux, Unix, Mac
OSX and Windows with a range of different compilers. By design the software has
a very minimal dependence on external libraries to aid compilation on the widest
possible range of platforms without needing to first install and configure a large
number of other packages. VAMPIRE is designed to be maximally efficient on high
performance computing clusters and scalable to thousands of processors, and as
such is the recommended platform if you have access to appropriate resources.
Hardware Requirements
VAMPIRE has been successfully tested on a wide variety of x86 and power PC pro-
cessors. Memory requirements are generally relatively modest for most systems,
though larger simulations will require significantly more memory. VAMPIRE is
generally computationally limited, and so the faster the clock speed and number
of processor cores the better.
Binary installation
Compiled binaries of the latest release version are available to download from:
https://vampire.york.ac.uk/download/
for Linux and MacTM OS X platforms. For the Linux and Mac OS X releases,
a simple installation script install.sh installs the binary in /opt/vampire/ and
appends the directory to your environment path. On Windows the recommended
method is to use the Linux subsystem for windows developer feature which adds
a linux subsystem that is capable of running the standard linux binary. A copy of
qvoronoi is integrated into VAMPIRE for generating granular structures.
14
Compiling from source
The best way to get the vampire source code is using git, a distributed version
control program which enables changes in the code to be tracked. Git is readily
available on linux (git-core package on ubuntu) and Mac (via MacPorts). To get
vampire from the Github repository checkout your own copy of the repository
using:
This way, updates to the code can be easily merged with the downloaded
version. Compiling is generally as easy as running make in Unix platforms. In
addition, on a multicore processor compilation can be parallelised using the -j Nt
option, where Nt is the number of threads to use.
Compiling on Linux
In order to compile in linux, a working set of development tools are needed, which
on ubuntu includes the packages build-essential and g++. VAMPIRE should compile
without issue following a simple make command in the source directory.
For the parallel version, a working installation of openmpi is recommended,
which must usually include a version of the development tools (openmpi-bin and
openmpi-dev packages on ubuntu). Compilation is usually straightforward using
make parallel.
Compiling on Windows
The recommended way to use vampire on Windows is to install Linux subsystem
for windows 10 (see https://docs.microsoft.com/en-us/windows/wsl/install-win10).
Older versions of windows are no longer supported. Once installed, you can
download the serial linux binary as for linux and run as normal from the command
line.
15
Compiling for ARCHER/Cray systems
ARCHER is the UK national supercomputer and includes custom compilers de-
veloped by Cray Inc. However, performance is generally better for the gnu
compiler collection and so there is an optimized makefile option for compilation
on the ARCHER and similar Cray XC30 systems. To compile, you need to swap
the environment to the GNU compiler suite using module swap PrgEnv-cray
PrgEnv-gnu. You can then compile with make parallel-archer which will compile a
parallel binary.
16
3 Running the code
To run the code in all version, you first need to specify an input file and material
file, which must reside in the same directory where you run the code. Example
files are available in the source code distribution, or from the Download section
of the website (http://vampire.york.ac.uk/download/index.html).
./vampire-serial
will run the code in serial mode. For the parallel mode with openmpi,
will run the code in parallel mode, on 2 CPUs. Increasing the -np argument will
run on more cores.
Windows
Once you have installed Linux subsystem for Windows, you can run the code by
launching bash for windows and following the instructions for Unix/Linux systems
above.
Log file
When you run the program it will output some program information to screen to
indicate that the program is running listing some details about the developers and
some steps on the program execution. There are also options to tell the program
to output simulation data to screen to see how the simulation is progressing. In
addition, a log file is produced which provides more detail about the execution of
the program and progress including timestamps, and errors that may occur and
17
certain performance metrics, such as time to update the dipole field or output a
spin configuration file. A sample screen output header from the program is shown
below.
_
(_)
__ ____ _ _ __ ___ _ __ _ _ __ ___
\ \ / / _` | '_ ` _ \| '_ \| | '__/ _ \
\ V / (_| | | | | | | |_) | | | | __/
\_/ \__,_|_| |_| |_| .__/|_|_| \___|
| |
|_|
Licensed under the GNU Public License(v2). See licence file for details.
Vampire includes a copy of the qhull library from C.B. Barber and
The Geometry Center and may be obtained via http from www.qhull.org.
18
4 Getting Started
Feature Overview
The features of the VAMPIRE code are split into three main categories: material
parameters, structural parameters, and simulation parameters. Details of these
parameters are given in the following chapters, but between them they define the
parameters for a particular simulation.
Materials
Material parameters essentially define the magnetic properties of a class of
atoms, including magnetic moments, exchange interactions, damping constants
etc. VAMPIRE includes support for up to one hundred defined materials, and
material parameters control the simulation of multilayers, random alloys, core
shell particles and lithographically defined patterns.
Structures
Structural parameters define properties such as the system size, shape, particle
size, or voronoi grain structures. In combination with material parameters they
essentially define the system to be simulated.
Simulations
VAMPIRE includes a number of built-in simulations for determining the most com-
mon magnetic properties of a system, for example Curie temperature, hysteresis
loops, or even a time series. Additionally the parameters for these simulations,
such as applied field, maximum temperature, temperature increment, etc. can
be set.
19
Input and Output Files
VAMPIRE requires at least two files to run a simulation, the input file and the
material file. The input file defines all the properties of the simulated system,
such as the dimensions or particle shape, as well as the simulation parameters
and program output. The material file defines the properties of all the materials
used in the simulation, and is usually given the .mat file extension. A sample
material file Co.mat is included with the code which defines a minimum set of
parameters for Co.
The output of the code includes a main output file, which records data such
as the magnetisation, timesteps, temperature etc. The format of the output file
is fully customisable, so that the amount of output data is limited to what is
useful. In addition to the output file, the other main available outputs are spin
configuration files, which with post-processing allow output of snapshots of the
magnetic configurations during the simulation.
input
#------------------------------------------
# Sample vampire input file to perform
# benchmark calculation for version 5.0
#
#------------------------------------------
#------------------------------------------
# Creation attributes:
#------------------------------------------
create:crystal-structure = sc
#------------------------------------------
# System Dimensions:
#------------------------------------------
dimensions:unit-cell-size = 3.54 !A
dimensions:system-size-x = 7.7 !nm
dimensions:system-size-y = 7.7 !nm
dimensions:system-size-z = 7.7 !nm
#------------------------------------------
# Material Files:
#------------------------------------------
20
material:file = Co.mat
#------------------------------------------
# Simulation attributes:
#------------------------------------------
sim:temperature = 300.0
sim:time-steps-increment = 1000
sim:total-time-steps = 10000
sim:time-step = 1 !fs
#------------------------------------------
# Program and integrator details
#------------------------------------------
sim:program = benchmark
sim:integrator = llg-heun
#------------------------------------------
# data output
#------------------------------------------
output:real-time
output:temperature
output:magnetisation
output:magnetisation-length
screen:time-steps
screen:magnetisation-length
Co.mat
#===================================================
# Sample vampire material file version 5
#===================================================
#---------------------------------------------------
# Number of Materials
#---------------------------------------------------
material:num-materials=1
#---------------------------------------------------
# Material 1 Cobalt Generic
#---------------------------------------------------
material[1]:material-name = Co
material[1]:damping-constant = 1.0
material[1]:exchange-matrix[1] = 11.2e-21
material[1]:atomic-spin-moment = 1.72 !muB
material[1]:uniaxial-anisotropy-constant = 1.0e-24
material[1]:material-element = Ag
material[1]:minimum-height = 0.0
material[1]:maximum-height = 1.0
21
5 Unit Cell Files
VAMPIRE provides a selection of built-in unit cell crystal structures which can be
specified with the create:crystal-structure keyword. However, there are many
more crystal structures and magnetic materials than the code could possibly
support, and so an advanced mode is available where the user can specify any
atomic structure and exchange interactions which are then imported into the
code and can be used to generate large systems and/or cut into the standard
geometric shapes. It is also possible to simulate complex non-periodic structures
such as nanoparticles obtained from molecular dynamics simulations with the
same approach. The unit cell file is specified in the main input file using the
keyword:
material:unit-cell-file = file.ucf
22
11 ...
12 # Interactions
13 num_interactions [exchange_type]
14 IID i j dx dy dz | Jij
| Jx Jy Jz
| Jxx Jxy Jxz Jyx Jyy Jyz Jzx Jzy Jzz
In general this format now allows the specification of any system we want, but
clearly complex multi- layered systems require large file sizes. Working through
line by line:
23
1 # defines a comment line which is ignored by the parser – so
these lines are optional.
2 ucx, ucy and ucz are the unit cell size in angstroms.
4−6 These lines define the shape of the unit cell to be replicated,
for cubic cells this is the unit matrix. Note that at present only
orthogonal lattice vectors are supported by the code due to
complexities relating to parallelisation.
8 Define the number of atoms and number of materials in
the unit cell. Materials allow grouping of atoms by material,
and have the same parameters (ie moment, damping, etc).
Material specification affects the way statistics are collected
and displayed, and also allows the simple creation of ordered
alloys. The list of atoms must immediately follow this line.
9 − 10 These lines define the atoms in each unit cell and their
parameters:
. atom_id Number identifier of atom in unit cell, starts at 0.
. cx,cy,cz unit cell coordinates as a fraction of unit cell size
. mat_id material id of the atom, integer starting at 0
. cat_id category id of the atom, used for calculating properties
not categorised by material, eg height or sublattice. Integer
starting at 1.
. hcat_id Height category id used for calculating properties as a
function of height
12 Defines the total number of interactions for the unit cell and
the expected type of exchange (isotropic, vectorial, tensorial,
normalized-isotropic, normalized-vectorial, normalized-ten-
sorial). No lines are allowed between this line and the list of
interactions.
13 These lines list all the interactions.
. IID Interaction ID is only used for accounting purposes, starts
at 0.
. i Atom number of atom in local unit cell
. j Atom number of atom in local/remote unit cell
. dxuc,dyuc,dzuc relative integer coordinates of unit cell for
atom j
. Jij, Jxx... Exchange values specified in Joules.
24
Example: Simple Cubic System
As an example, here is a complete sample file for a simple cubic system with a
single material.
Here only easy axis anisotropy and isotropic exchange are defined. Since there is
only a single atom in the unit cell, all i-j pairs are 0-0, but over the neighbouring unit
cells ±1 in all directions. This generally leads to a large number of interactions for
increasing numbers of atoms in the unit cell, and in future I will write a program
to generate some different lattices and interaction lists.
25
6 Input File Command Reference
The input file can accept a large number of commands, and this chapter gives a
comprehensive list of all the options and what they do. Commands are in the form
category:keyword=value, where value can be optional depending on the keyword.
System Generation
The following commands control generation of the simulated system, including
dimensions, crystal structures etc.
create:full Uses the entire generated system without any truncation or consid-
eration of the create:particle-size parameter. create:full should be used when
importing a complete system, such as a complete nanoparticle and where a
further definition of the system shape is not required. This is the default if no
system truncation is defined.
26
create:particle Defines the creation of a single particle at the centre of the
defined system. If create:particle-size is greater than the system dimensions then
the outer boundary of the particle is truncated by the system dimensions.
27
structure.
create:single-spin flag Overrides all create options and generates a single iso-
lated spin.
create:fill-core-shell-particles
28
create:interfacial-roughness specifies that a global roughness is applied to the
material height specification (eg from a non-flat substrate).
create:interfacial-roughness-seed-radius
create:interfacial-roughness-seed-radius-variance
create:interfacial-roughness-mean-height
create:interfacial-roughness-maximum-height
create:interfacial-roughness-height-field-resolution
29
create:dilution-random-seed integer [default 683614233] Sets the random
seed for the psuedo random number generator for diluting the atoms, leading to
a different realization of a dilute material. Note that different numbers of cores
will change the structure that is generated.
System dimensions
The commands here determine the dimensions of the generated system.
dimensions:system-size-x Defines the total size if the system along the x-axis.
dimensions:system-size-y Defines the total size if the system along the y-axis.
dimensions:system-size-z Defines the total size if the system along the z-axis.
dimensions:particle-size = float Defines the size of particles cut from the bulk
crystal.
30
dimensions:particle-shape-factor-x = float [0.001-1, default 1.0] Modifies the
default particle shape to create elongated particles. The selected particle shape
is modified by changing the effective particle size in the x direction. This property
scales the as a fraction of the particle-size along the x-direction.
Anisotropy calculation
The following commands control the calculation of the magnetic anisotropy en-
ergy for the system. anisotropy:surface-anisotropy-threshold integer default
[native] Determines minimal number of neighbours to classify as surface atom.
The default value is the number of neighbours specified by the crystal or unit cell
file. You can set this as a lower threshold.
31
anisotropy:surface-anisotropy-nearest-neighbour-range float default [∞] Sets
the interaction range for the nearest neighbour list used for the surface anisotropy
calculation.
macrocell
tensor
Simulation Control
The following commands control the simulation, including the program, maxi-
mum temperatures, applied field strength etc.
llg-heun
monte-carlo
llg-midpoint
32
constrained-monte-carlo
hybrid-constrained-monte-carlo
sim:program = benchmark program which integrates the system for 10,000 time
steps and exits. Used primarily for quick performance comparisons for different
system architectures, processors and during code performance optimisation.
33
temperature in steps of sim:temperature-increment. At each temperature the
system is first equilibrated for sim:equilibration-steps time steps and then a
statistical average is taken over sim:loop-time-steps. In general the Monte Carlo
integrator is the optimal method for determining the Curie temperature, and typi-
cally a few thousand steps is sufficient to equilibrate the system. To determine the
Curie temperature it is best to plot the mean magnetization length at each tem-
perature, which can be specified using the output:mean-magnetisation-length
keyword. Typically the temperature dependent magnetization can be fitted using
the function
T β
m(T ) = 〈 S〉 = 1 − (6.1)
i
TC
sim:program = field-cooling
sim:program = temperature-pulse
sim:program = cmc-anisotropy
sim:enable-fmr-field
sim:time-step
sim:total-time-steps
sim:loop-time-steps
34
sim:time-steps-increment
sim:equilibration-time-steps
sim:simulation-cycles
sim:maximum-temperature
sim:minimum-temperature
sim:equilibration-temperature
sim:temperature
sim:temperature-increment
sim:cooling-time
sim:laser-pulse-time
sim:laser-pulse-power
sim:second-laser-pulse-time
sim:second-laser-pulse-power
sim:second-laser-pulse-maximum-temperature
sim:second-laser-pulse-delay-time
sim:two-temperature-heat-sink-coupling
sim:two-temperature-electron-heat-capacity
35
sim:two-temperature-phonon-heat-capacity
sim:two-temperature-electron-phonon-coupling
sim:applied-field-strength
sim:maximum-applied-field-strength
sim:equilibration-applied-field-strength
sim:applied-field-strength-increment
sim:applied-field-angle-theta
sim:applied-field-angle-phi
sim:applied-field-unit-vector
36
sim:constraint-rotation-update
sim:constraint-angle-theta-maximum
sim:constraint-angle-phi
sim:constraint-angle-phi-minimum
sim:constraint-angle-phi-maximum
sim:constraint-angle-phi-increment
sim:monte-carlo-algorithm
spin-flip
uniform
angle
hinzke-nowak
37
to develop a Boltzmann spin distribution prior to the main program starting. The
method works in serial and parallel mode and is especially efficient for materials
with low Gilbert damping. The preconditioning steps are applied after loading a
checkpoint, allowing you to take a low temperature starting state and thermally
equilibrate it.
Data output
The following commands control what data is output to the output file. The
order in which they appear is the order in which they appear in the output file.
Most options output a single column of data, but some output multiple columns,
particularly vector data or parameters related to materials, where one column per
material is output.
output:time-steps outputs the number of time steps (or Monte Carlo steps)
completed during the simulation so far.
38
output:magnetisation outputs the instantaneous magnetization of the system.
The data is output in four columns mˆx , mˆy , m̂z , |m| giving the unit vector direction
of the magnetization and normalized length of the magnetization respectively.
The normalized length of the magnetization |m| = | i µi Si |/ µi is given by the
sum of all moments in the system assuming ferromagnetic alignment of all spins.
Note that the localized spin moments µi are taken into account in the summation.
Note that obtaining the actual macroscopic magnetization length from this
data is not trivial, since it is necessary to know how many atoms of each material
are in the system. This information is contained within the log file (giving the
fraction of atoms which make up each material). However it is usual to also output
the total normalized magnetization of the system to give the relative ordering of
the entire system.
39
In equilibrium the total torque will be close to zero, but is useful for testing
convergence to an equilibrium state for zero temperature simulations.
output:constraint-phi outputs the current angle of constraint from the z-axis for
constrained simulations using either the Lagrangian Multiplier Method (LMM) or
Constrained Monte Carlo (CMC) integration methods.
40
micromagnetic Landau-Lifshitz-Bloch (LLB) equation.
output:total-energy
output:mean-total-energy
output:anisotropy-energy
output:mean-anisotropy-energy
output:exchange-energy
output:mean-exchange-energy
output:applied-field-energy
output:mean-applied-field-energy
output:magnetostatic-energy
output:mean-magnetostatic-energy
output:mpi-timings
output:gnuplot-array-format
41
written to the output file or printed to screen. By default VAMPIRE calculates
statistics once every sim:time-steps-increment number of time steps. Usually you
want to output the updated statistic (e.g. magnetization) every time, which is the
default behaviour. However, sometimes you may want to plot the time evolution
of an average, where you want to collect statistics much more frequently than
you output to the output file, which is controlled by this keyword. For example,
if output:output-rate = 10 and sim:time-steps-increment = 10 then statistics (and
average values) will be updated once every 10 time steps, and the new statistics
will be written to the output file every 100 time steps.
Configuration output
These options enable the output of spin configuration snapshots during the
simulation. The configurations can then be visualised using povray or other
software generated with the vampire data converter (vdc) utility.
The following options allow a cubic slice of the total configuration data to
be output to the configuration file. This is useful for reducing disk usage and
processing times, especially for large sale simulations.
42
config:atoms-minimum-y determines the minimum y value (as a fraction of the
total system dimensions) of the data slice to be outputted to the configuration file.
config:macro-cells-output-rate
determines the rate configuration files are outputted as a multiple of sim:time-steps-increment.
text
binary
The text option outputs data files as plain text, allowing them to be read by a wide
range of applications and hence the highest portability. There is a performance
cost to using text mode and so this is recommended only if you need portable
data and will not be using the vampire data converter (vdc) utility. The binary
option outputs the data in binary format and is typically 100 times faster than
text mode. This is important for large-scale simulations on large numbers of
processors where the data output can take a significant amount of time. Binary
files are generally not compatible between operating systems and so the vdc tools
generally needs to be run on the same system which generated the files.
43
file-per-node
file-per-process
mpi-io
Using this option is important for obtaining good performance on Tier-0 (Euro-
pean) and Tier-1 (National) supercomputers for simulations typically using more
than 1000 cores. Large scale supercomputers have high performance parallel file
systems with a peak bandwidth typically over 10 GB/s. VAMPIRE supports three
different modes of data output: file-per-node (FPN), file-per-process (FPP) and
mpi-io. Note that high performance requires config:output-format = binary to be
set to output the data in binary format, but this is not default behaviour for easier
data analysis and portability for the casual user.
The first (default) option of file-per-node collates data from different processes
onto a defined number of config:output-nodes before outputting to disk, with the
total data spread out with a different file per output node. This has good perfor-
mance for medium-scale simulations and above (>100 cores) with a reasonable
number of output nodes (typically 1 per physical node). Small simulations (<100
cores) benefit from a larger number of output processes. to maximise bandwidth
fro the independent write operations. For typical simulations with > 40,000 atoms
per core striping of the parallel file system improves performance, while for less
atoms striping can be detrimental and should be disabled. This option is also best
for distributed file systems, typical on local resources such as university clusters.
The file-per-process option means every process in the simulation outputs its
own data to disk independent of all others. The option is available for advanced
tuning but is generally not recommended for typical simulations due to the large
number of small files generated, complicating data analysis and generally having
very poor performance.
The mpi-io option uses the MPI library routines to output a large, single
shared file. Enabling this option automatically forces binary data output. In
general this option gives good performance for large systems with a single file
for each configuration snapshot. In general this gives worse performance than
the file-per-node option except for the largest system sizes.
44
maximum number of processes in the simulation.
45
7 Material File Command Reference
The material file defines all the magnetic properties of the materials used in the
simulation, including exchange, anisotropy, damping etc. Material properties are
defined by an index number for each material, starting at one. Material properties
are then defined as follows:
46
damping), while for realistic dynamics the damping should be representative of
the material. Typical values range from 0.005 to 0.1 for most materials.
47
where Si is the local spin direction and ei is the easy axis unit vector. Positive
values of k2 give a preferred easy axis orientation, and negative v alues give
a preferred easy plane orientation of the spin perpendicular to the easy axis
direction.
material[1]:uniaxial-anisotropy-direction = 0,0,1
The unit vector is self normalising and so the direction can be expressed in
standard form (with length r = 1) or in terms of crystallographic directions, e.g.
[111].
48
material[1]:uniaxial-anisotropy-direction = random
which allocates each atom in the material a random anisotropy vector in three
dimensions. This may applicable to truly amorphous Rare earth alloys where no
local anisotropy direction is preferred.
material[1]:uniaxial-anisotropy-direction = random-grain
which allocates each atom in the material a random anisotropy vector in three
dimensions, giving all atoms of the material in each grain a different anisotropy
vector. Both random anisotropies are compatible with higher order uniaxial
anisotropy but not lattice anisotropy or cubic anisotropy.
where ks is the surface anisotropy constant between atoms i and j and rij is a
unit vector between sites i and j.
49
sufficient for most problems.
50
height of the material as a fraction of the total height z of the system. By defining
different minimum and maximum heights it is easy to define a multilayer system
consisting of different materials, such as FM/AFM, or ECC recording media.
system-max-z = 1
maximum 2
material 2
minimum 2
maximum 1
material 1
minimum 1
system-min-z = 0
Figure 7.1: Schematic diagram showing definition of a multilayer system consisting of two
materials. The minimum-height and maximum-height are defined as a fraction of the total
z-height of the system.
The heights of the material are applied when the crystal is generated, and so in
general further geometry changes can also be applied, for example cutting a cylin-
der shape or voronoi granular media, while preserving the multilayer structure.
The code will also print a warning if materials overlap their minimum/maximum
ranges, since such behaviour is usually (but not always) undesirable.
51
a b core-shell-size
maximum-height 2
material 2
material 2
core-shell-size
particle-size
material 1 maximum-height 1
material 1
minimum-height
particle-size
Figure 7.2: (a) Schematic diagram showing definition of a nanoparticle with two materials with
different radii. core-shell-size is defined as a fraction of the particle radius (particle-size/2).
(b) Schematic diagram showing side-on iew of a cylinder, consisting of two materials with
different core-shell-size and different maximum heights. Part of the core material is exposed,
while the other part is covered with the other material.
a fraction of the total system height, and so small values are usually used. The
intermixing defines the mixing of material index into the host material, and can
be asymmetric (a -> b != b -> a).
52
material:temperature-rescaling-exponent = float [ 0-10 : default 1.0 ] defines
the exponent when rescaled temperature calculations are used. The higher the
exponent the flatter the magnetisation is at low temperature. This parameter
must be used with temperature-rescaling-curie-temperature to have any effect.
53
Bibliography
54