started to add spin/kk to the doc

modified validaion tests for kokkos compatibility
This commit is contained in:
julient31
2020-10-09 09:47:47 -06:00
parent e8ebce1b52
commit c85498e98b
7 changed files with 24 additions and 31 deletions

View File

@ -27,7 +27,7 @@ Syntax
template-ID = ID of molecule template specified in a separate :doc:`molecule <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
""""""""

View File

@ -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)

View File

@ -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)"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)"