diff --git a/doc/src/atom_style.rst b/doc/src/atom_style.rst index 4957901676..a59f8d31e0 100644 --- a/doc/src/atom_style.rst +++ b/doc/src/atom_style.rst @@ -27,7 +27,7 @@ Syntax template-ID = ID of molecule template specified in a separate :doc:`molecule ` command *hybrid* args = list of one or more sub-styles, each with their args -* accelerated styles (with same args) = *angle/kk* or *atomic/kk* or *bond/kk* or *charge/kk* or *full/kk* or *molecular/kk* +* accelerated styles (with same args) = *angle/kk* or *atomic/kk* or *bond/kk* or *charge/kk* or *full/kk* or *molecular/kk* or *spin/kk* Examples """""""" diff --git a/examples/SPIN/test_problems/validation_damped_exchange/llg_exchange.py b/examples/SPIN/test_problems/validation_damped_exchange/llg_exchange.py index 49eecb5b44..dd1c543bb3 100755 --- a/examples/SPIN/test_problems/validation_damped_exchange/llg_exchange.py +++ b/examples/SPIN/test_problems/validation_damped_exchange/llg_exchange.py @@ -65,6 +65,6 @@ for t in range (0,N): # calc. average magnetization Sm = (S1+S2)*0.5 # calc. energy - en = -2.0*J0*(np.dot(S1,S2)) + en = -J0*(np.dot(S1,S2)) # print res. in ps for comparison with LAMMPS print(t*dt/1000.0,Sm[0],Sm[1],Sm[2],en) diff --git a/examples/SPIN/test_problems/validation_damped_exchange/run-test-exchange.sh b/examples/SPIN/test_problems/validation_damped_exchange/run-test-exchange.sh index 599730fe7b..ce8a6c3dbf 100755 --- a/examples/SPIN/test_problems/validation_damped_exchange/run-test-exchange.sh +++ b/examples/SPIN/test_problems/validation_damped_exchange/run-test-exchange.sh @@ -4,8 +4,9 @@ rm res_*.dat # compute Lammps -./../../../../src/lmp_serial \ - -in test-spin-precession.in +../../../../src/lmp_serial -in test-spin-precession.in +# mpirun -np 1 ../../../../src/lmp_kokkos_mpi_only \ +# -k on -sf kk -in test-spin-precession.in 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)" diff --git a/examples/SPIN/test_problems/validation_damped_exchange/test-spin-precession.in b/examples/SPIN/test_problems/validation_damped_exchange/test-spin-precession.in index 0ca49364d2..6eea93224e 100644 --- a/examples/SPIN/test_problems/validation_damped_exchange/test-spin-precession.in +++ b/examples/SPIN/test_problems/validation_damped_exchange/test-spin-precession.in @@ -2,10 +2,18 @@ units metal atom_style spin -atom_modify map array +# atom_style spin/kk boundary f f f -read_data two_spins.data +atom_modify map array +lattice sc 3.0 +region box block 0 2 0 1 0 1 +create_box 1 box +create_atoms 1 box + +mass 1 55.845 +set atom 1 spin 2.0 1.0 0.0 0.0 +set atom 2 spin 2.0 0.0 1.0 0.0 pair_style spin/exchange 3.1 pair_coeff * * exchange 3.1 11.254 0.0 1.0 diff --git a/examples/SPIN/test_problems/validation_damped_exchange/two_spins.data b/examples/SPIN/test_problems/validation_damped_exchange/two_spins.data deleted file mode 100644 index 013f813751..0000000000 --- a/examples/SPIN/test_problems/validation_damped_exchange/two_spins.data +++ /dev/null @@ -1,22 +0,0 @@ -LAMMPS data file via write_data, version 19 Sep 2019, timestep = 0 - -2 atoms -1 atom types - -0.0 6.0 xlo xhi -0.0 3.0 ylo yhi -0.0 3.0 zlo zhi - -Masses - -1 1 - -Atoms # spin - -1 1 2.0 0.0 0.0 0.0 1.0 0.0 0.0 0 0 0 -2 1 2.0 3.0 0.0 0.0 0.0 1.0 0.0 0 0 0 - -Velocities - -1 0.0 0.0 0.0 -2 0.0 0.0 0.0 diff --git a/examples/SPIN/test_problems/validation_nve/in.spin.iron-nve b/examples/SPIN/test_problems/validation_nve/in.spin.iron-nve index f00fb1ec12..a29d0158cf 100644 --- a/examples/SPIN/test_problems/validation_nve/in.spin.iron-nve +++ b/examples/SPIN/test_problems/validation_nve/in.spin.iron-nve @@ -3,6 +3,7 @@ clear units metal atom_style spin +# atom_style spin/kk dimension 3 boundary p p p @@ -46,4 +47,8 @@ variable tmag equal c_out_mag[6] thermo_style custom step time v_tmag temp v_emag ke pe etotal thermo 200 -run 100000 +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 diff --git a/examples/SPIN/test_problems/validation_nve/run-test-nve.sh b/examples/SPIN/test_problems/validation_nve/run-test-nve.sh index 441e7cf46d..a8eb179b7f 100755 --- a/examples/SPIN/test_problems/validation_nve/run-test-nve.sh +++ b/examples/SPIN/test_problems/validation_nve/run-test-nve.sh @@ -4,8 +4,9 @@ rm res_*.dat # compute Lammps -./../../../../src/lmp_serial \ - -in in.spin.iron-nve +# 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 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)"