The Vampire code calculate the magnetic properties at the nano scale using the Monte Carlo method.

We will calculate the hysterisis cycle of the hexagonal cobalt. 

We need 2 input files

Input

#------------------------------------------
# Sample vampire input file to perform
# a Hysteresis loop simulation for Co.
# crystal-structure and unit-cell-size from Table 2
# https://doi.org/10.1088%2F0953-8984%2F26%2F10%2F103202
#------------------------------------------
#------------------------------------------
# Creation attributes:
#------------------------------------------
create:crystal-structure=hcp

#------------------------------------------
# System Dimensions:
#------------------------------------------
dimensions:unit-cell-size = 2.507 !A
dimensions:system-size-x = 2 !nm
dimensions:system-size-y = 2 !nm
dimensions:system-size-z = 3 !nm

#------------------------------------------
# Material Files:
#------------------------------------------
material:file=Co.mat

#------------------------------------------
# Simulation attributes:
#------------------------------------------

sim:loop-time-steps=1500
sim:time-step=1.0e-15
sim:temperature=0
sim:maximum-applied-field-strength=3.5 !T
sim:applied-field-strength-increment=0.015 !T
sim:applied-field-unit-vector=0,0.001,0.999


#------------------------------------------
# Program and integrator details
#------------------------------------------
sim:program=hysteresis-loop
sim:integrator=llg-heun

#------------------------------------------
# data output
#------------------------------------------
output:real-time
output:applied-field-strength
output:material-magnetisation

 

Co.mat

#===================================================
# Sample vampire material file for Cobalt
#===================================================

#---------------------------------------------------
# Number of Materials
#---------------------------------------------------
material:num-materials=1
#---------------------------------------------------
# Material 1 hcp Cobalt
# exchange-matrix, atomic-spin-moment,
# and uniaxial-anisotropy-constant from Table 2
# https://doi.org/10.1088%2F0953-8984%2F26%2F10%2F103202
#---------------------------------------------------
material[1]:material-name=Co
material[1]:damping-constant=1
material[1]:exchange-matrix[1]=6.064e-21
material[1]:atomic-spin-moment=0.606 !muB
material[1]:uniaxial-anisotropy-constant=6.69e-24
material[1]:material-element=Co

 

Calculation

/vampire-tutorials/Hysteresis/Co> vampire-serial

 

To plot the results we need the following gnuplot script 

 Co.gnu

set xlabel "Applied field (T)"
set ylabel "m_z"
p "output" u 2:5 w p

 

/vampire-tutorials/Hysterisis/Co> gnuplot --persist Co.gnu

 

We get the following plot