Simulate magnetic materials with atomic resolution

From Ã…ngstroms to micrometres

Whatever you need to model, vampire makes it easy for you to build, simulate, and analyse your magnetic system.

Magnetic materials at the atomic scale

Most magnetic simulations today utilise micromagnetics to predict and understand the behaviour of magnetic nano materials. However developments in the complexity of magnetic materials and the increasing importance of complex physical effects such as exchange bias, spin transport, and heat assisted magnetic recording push the boundaries of what can be realistically modelled with micromagnetics. Atomistic simulation bridges the gap between micromagnetics approaches and electronic structure by treating a magnetic material at the natural atomic length scale. Vampire is a free, open source software package which makes atomistic simulations of magnetic materials easily accessible to both theoretical and experimental researchers alike.

Easy to use

Vampire uses a simple text file format to define and run an atomistic simulation. A system can often be defined using a single command, enabling rapid prototyping of your magnetic system, while built-in simulation types cover the most common caculations. A wide range of data from the simulation can also be generated, allowing a detailed analysis of your system.


Designed from the ground up to use parallel processors, vampire brings atomistic simulation within reach of anyone with a desktop PC. More challenging problems can be tackled using clusters utilising tens to thousands of processors working in parallel, meaning problems which take months on a desktop PC can be solved in a matter of hours.


The modus operandi of vampire is flexibility, with the intrinsic ability to simulate nano articles, granular systems, multilayer recording media, and much more. In addition to generic systems, vampire also supports the import of spin hamiltonians calculated using density functional theory, enabling multi scale simulations using ab-initio parameters.


The behaviour of complex materials used in devices today is often difficult to understand, and so the ability to visualise what happens to a system during a simulation is an important tool in getting to the heart of a problem. Vampire can output atomic configurations to POVRay™ format which can be rendered to produce publication quality 3D graphics, which enables you to see what is really happening at the atomic level in addition to having other data.

Open source

Vampire is completely open source, allowing for independent scrutiny of the implementation of its algorithms and the ability for anyone to contribute to its functionality, which is actively encouraged. The code is also completely free to use for personal, academic or commercial purposes.

Atomic system generation

Generating a system to simulate often requires the use of external software which then has to be tailored to the right file format. Vampire integrates system generation facilities at its core to make it incredibly easy to define your system and start producing results immediately.

Crystal structures

Materials posess a wide variety of crystal structures, and in magnetism these can have significant effects on the macroscopic magnetic properties. Vampire includes most common crystal structures, making it simple to define a different atomic geometry.


Nanoparticles are particularly interesting due to their high surface to volume ratio leading to a myriad of different magnetic effects and phenomena. In addition to simple geometric shapes such as spheres, cylinders and cubes, you can also define hybrid stuctures such as core-shell particles.

Granular materials

Most industrial magnetic materials utilise granular magnetic structures, where single domain particles are desirable. Vampire includes routines to easily generate granular structures using a voronoi tessellation and also uniform arrays of particles such as nanodots.


Many magnetic devices and systems interest consist of multiple discrete layers and Vampire has a number of capabilities to perform multilayer simulations with many different materials. Such simulations are ideally suited to modelling exchange bias and other interface effects. In addition to perfect multilayers, there are routines for generating rough interfaces and intermixing between different materials.


Vampire includes the ability to generate user-defined shapes, in a similar way to lithography. Such lithographic features can be formed from different materials to generate more complex systems or devices.

User defined

In addition to all of the built-in systems, it is also easy to import your own custom structures, and perform atomistic simulation on them. Taking a 'bucket of spins' you can assign a hamiltonian to each atom and investigate truly complex magnetic systems with ease.

State of the art simulation methods

Vampire implements a wide variety of simulation methods to enable simulations of spin dynamics and equilibrium properties. In combination with standard programs vampire provides a wide range of tools to simulate and characterise any magnetic system.

Spin dynamics

Spin dynamics models the time evolution of a magnetic system, which includes effects such as precessional switching, ultrafast processes and dynamic hysteresis loops. Most spin dynamics simulations utilise the Landau-Lifshitz-Gilbert equation of motion. This is implemented in vampire in conjunction with Langevin dynamics to enable simulation in the whole temperature range including around and above the Curie temperature. The Heun numerical scheme is fully implemented, with a midpoint scheme currently in beta.

Monte Carlo Methods

Monte Carlo methods use a sampling algorithm to explore the phase space of a system, and is particularly well suited to the calculation of equilibrium properties. Vampire implements a number of Monte Carlo sampling algorithms, including Ising, Gaussian and random. A combinational algorithm, using a mixture of the different sampling methods gives efficient phase-space sampling for most systems.

Constrained Monte Carlo

