Commit before pull

This commit is contained in:
julient31
2021-03-30 10:35:25 -06:00
parent 256bde9282
commit 39dc3e69ba
4 changed files with 19 additions and 7 deletions

View File

@ -21,8 +21,8 @@ orientations and their associated inter-atomic distances.
The command :doc:`fix precession/spin <fix_precession_spin>` allows to The command :doc:`fix precession/spin <fix_precession_spin>` allows to
apply a constant magnetic torque on all the spins in the system. This apply a constant magnetic torque on all the spins in the system. This
torque can be an external magnetic field (Zeeman interaction), or an torque can be an external magnetic field (Zeeman interaction), and an
uniaxial magnetic anisotropy. uniaxial or cubic magnetic anisotropy.
A Langevin thermostat can be applied to those magnetic spins using A Langevin thermostat can be applied to those magnetic spins using
:doc:`fix langevin/spin <fix_langevin_spin>`. Typically, this thermostat :doc:`fix langevin/spin <fix_langevin_spin>`. Typically, this thermostat

View File

@ -3,9 +3,15 @@
# clean old res # clean old res
rm res_*.dat rm res_*.dat
# compute Lammps # test standard Lammps
./../../../../src/lmp_serial \ # ./../../../../src/lmp_serial \
-in test-spin-precession.in # -in test-spin-precession.in
# test spin/kk with Kokkos Lammps
mpirun -np 1 ../../../../src/lmp_kokkos_mpi_only \
-k on -sf kk -in test-spin-precession.in
# extract data from Lammps run
in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')" in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')"
en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')" en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')"
in="$(echo "$in+1" | bc -l)" in="$(echo "$in+1" | bc -l)"

View File

@ -1,16 +1,22 @@
#LAMMPS in.run #LAMMPS in.run
units metal units metal
atom_style spin # atom_style spin
atom_style spin/kk
atom_modify map array atom_modify map array
boundary f f f boundary f f f
shell echo "test1"
atom_modify map array atom_modify map array
lattice sc 3.0 lattice sc 3.0
region box block 0 2 0 1 0 1 region box block 0 2 0 1 0 1
shell echo "test1"
create_box 1 box create_box 1 box
shell echo "test1"
create_atoms 1 box create_atoms 1 box
shell echo "test1"
mass 1 55.845 mass 1 55.845
set atom 1 spin 2.0 1.0 0.0 0.0 set atom 1 spin 2.0 1.0 0.0 0.0
set atom 2 spin 2.0 0.0 1.0 0.0 set atom 2 spin 2.0 0.0 1.0 0.0

View File

@ -393,7 +393,7 @@ void PairSpinExchangeBiquadratic::compute_exchange(int i, int j, double rsq,
jtype = type[j]; jtype = type[j];
r2j = rsq/J3[itype][jtype]/J3[itype][jtype]; r2j = rsq/J3[itype][jtype]/J3[itype][jtype];
r2k = rsq/J3[itype][jtype]/J3[itype][jtype]; r2k = rsq/K3[itype][jtype]/K3[itype][jtype];
Jex = 4.0*J1_mag[itype][jtype]*r2j; Jex = 4.0*J1_mag[itype][jtype]*r2j;
Jex *= (1.0-J2[itype][jtype]*r2j); Jex *= (1.0-J2[itype][jtype]*r2j);