Commit JT 010318 (before APS)

This commit is contained in:
julient31
2018-03-01 09:03:20 -07:00
parent 7990826ca2
commit e4c6c46b4c
10 changed files with 6143 additions and 24 deletions

View File

@ -23,8 +23,7 @@ set group all spin/random 11 2.50
pair_style hybrid/overlay pair/spin/exchange 6.0 pair/spin/me 4.5
pair_coeff * * pair/spin/exchange exchange 6.0 -0.01575 0.0 1.965
#pair_coeff * * pair/spin/me me 4.5 0.000109 1.0 1.0 1.0
pair_coeff * * pair/spin/me me 4.5 0.00109 1.0 1.0 1.0
pair_coeff * * pair/spin/me me 4.5 0.000109 1.0 1.0 1.0
neighbor 0.1 bin
neigh_modify every 10 check yes delay 20

View File

@ -22,11 +22,9 @@ mass 1 58.93
set group all spin/random 31 1.72
velocity all create 100 4928459 rot yes dist gaussian
#pair_style hybrid/overlay eam/alloy pair/spin/exchange 4.0 pair/spin/soc/neel 4.0
pair_style hybrid/overlay eam/alloy pair/spin/exchange 4.0
pair_coeff * * eam/alloy ../examples/SPIN/cobalt/Co_PurjaPun_2012.eam.alloy Co
pair_coeff * * eam/alloy ../examples/SPIN/cobalt_fcc/Co_PurjaPun_2012.eam.alloy Co
pair_coeff * * pair/spin/exchange exchange 4.0 0.0446928 0.003496 1.4885
#pair_coeff * * pair/spin/soc/neel neel 4.0 0.003330282 0.864159 2.13731
neighbor 0.1 bin
neigh_modify every 10 check yes delay 20
@ -55,5 +53,5 @@ thermo 10
#dump 1 all custom 50 dump_cobalt.lammpstrj type x y z spx spy spz
run 10
run 500

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
#Program fitting the exchange interaction
#Model curve: Bethe-Slater function
import numpy as np, pylab, tkinter
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
from decimal import *
print("Loop begin")
#Definition of the Bethe-Slater function
def func(x,a,b,c):
return 4*a*((x/c)**2)*(1-b*(x/c)**2)*np.exp(-(x/c)**2)
#Exchange coeff table (data to fit)
rdata, Jdata = np.loadtxt('exchange_hcp_co.dat', usecols=(0,1), unpack=True)
plt.plot(rdata, Jdata, 'b-', label='data')
#Perform the fit
popt, pcov = curve_fit(func, rdata, Jdata, bounds=(0, [500.,5.,5.]))
plt.plot(rdata, func(rdata, *popt), 'r--', label='fit')
#Print the fitted params
print("Parameters: a={:.10} (in meV), b={:.10} (adim), c={:.10} (in Ang)".format(*popt))
#Ploting the result
plt.xlabel('r_ij')
pylab.xlim([0,6.5])
plt.ylabel('J_ij')
plt.legend()
plt.show()
print("Loop end")

View File

@ -0,0 +1,9 @@
2.25569176882662 73.37931034482759
2.3817863397548162 47.99999999999999
2.4518388791593697 34.39080459770115
2.507880910683012 31.816091954022987
2.5359019264448337 28.137931034482747
2.5779334500875657 25.011494252873554
2.6339754816112086 19.126436781609186
2.760070052539404 13.241379310344826
3.5446584938704033 6.068965517241367

View File