Constrained Monte Carlo metropolis is an algorithm which allows the calculation of equilibrium temperature dependent magnetic properties while constraining the direction of magnetisation. This is particularly useful for the calculation of magnetic anisotropy, effective exchange and energy barriers, all as a function of temperature. The method relies on a standard metropolis move with the addition of a compensation spin which preserves the magnetisation direction.

Dynamic temperature rescaling

Vampire includes dynamic temperature rescaling which overcomes a major limitation of classical models. With this new algorithm spin models can quantitatively reproduce the expeimentally observed temperature dependent magnetization and temperature dependent parameters such as the domain wall width, anisotropy and magnetization dynamics.

Parallel Monte Carlo preconditioning

Vampire 5.0 now includes a Monte Carlo preconditioner that quickly achieves a thermal equilibrium spin state for spin dynamics simulations. This feature is particularly useful for materials with low damping such as YIG where dynamic equilibration is slow due to the low Gilbert damping parameter.

Magnetostatic interactions

Magnetostatic interactions drive magnetic behaviour for systems such as thin films and nanodots, and vampire uses a computationally efficient method of incorporating these effects for even the largest systems. The interactions are treated in a micromagnetic approximation, where atoms are grouped into a macrocell where the magnetisation is uniform. The macrocells interact to give a local demagnetisation field which is applied uniformly to all atoms in the cell. This process is also parallelised when running on multiple processes ensuring excellent performance without compromising on accuracy.

Comprehensive data analysis

In complex systems, trying to understand the physical behaviour from macroscopic properties is often challenging. In order to help you understand the physics behind the problem vampire can output data for almost any defined subset of your system. With grain specific magnetisation data in a granular system you can see what drives the reversal behaviour of a specific grain. Material specific data allows you to see sublattice dynamics for different atomic species, while configuration output allows you to actually see what is giong on at any stage of your simulation. With these tools you can truly obtain a deeper understanding of what drives the magnetic behaviour of even the most complex systems.

Height and material dependent magnetization

Vampire can automatically analyse the magnetization profile of a system including the magnetization as a function of material or height. This allows the analysis of sublattice magnetization in antiferromagnets or interface and surface effects or complex switching mechanisms in advanced magnetic recording media.

Slonczewski Spin transfer torquque

Vampire 5.0 now includes the Slonczewski spin transfer torque (adiabatic and non-adiabatic) to enable basic switching simulations. A more advanced transfer matrix approach is currently in development and due for realease with the next version.

Standard magnetic problems made easy

A wide range of experimental techniques exist to probe the properties of magnetic materials, and vampire implements several standard programs to make magnetic characterisation as simple as possible. There are also programs for running dynamic calculations, such as ultrafast laser induced or magnetic recording simulations.

Hysteresis loops

The hysteresis loop is the standard magnetic characterisation technique, and Vampire includes a simple program to calculate a dynamic hysteresis loop. The maximum applied field , field rate and other parameters are easily set in the input file, making it trivial to set up a calculation. Combined with POVRay™ visualisation you can see how your system behaves during hysteresis which is particularly useful for complex systems such as exchange biased nanoparticles.

Curie temperature

The Curie temperature of the material is a reflection of the strength of the exchange interactions, which gives rise to atomic ordering of spins. Vampire includes a program to calculate the Curie (or Neel) temperature of any material or system. Such calculations can be used to investigate finite size or surface effects, or in alloys where the Curie temperature is more complicated to evaluate.

Ultrafast laser induced spin dynamics

Ultrafast spin dynamics are magnetic fluctuations driven by laser pulses and pulsed magnetic fields, and result in dynamic magnetisation behaviour on the sub-picosecond timescale leading to interesting effects such as ultrafast demagnetisation and heat-induced magnetic switching. Vampire includes dynamic solution of the two temperature model to simulate ultrafast heat pulses, and in combination with model ferrimagnetic materials such as GdFeCo and TbFeCo you can simulate ultrafast switching and other effects with ease. Vampire 5.0 now includes the ability to simulate spatially localized heat pulsed and variable absorption profiles from a finite penetration depth.

Gilbert damping calculation

The macroscopic Gilbert damping parameter determines the time dependent behaviour of a magnetic sample, including intrinsic and extrinsic contributions. Vampire includes a program for determining the effects of some extrinsic contributions such as temperature and surface effects, but also for inhomogenous systems such as rare-earth doped ferromagnets.

Heat assisted magnetic recording

Heat assisted magnetic recording, or HAMR, utilises a heat source to dynamically heat the storage medium to a high temperature and record the information with an applied field. Vampire implements a HAMR program with a spatially varying temperature profile and applied field which moves across the recording medium, which can be continuous, bit patterned or granular. The final pattern of the written data can be visualised using POVRay™, and the time dependent magnetisation profile of every grain and material in the simulation can easily be analysed.

