Commit JT 092419

- changed the nve/spin lattice option
- from (yes/no) to (moving/frozen)
- changed the doc and all examples
This commit is contained in:
julient31
2019-09-24 15:58:22 -06:00
parent 2fad4e0f97
commit a0974bc09d
16 changed files with 32 additions and 21 deletions

View File

@ -15,22 +15,26 @@ fix ID group-ID nve/spin keyword values :pre
ID, group-ID are documented in "fix"_fix.html command :ulb,l ID, group-ID are documented in "fix"_fix.html command :ulb,l
nve/spin = style name of this fix command :l nve/spin = style name of this fix command :l
keyword = {lattice} :l keyword = {lattice} :l
{lattice} value = {no} or {yes} :pre {lattice} value = {moving} or {frozen}
moving = integrate both spin and atomic degress of freedom
frozen = integrate spins on a fixed lattice :pre
:ule :ule
[Examples:] [Examples:]
fix 3 all nve/spin lattice yes fix 3 all nve/spin lattice moving
fix 1 all nve/spin lattice no :pre fix 1 all nve/spin lattice frozen :pre
[Description:] [Description:]
Perform a symplectic integration for the spin or spin-lattice system. Perform a symplectic integration for the spin or spin-lattice system.
The {lattice} keyword defines if the spins are integrated on a lattice The {lattice} keyword defines if the spins are integrated on a lattice
of fixed atoms (lattice = no), or if atoms are moving (lattice = yes). of fixed atoms (lattice = frozen), or if atoms are moving
(lattice = moving).
By default (lattice = yes), a spin-lattice integration is performed. The first case corresponds to a spin dynamics calculation, and
the second to a spin-lattice calculation.
By default a spin-lattice integration is performed (lattice = moving).
The {nve/spin} fix applies a Suzuki-Trotter decomposition to The {nve/spin} fix applies a Suzuki-Trotter decomposition to
the equations of motion of the spin lattice system, following the scheme: the equations of motion of the spin lattice system, following the scheme:
@ -63,7 +67,9 @@ instead of "array" is also valid.
"atom_style spin"_atom_style.html, "fix nve"_fix_nve.html "atom_style spin"_atom_style.html, "fix nve"_fix_nve.html
[Default:] none [Default:]
The option default is lattice = moving.
:line :line

View File

@ -32,7 +32,7 @@ neigh_modify every 10 check yes delay 20
fix 1 all precession/spin anisotropy 0.0000033 0.0 0.0 1.0 fix 1 all precession/spin anisotropy 0.0000033 0.0 0.0 1.0
fix 2 all langevin/spin 0.0 0.1 21 fix 2 all langevin/spin 0.0 0.1 21
fix 3 all nve/spin lattice no fix 3 all nve/spin lattice frozen
timestep 0.0002 timestep 0.0002

View File

@ -35,7 +35,7 @@ fix_modify 1 energy yes
fix 2 all langevin/spin 0.0 0.0 21 fix 2 all langevin/spin 0.0 0.0 21
fix 3 all nve/spin lattice yes fix 3 all nve/spin lattice moving
timestep 0.0001 timestep 0.0001
# compute and output options # compute and output options

View File

@ -37,7 +37,7 @@ neigh_modify every 10 check yes delay 20
fix 1 all precession/spin anisotropy 0.01 0.0 0.0 1.0 fix 1 all precession/spin anisotropy 0.01 0.0 0.0 1.0
#fix 2 all langevin/spin 0.0 0.0 21 #fix 2 all langevin/spin 0.0 0.0 21
fix 2 all langevin/spin 0.0 0.1 21 fix 2 all langevin/spin 0.0 0.1 21
fix 3 all nve/spin lattice yes fix 3 all nve/spin lattice moving
timestep 0.0001 timestep 0.0001

View File

@ -33,7 +33,7 @@ fix 1 all precession/spin cubic 0.001 0.0005 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1
fix_modify 1 energy yes fix_modify 1 energy yes
fix 2 all langevin/spin 0.0 0.0 21 fix 2 all langevin/spin 0.0 0.0 21
fix 3 all nve/spin lattice yes fix 3 all nve/spin lattice moving
timestep 0.0001 timestep 0.0001
# compute and output options # compute and output options

View File

@ -35,7 +35,7 @@ fix 1 all precession/spin cubic 0.001 0.0005 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1
fix_modify 1 energy yes fix_modify 1 energy yes
fix 2 all langevin/spin 0.0 0.0 21 fix 2 all langevin/spin 0.0 0.0 21
fix 3 all nve/spin lattice yes fix 3 all nve/spin lattice moving
timestep 0.0001 timestep 0.0001
# compute and output options # compute and output options

View File

@ -36,7 +36,7 @@ fix 1 all precession/spin cubic 0.001 0.0005 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1
fix_modify 1 energy yes fix_modify 1 energy yes
fix 2 all langevin/spin 0.0 0.0 21 fix 2 all langevin/spin 0.0 0.0 21
fix 3 all nve/spin lattice yes fix 3 all nve/spin lattice moving
timestep 0.0001 timestep 0.0001
# compute and output options # compute and output options

