- slight modifs of the damped exchange example
This commit is contained in:
@ -6,9 +6,17 @@ 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
|
||||
J2 = 0.0 # adim
|
||||
J3 = 1.0 # in Ang.
|
||||
|
||||
# initial spins
|
||||
S1 = np.array([1.0, 0.0, 0.0])
|
||||
S2 = np.array([0.0, 1.0, 0.0])
|
||||
|
||||
alpha=0.01 # damping coefficient
|
||||
pi=math.pi
|
||||
|
||||
@ -30,6 +38,14 @@ def rotation_matrix(axis, theta):
|
||||
[2 * (bc - ad), aa + cc - bb - dd, 2 * (cd + ab)],
|
||||
[2 * (bd + ac), 2 * (cd - ab), aa + dd - bb - cc]])
|
||||
|
||||
#Definition of the Bethe-Slater function
|
||||
def func_BS(x,a,b,c):
|
||||
return 4*a*((x/c)**2)*(1-b*(x/c)**2)*np.exp(-(x/c)**2)
|
||||
|
||||
#Definition of the derivative of the Bethe-Slater function
|
||||
def func_dBS(x,a,b,c):
|
||||
return 4*a*((x/c)**2)*(1-b*(x/c)**2)*np.exp(-(x/c)**2)
|
||||
|
||||
# calculating precession field of spin Sr
|
||||
def calc_rot_vector(Sr,Sf):
|
||||
rot = (J0/hbar)*(Sf-alpha*np.cross(Sf,Sr))/(1.0+alpha**2)
|
||||
|
||||
@ -21,7 +21,7 @@ pair_coeff * * exchange 3.1 11.254 0.0 1.0
|
||||
variable Temperature equal 0.0
|
||||
variable RUN equal 30000
|
||||
|
||||
fix 1 all nve/spin lattice no
|
||||
fix 1 all nve/spin lattice frozen
|
||||
fix 2 all langevin/spin ${Temperature} 0.01 12345
|
||||
|
||||
compute out_mag all spin
|
||||
@ -36,6 +36,9 @@ variable emag equal c_out_mag[5]
|
||||
thermo_style custom step time v_magx v_magy v_magz v_emag pe etotal
|
||||
thermo 10
|
||||
|
||||
compute outsp all property/atom spx spy spz sp fmx fmy fmz
|
||||
dump 1 all custom 10 dump.data type x y z c_outsp[1] c_outsp[2] c_outsp[3] fx fy fz
|
||||
|
||||
timestep 0.0001
|
||||
|
||||
run ${RUN}
|
||||
|
||||
Reference in New Issue
Block a user