48 lines
1.3 KiB
Plaintext
48 lines
1.3 KiB
Plaintext
#LAMMPS in.run
|
|
|
|
units metal
|
|
atom_style spin
|
|
# atom_style spin/kk
|
|
atom_modify map array
|
|
boundary p p p
|
|
|
|
# read_data singlespin.data
|
|
|
|
lattice sc 3.0
|
|
region box block 0.0 1.0 0.0 1.0 0.0 1.0
|
|
create_box 1 box
|
|
create_atoms 1 box
|
|
|
|
mass 1 1.0
|
|
set type 1 spin 1.0 0.0 0.0 1.0
|
|
|
|
# defines a pair/style for neighbor list, but do not use it
|
|
pair_style spin/exchange 4.0
|
|
pair_coeff * * exchange 1.0 0.0 0.0 1.0
|
|
|
|
group bead type 1
|
|
|
|
variable H equal 10.0
|
|
variable Kan equal 0.0
|
|
variable Temperature equal temperature
|
|
variable RUN equal 1000000
|
|
|
|
fix 1 all nve/spin lattice no
|
|
fix 2 all precession/spin zeeman ${H} 0.0 0.0 1.0 anisotropy ${Kan} 0.0 0.0 1.0
|
|
fix_modify 2 energy yes
|
|
fix 3 all langevin/spin ${Temperature} 0.01 12345
|
|
|
|
compute compute_spin all spin
|
|
compute outsp all property/atom spx spy spz sp
|
|
compute magsz all reduce ave c_outsp[3]
|
|
|
|
thermo 50000
|
|
thermo_style custom step time temp vol pe c_compute_spin[5] etotal
|
|
|
|
variable magnetic_energy equal c_compute_spin[5]
|
|
|
|
fix avespin all ave/time 1 ${RUN} ${RUN} v_Temperature v_H v_Kan c_magsz v_magnetic_energy file average_spin
|
|
|
|
timestep 0.1
|
|
run ${RUN}
|