View File

@ -33,7 +33,7 @@ neigh_modify every 10 check yes delay 20
fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0
fix 2 all langevin/spin 0.0 0.0 21 fix 2 all langevin/spin 0.0 0.0 21
fix 3 all nve/spin lattice yes fix 3 all nve/spin lattice moving
timestep 0.0001 timestep 0.0001
# compute and output options # compute and output options

View File

@ -31,7 +31,7 @@ fix 1 all precession/spin cubic 0.001 0.0005 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1
fix_modify 1 energy yes fix_modify 1 energy yes
fix 2 all langevin/spin 0.0 0.0 21 fix 2 all langevin/spin 0.0 0.0 21
fix 3 all nve/spin lattice yes fix 3 all nve/spin lattice moving
timestep 0.0001 timestep 0.0001
# compute and output options # compute and output options

View File

@ -33,7 +33,7 @@ neigh_modify every 10 check yes delay 20
fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0
fix 2 all langevin/spin 0.0 0.0 21 fix 2 all langevin/spin 0.0 0.0 21
fix 3 all nve/spin lattice yes fix 3 all nve/spin lattice moving
timestep 0.0001 timestep 0.0001
# compute and output options # compute and output options

View File

@ -35,7 +35,7 @@ fix 1 all precession/spin cubic -0.0001 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.
fix_modify 1 energy yes fix_modify 1 energy yes
fix 2 all langevin/spin 0.0 0.0 21 fix 2 all langevin/spin 0.0 0.0 21
fix 3 all nve/spin lattice yes fix 3 all nve/spin lattice moving
timestep 0.0001 timestep 0.0001
# compute and output options # compute and output options

View File

@ -20,7 +20,7 @@ neigh_modify every 1 check no delay 0
fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0
fix 2 all langevin/spin 0.0 0.0 21 fix 2 all langevin/spin 0.0 0.0 21
fix 3 all nve/spin lattice yes fix 3 all nve/spin lattice moving
timestep 0.0001 timestep 0.0001
# define outputs and computes # define outputs and computes

View File

@ -24,7 +24,7 @@ neigh_modify every 1 check no delay 0
fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0
fix 2 all langevin/spin 0.0 0.0 21 fix 2 all langevin/spin 0.0 0.0 21
fix 3 all nve/spin lattice yes fix 3 all nve/spin lattice moving
timestep 0.0001 timestep 0.0001
# define outputs # define outputs

View File

@ -29,7 +29,7 @@ neigh_modify every 10 check yes delay 20
fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0
fix 2 all langevin/spin 100.0 0.01 21 fix 2 all langevin/spin 100.0 0.01 21
fix 3 all nve/spin lattice no fix 3 all nve/spin lattice frozen
timestep 0.0001 timestep 0.0001
# compute and output options # compute and output options

View File

@ -35,7 +35,7 @@ fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 anisotropy 5e-05 0.0 0.0 1.0
fix_modify 1 energy yes fix_modify 1 energy yes
fix 2 fixed_spin setforce/spin 0.0 0.0 0.0 fix 2 fixed_spin setforce/spin 0.0 0.0 0.0
fix 3 all langevin/spin 0.0 0.1 21 fix 3 all langevin/spin 0.0 0.1 21
fix 4 all nve/spin lattice no fix 4 all nve/spin lattice frozen
timestep 0.0001 timestep 0.0001

View File

@ -91,12 +91,17 @@ FixNVESpin::FixNVESpin(LAMMPS *lmp, int narg, char **arg) :
// defining lattice_flag // defining lattice_flag
// changing the lattice option, from (yes,no) -> (moving,frozen)
// for now, (yes,no) still works (to avoid user's confusions).
int iarg = 3; int iarg = 3;
while (iarg < narg) { while (iarg < narg) {
if (strcmp(arg[iarg],"lattice") == 0) { if (strcmp(arg[iarg],"lattice") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal fix/NVE/spin command"); if (iarg+2 > narg) error->all(FLERR,"Illegal fix/NVE/spin command");
if (strcmp(arg[iarg+1],"no") == 0) lattice_flag = 0; if (strcmp(arg[iarg+1],"no") == 0) lattice_flag = 0;
else if (strcmp(arg[iarg+1],"frozen") == 0) lattice_flag = 0;
else if (strcmp(arg[iarg+1],"yes") == 0) lattice_flag = 1; else if (strcmp(arg[iarg+1],"yes") == 0) lattice_flag = 1;
else if (strcmp(arg[iarg+1],"moving") == 0) lattice_flag = 1;
else error->all(FLERR,"Illegal fix/NVE/spin command"); else error->all(FLERR,"Illegal fix/NVE/spin command");
iarg += 2; iarg += 2;
} else error->all(FLERR,"Illegal fix/NVE/spin command"); } else error->all(FLERR,"Illegal fix/NVE/spin command");