Temperature dependent anisotropy

Calculation of the effective anisotropy of a system is implemented using the Constrained Monte Carlo algorithm, which minimises the system energy at a given temperature while holding the magnetisation along a constant direction. For simple systems integration of the system torque gives the effective temperature dependent anisotropy energy, while for more complex systems an energy surface can be generated which can then be used to obtain energy barriers.

Field cooling

Field cooling is another technique which is used to determine the blocking temperature for a material, which often consists of many individual magnetic grains. Field cooling is particularly relevant for exchange biased systems and heat assisted magnetic recording, as the magnetic state after cooling is characteristic of the system and its anisotropy. Vampire includes a program to simulate field-cooled magnetisation curves for your system where key parameters such as the applied field strength and cooling time can be easily controlled.

Model complex magnetic materials

Besides simple materials consisting of a single atomic species, vampire also has the capability to model much more complicated systems such as alloys, ferri and anti-ferromagnets and more complicated Hamiltonians, for example with spatially anisotropic exchange interactions. The code can also accept effective parameters calculated from ab-initio calculations so macroscopic properties such as coercivity and Curie temperatures can easily be calculated.


Using the atomistic model allows Vampire to easily simulate antiferromagnets at their natural atomic scale. Unlike ferromagnets, anti-ferromagnetic properties are intrinsically coupled to the crystal structure, leading to different ground state configuration or frustration. Vampire is capable of calculating ground state configurations, Neel temperatures and exchange bias effects when a ferromagnet and anti-ferromagnet are coupled.

Tensorial exchange

In some materials the exchange interactions are anisotropic, giving a preferred orientation of the spins. Vampire has an option to include the full tensorial form of the exchange interaction which can be used to simulate the effects of two-ion anisotropy or Dzyaloshinskii-Moriya interactions.


Vampire supports many distinct materials in a simulation and so can naturally deal with alloys of different magnetic species, for example FeCo. In the generic simulations random alloys are fully supported, while customised configurations of ordered alloys are also straightforward. In Vampire 5.0 there is enhanced support for unit cells with complex geometries which are now compatible with the range of CSG operations in the code.

Ab-initio input

An advanced feature of vampire is the ability to incorporate information from ab-initio first principles calculations by mapping onto an effective spin model. This can also include localised magnetic moments and tensorial exchange interactions and magnetic anisotropies, allowing true multiscale calculations of magnetic materials.

Code features

Vampire is designed from the ground-up to be an easy to use, fast, open-source and extensible software package capable of modelling almost any magnetic material with atomic resolution. These design features also enable open verification of the correctness of implemented algorithms as well as the ability to easily add new functionality such as physical parameters or integration schemes while maintaining maximum performance for solving problems quickly.

Open source

Vampire is an open-source project, making it freely available for anyone to use and modify, and allowing other researchers and groups to contribute to the project. Having an open source code serves a dual purpose allowing scrutiny of the algorithms to verify their correctness and that simulation results are reproducible, one of the key pillars of scientific endeavour. Version 5.0 now includes a unique identifier for every version of the code to enable exact reproducibility if specific versions of the code.

Object orientated

Code extensibility is essential for the long term viability of a code, and vampire utilises an object-oriented design to enable the straightforward addition of additional components and algorithms. Another primary design criterion is portability of the code with a minimal dependence on external libraries, allowing to be easily compiled on a wide variety of systems and architectures. The code has also been refactored into a new modular structure to make adding new features much more straight forward and faster.


Vampire 5.0 now includes enhanced support for checkpointing simulations, allowing the calculation to continue if the program crashes for any reason.

GPU acceleration beta

Vampire 5.0 now includes limited support for GPU accelerated simultions with CUDA and OpenCL of basic features with up to 40x faster performance than a single processor.


Due to the compute intensive nature of atomistic calculations, from the outset vampire was designed for maximum performance and computational efficiency. Vampire is written in standards compliant C++ and utilises state of the art computational methods for performance critical parts of the code.


Vampire is able to make use of multiple processors using the MPI library and is designed to be highly scalable. Whether on a multicore desktop PC or clusters with hundreds or thousands of processors, multiple parallelisation paradigms are available to optimally tackle any problem. Available strategies include geometric decomposition and replicated data. What was previously a method applicable only to single nanoparticles or small systems with parallel processing now enables the routine study of realistic systems.

Parallel I/O

Through support of the ARCHER eCSE programme we have implemented new parallel input and output routines for optimal scaling on large scale clusters and super-computing systems, now being up to 1 000 000 times faster than the previous implementation. We have also added a data processing utility VDC to enable a range of common output options.