@ -0,0 +1,60 @@
# fcc cobalt in a 3d periodic box
clear
units metal
atom_style spin
dimension 3
boundary p p p
# check why?
atom_modify map array
#lattice hcp 2.5071 2.5071 4.0695
lattice hcp 2.5071
region box block 0.0 5.0 0.0 5.0 0.0 5.0
create_box 1 box
create_atoms 1 box
# setting mass, mag. moments, and interactions for cobalt
mass 1 58.93
set group all spin/random 31 1.72
velocity all create 100 4928459 rot yes dist gaussian
#pair_style hybrid/overlay eam/alloy pair/spin/exchange 4.0 pair/spin/soc/neel 4.0
pair_style hybrid/overlay eam/alloy pair/spin/exchange 4.0
pair_coeff * * eam/alloy ../examples/SPIN/cobalt_hcp/Co_PurjaPun_2012.eam.alloy Co
pair_coeff * * pair/spin/exchange exchange 4.0 0.3593 1.135028015e-05 1.064568567
#pair_coeff * * pair/spin/soc/neel neel 4.0 0.0048 0.234 1.168 2.6905 0.705 0.652
neighbor 0.1 bin
neigh_modify every 10 check yes delay 20
fix 1 all force/spin zeeman 0.01 0.0 0.0 1.0
fix 2 all langevin/spin 0.0 0.0 21
fix 3 all integration/spin lattice yes
timestep 0.0001
compute out_mag all compute/spin
compute out_pe all pe
compute out_ke all ke
compute out_temp all temp
variable magz equal c_out_mag[3]
variable magnorm equal c_out_mag[4]
variable emag equal c_out_mag[5]
variable tmag equal c_out_mag[6]
variable mag_force equal f_1
thermo_style custom step time v_magnorm v_emag temp etotal
thermo 10
dump 1 all custom 50 dump_cobalt.lammpstrj type x y z spx spy spz
run 1000

View File

@ -48,8 +48,8 @@ velocity all create 200 4928459 rot yes dist gaussian
#Magneto-mechanic interactions for bulk fcc Cobalt
#pair_style pair/spin/exchange 4.0
#pair_style eam/alloy
#pair_style hybrid/overlay eam/alloy pair/spin/exchange 4.0 pair/spin/soc/neel 4.0
pair_style hybrid/overlay eam/alloy pair/spin/exchange 4.0
pair_style hybrid/overlay eam/alloy pair/spin/exchange 4.0 pair/spin/soc/neel 4.0
#pair_style hybrid/overlay eam/alloy pair/spin/exchange 4.0
pair_coeff * * eam/alloy ../examples/SPIN/dev/Co_PurjaPun_2012.eam.alloy Co
#pair_coeff * * ../Co_PurjaPun_2012.eam.alloy Co
@ -69,7 +69,7 @@ pair_coeff * * pair/spin/exchange exchange 4.0 0.0446928 0.003496 1.4885
#type i and j | interaction type | cutoff | K1 (eV) | K2 (adim) | K3 (Ang) (for SOC)
#pair_coeff * * pair/spin/soc/neel neel 4.0 0.003330282 0.864159 2.13731
#pair_coeff * * pair/spin/soc/neel neel 4.0 0.0048 0.234 1.168 2.6905 0.705 0.652
pair_coeff * * pair/spin/soc/neel neel 4.0 0.0048 0.234 1.168 2.6905 0.705 0.652
#pair_coeff * * pair/spin/soc/neel neel 4.0 0.0 0.864159 2.13731
@ -81,13 +81,13 @@ neigh_modify every 10 check yes delay 20
#Magnetic field fix
#Type | Intensity (T or eV) | Direction
fix 1 all force/spin zeeman 10.0 0.0 0.0 1.0
fix 1 all force/spin zeeman 0.0 0.0 0.0 1.0
#fix 1 all force/spin anisotropy 0.01 0.0 0.0 1.0
#Fix Langevin spins (merging damping and temperature)
#Temp | Alpha_trans | Alpha_long | Seed
#fix 2 all langevin/spin 0.0 0.1 0.0 21
fix 2 all langevin/spin 0.0 0.1 21
#fix 2 all langevin/spin 0.0 0.1 21
fix 2 all langevin/spin 0.0 0.0 21
#Magnetic integration fix
fix 3 all integration/spin lattice yes
@ -116,8 +116,8 @@ variable emag equal c_out_mag[5]
variable tmag equal c_out_mag[6]
thermo 50
thermo_style custom step time v_magx v_magy v_magy v_magnorm v_emag v_tmag
#thermo_style custom step time pe ke v_emag
#thermo_style custom step time v_magx v_magy v_magy v_magnorm v_emag v_tmag
thermo_style custom step time pe ke v_emag etotal
thermo_modify format float %20.15g
#Dump the positions and spin directions of magnetic particles (vmd format)
@ -125,5 +125,5 @@ thermo_modify format float %20.15g
#Running the simulations for N timesteps
#run 10
run 100
run 20000