256 lines
9.6 KiB
Plaintext
256 lines
9.6 KiB
Plaintext
<script type="text/javascript"
|
|
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
|
|
</script>
|
|
<script type="text/x-mathjax-config">
|
|
MathJax.Hub.Config({ TeX: { equationNumbers: {autoNumber: "AMS"} } });
|
|
</script>
|
|
|
|
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
|
|
|
:link(lws,http://lammps.sandia.gov)
|
|
:link(ld,Manual.html)
|
|
:link(lc,Section_commands.html#comm)
|
|
|
|
:line
|
|
|
|
Tutorial for the SPIN package in LAMMPS :h3
|
|
|
|
This tutorial explains how to use the spin dynamics in LAMMPS,
|
|
and to perform spin and spin--lattice simulations using the
|
|
SPIN package. As an illustration, input files are documented.
|
|
First of all, LAMMPS has to be compiled with the SPIN package
|
|
activated. Then, the data file and input scripts have to be
|
|
modified to include the magnetic spins and to handle them.
|
|
|
|
:line
|
|
|
|
[Overview of the spin and spin--lattice dynamics]
|
|
|
|
At the atomic scale, magnetic materials can be seen as ensemble of
|
|
atoms, each one of them carying a magnetic moment, refered to as its
|
|
atomic spin. In ref "Antropov"_#Antropov, a formalism allowing to
|
|
simulate approximate classical spins, and to couple them to lattice
|
|
vibrations was introduced. Each of these spins is simulated via a
|
|
classical vector, associated to each magnetic atom, and whose
|
|
trajectory is defined by an equation of motion.
|
|
Lattice vibrations are simulated by the usual equations of MD.
|
|
A mechanical potential (EAM, Finnis-Siclair, or Dudarev-Derlet) ensure
|
|
the cohesion of the particles. The coupling between the magnetic and
|
|
lattice degrees of freedom is performed via the inter-atomic dependence
|
|
of the magnetic interactions.
|
|
:ole
|
|
|
|
|
|
:line
|
|
|
|
[Preparation of the data file]
|
|
|
|
For the mechanical potentials, the data file is similar to a standard LAMMPS
|
|
data file for {atom_style full}. The DPs and the {harmonic bonds} connecting
|
|
them to their DC should appear in the data file as normal atoms and bonds.
|
|
|
|
For the magnetic interactions, no data file is necessary, every interaction
|
|
input will be define in the input file. :pre
|
|
|
|
|
|
:line
|
|
|
|
[Basic input file]
|
|
|
|
Up to know, spin simulations only accept the metal units.
|
|
|
|
The atom style should be set to {spin}, so that you
|
|
can define atomic spin vectors.
|
|
|
|
|
|
The set group command defines the Lande factor (the norm) of
|
|
the magnetic vectors in a given group, and their initial
|
|
oriantation. The command is:
|
|
|
|
set group A B C D E F :pre
|
|
|
|
with A, B, C, D, E, and F the following input parameters:
|
|
A is set to all, or to the number of a specific and pre-defined
|
|
group of atoms,
|
|
B is set to {spin} or {spin/random}, depending on if the spins of
|
|
the group have to be initialized in a particulat direction, or randomly.
|
|
|
|
If B is defined as {spin}, the C is the Lande factor for the spins of
|
|
the group, and [D,E,F] is the vector giving the direction for the
|
|
initialization.
|
|
|
|
If B is defined as {spin/random}, C is a number giving the seed for the random
|
|
difinition of the directions, and D is the Lande factor of the spins
|
|
in this group. E and F are not defined.
|
|
|
|
Examples:
|
|
set group all spin 1.72 1.0 0.0 0.0
|
|
set group all spin/random 11 1.72
|
|
|
|
setting the initial direction of all spins, with a Lande factor of 1.72,
|
|
and either in the x direction, or randomly. :l
|
|
|
|
|
|
The pair style has to be set to {pair/spin}. The command is
|
|
|
|
pair_style pair/spin A
|
|
|
|
with A a global radius cutoff.
|
|
|
|
The different pair interactions and their associated coefficients can then be
|
|
defined via the pair coeff command.
|
|
|
|
pair_coeff A B C D E F G H
|
|
|
|
where A and B are setting the pair concerned by this pair coeff command.
|
|
For example, A=1 and B=2 to set the pair coefficients between spins of
|
|
type 1 and spins of type 2. Use {*} for setting a pair coeffcient between
|
|
all pairs of spins.
|
|
|
|
C defines the type of the interaction. It can be set to {exchange} for an
|
|
exchange interaction, {dmi} for a Dzyaloshinskii-Moriya (DM) interaction, or to
|
|
{me} for a magneto-electric (ME) interaction.
|
|
|
|
If C is set to {exchange}, D is the radius cutoff (in Angtrom) associated
|
|
to the exchange interaction, and E, F and G are the three parameters of the
|
|
Bethe--Slater function (E in eV, F without dimension, and G in Angtrom).
|
|
H is not defined.
|
|
|
|
If C is set to {dmi}, D is the radius cutoff (in Angtrom) associated to the DM
|
|
interaction, E is the intensity of the interaction in eV (which is also the
|
|
norm of the DM vector), and [F, G, H] are giving the direction of the DM
|
|
vector.
|
|
|
|
If C is set to {me}, D is the radius cutoff (in Angtrom) associated to the ME
|
|
interaction, E is the intensity of the interaction in eV (which corresponds to
|
|
the intensity of the electric polarization), and [F, G, H] are giving the
|
|
direction of the polarization vector.
|
|
|
|
Examples:
|
|
pair_coeff * * exchange 4.0 0.0446928 0.003496 1.4885
|
|
pair_coeff * * dmi 2.6 0.001 0.0 0.0 1.0
|
|
|
|
are setting an exchange interaction between every type of spins, with a radius
|
|
cutoff of 4.0 Angtrom, and E=0.0446928 eV, F=0.003496, and G=1.4885 Angtrom as
|
|
coefficient for the associated Bethe--Slater function, and a DM interaction
|
|
with a radius cutoff of 2.6 Angtrom, an intensity of 0.001 eV and a DM vector
|
|
in the direction [0.0 0.0 1.0]. :l
|
|
|
|
|
|
A fix has to be set to {force/spin} to define local magnetic forces, like the Zeeman
|
|
interaction or an anisotropic interaction. The command is:
|
|
|
|
fix A B C D E F G H
|
|
|
|
with A the label of the associated fix, B defining to which group of spins the
|
|
force is applied to, C defined as {force/spin} for magnetic local fixes, and
|
|
D defining the type of this fix. D can be equal to {zeeman} for a Zeeman interaction,
|
|
or to {anisotropy} for an anisotropic interaction.
|
|
|
|
If D is set to {zeeman}, then E gives the intensity of the applied magnetic field (in
|
|
Tesla), and [F, G, H] the direction of this field.
|
|
|
|
If is set to {anisotropy}, hen E gives the intensity of the anisotropic field (in eV),
|
|
and [F, G, H] the direction of this anisotropy.
|
|
|
|
Examples:
|
|
fix 1 all force/spin zeeman 1.0 0.0 0.0 1.0
|
|
fix 2 all force/spin anisotropy 0.001 0.0 1.0 0.0
|
|
|
|
are setting two fixes, the first one, labelled 1, is applied to all spins and defines
|
|
a Zeeman interaction corresponding to a field of 1 Tesla in the z direction, whereas
|
|
the second fix, labelled 2, is also applied to all spins, and defines a uniaxial
|
|
anisotropy of intensity 0.001 eV, in the direction y. :l
|
|
|
|
|
|
To simulate the temperature effects, a fix has to be set to {langevin/spin}. The command
|
|
is
|
|
|
|
fix A B C D E F G
|
|
|
|
where A is the label of the associated fix, B defines to which spins the fix is applied,
|
|
and C is set equal to {langevin/spin}. Then, D defines the temperature of the random bath
|
|
(in K), E is the transverse magnetic damping (no dimension), F is a longitudinal magnetic
|
|
damping, and G the seed for the random variables.
|
|
|
|
Note: the transverse damping is not implemented into LAMMPS yet. It is necessary for
|
|
micromagnetic simulations only.
|
|
|
|
Examples:
|
|
fix 2 all langevin/spin 300.0 0.01 0.0 21
|
|
|
|
is setting a fix labelled as 2, which is connecting all spins to a random bath. The temperature
|
|
of this bath is set to 300 K, and the value of the transverse Gilbert damping is set to 0.01.
|
|
The seed is set to 21.
|
|
|
|
|
|
For LAMMPS to understand that the motion of spins has to be taken into account, one has to set
|
|
a fix to {nve/spin}. The command is:
|
|
|
|
fix A B C D
|
|
|
|
with A the label of this fix, B defining to which group of atoms this fix is applied to, C has
|
|
to be set to {nve/spin}, and D can be set to {serial} for a serial calculation, with one
|
|
processor only, or to {mpi} for a parallel calculation, with N processors.
|
|
|
|
Example:
|
|
fix 3 all nve/spin mpi
|
|
|
|
is setting a fix labelled 3, and applies it to all the particles. The calculation is running in
|
|
parallel as the option {mpi} is defined.
|
|
|
|
|
|
Two main outputs of the computed magnetic quntities can be performed.
|
|
|
|
The first one is via a compute and a fix options. The compute command is defined as:
|
|
|
|
compute A B C
|
|
|
|
with A the label of this compute, B to which group of particles it is applied to, and finally,
|
|
the option {compute/spin} has to be set.
|
|
This compute is associated to a fix to define the output frequency and format. A typical command is:
|
|
|
|
fix A B C D E F G H
|
|
|
|
where A is the label of the fix, B the group of particles it is applied to, C defines the type of the
|
|
output fix, for example we chose to use {ave/time}, which can output every N timesteps, and perform
|
|
a time average over those steps. D, E, and F are the usual command of {ave/time}. G stands for the
|
|
magnetic quantities that are computed by {compute/spin}. Those quantities are:
|
|
|
|
c_mag[1] Physical time (in ps)
|
|
c_mag[2] Magnetization along x (adim)
|
|
c_mag[3] Magnetization along y (adim)
|
|
c_mag[4] Magnetization along z (adim)
|
|
c_mag[5] Magnetization Norm (adim)
|
|
c_mag[6] Magnetic energy (in eV)
|
|
c_mag[7] Spin temperature (in K)
|
|
|
|
And H stands for the output format, and is defined as in other .
|
|
|
|
Example:
|
|
compute 1 all compute/spin
|
|
fix 3 all ave/time 1 1 10 c_mag[1] c_mag[2] c_mag[3] c_mag[4] c_mag[5] c_mag[6] c_mag[7]
|
|
file mag_output.dat format %20.16g
|
|
|
|
is defining a compute of the magnetic quantities applied to all spins. The fix then outputs
|
|
every magnetic quantities every 10 time steps without performing any time average. These
|
|
quantities are stored in a file called mag_output.dat, with a special format (defined by %20.16g)
|
|
|
|
|
|
It is also possible to output the evolution of the spin configuration. This can be done with
|
|
the dump command. The only difference with a regular dump command is that the velocities
|
|
vi are replaced by the spin components spi.
|
|
|
|
Example:
|
|
dump 1 all custom 100 dump_spin.lammpstrj type x y z spx spy spz
|
|
|
|
is dumping every 100 timesteps the spin configuration in a file called dump_spin.lammpstrj.
|
|
|
|
|
|
:line
|
|
|
|
:link(Antropov)
|
|
[(Antropov)] Antropov, Katsnelson, Harmon, Van Schilfgaarde, and Kusnezov, Phys Rev B, 54(2), 1019 (1996)
|
|
|
|
|