- adding a force/clear equivalent for spins in verlet/kk

- setting all validation problems for spin/kk
This commit is contained in:
julient31
2021-04-01 11:45:16 -06:00
parent 2d0aad1904
commit 4975295e0f
14 changed files with 82 additions and 18 deletions

View File

@ -6,7 +6,7 @@ import matplotlib.pyplot as plt
import mpmath as mp
hbar=0.658212 # Planck's constant (eV.fs/rad)
# J0=0.05 # per-neighbor exchange interaction (eV)
J0=0.05 # per-neighbor exchange interaction (eV)
# exchange interaction parameters
J1 = 11.254 # in eV

View File

@ -4,12 +4,12 @@
rm res_*.dat
# test standard Lammps
# ./../../../../src/lmp_serial \
# -in test-spin-precession.in
./../../../../src/lmp_serial \
-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
# 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}')"

View File

@ -1,8 +1,8 @@
#LAMMPS in.run
units metal
# atom_style spin
atom_style spin/kk
atom_style spin
# atom_style spin/kk
atom_modify map array
boundary f f f
shell echo "test1"

View File

@ -3,9 +3,15 @@
# clean old res
rm res_*.dat
# compute Lammps
# test standard Lammps
./../../../../src/lmp_serial \
-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}')"
en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')"
in="$(echo "$in+1" | bc -l)"

View File

@ -2,6 +2,7 @@
units metal
atom_style spin
# atom_style spin/kk
atom_modify map array
boundary f f f

View File

@ -12,7 +12,14 @@ do
temp="$(echo "$tempi+$i*($tempf-$tempi)/$N" | bc -l)"
sed s/temperature/${temp}/g test-prec-spin.template > \
test-prec-spin.in
# test standard Lammps
./../../../../src/lmp_serial -in test-prec-spin.in
# test spin/kk with Kokkos Lammps
# mpirun -np 1 ../../../../src/lmp_kokkos_mpi_only \
# -k on -sf kk -in test-prec-spin.in
Hz="$(tail -n 1 average_spin | awk -F " " '{print $3}')"
sz="$(tail -n 1 average_spin | awk -F " " '{print $5}')"
en="$(tail -n 1 average_spin | awk -F " " '{print $6}')"

View File

@ -2,6 +2,7 @@
units metal
atom_style spin
# atom_style spin/kk
atom_modify map array
boundary p p p

View File

@ -50,5 +50,5 @@ thermo 200
compute outsp all property/atom spx spy spz sp fmx fmy fmz
dump 1 all custom 10 dump_iron.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3]
# run 100000
run 10000
run 100000
# run 1

View File

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

View File

@ -3,6 +3,7 @@
clear
units metal
atom_style spin
# atom_style spin/kk
dimension 3
boundary p p p

View File

@ -3,6 +3,7 @@
clear
units metal
atom_style spin
# atom_style spin/kk
dimension 3
boundary p p p

View File

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