# -*-shell-script-*-
# Create single screw dislocation in BCC Ta
# under fixed boundary condition
#------------------------------------------------------------
setnolog
setoverwrite
dirname = runs/CSD-book/tmp6
shmsize = 20971520 shmallocate #20MB
#--------------------------------------------
#Read in potential file
#
potfile = ~/Codes/MD++/potentials/ta_pot readpot
#------------------------------------------------------------
#Read in structure
#
#incnfile = /home/cai2/Codes/MOLLY3/structures/tapeierls-112/dip-16x9x5-x-s0.cn
#incnfile = ../tmp2/relaxed-s2.18.cn
#incnfile = ../tmp/relaxed.cn
#readcn
#fixedatomenergypartition = 1 vacuumratio = 0.91015625 eval quit
allocmultiple = 3  
#------------------------------------------------------------
#Create Perfect Lattice Configuration
#
latticestructure = body-centered-cubic latticeconst = 3.3058 #(A) for Ta
makecnspec = [  1   1  -2   10 #40 #20 #10 #8    #for screw [111]
                1  -1   0   16 #64 #32 #16 #14
                0.5   0.5   0.5   1 ]
makecn finalcnfile = perf.cn writecn
#-------------------------------------------------------------
#Create Dislocation Dipole
#(screw) [111]
mkdislspec = [ 3 1 #z(dislocation line) x(cut direction)
             0 0 -1 #(burgers vector relative to box)
#             -0.0119 0.0208  #(dislocation position relative to box (y,x))
#             -0.0104 0.0167   #(dislocation position relative to box (y,x) 10x16)
             -0.0208 0.0334   #(dislocation position relative to box (y,x) 10x16)
#             -0.0052 0.00835   #(dislocation position relative to box (y,x) 20x32)
#             -0.0026 0.004175   #(dislocation position relative to box (y,x) 20x32)
             0.305 #\nu
#             20 27.8 32   #(Rfix, Rgfbc, Rrem in Angstrom)
             23.6 27.8 32   #(Rfix, Rgfbc, Rrem in Angstrom)
#             55.6 59.8 64   #(Rfix, Rgfbc, Rrem in Angstrom)
#             119.6 123.8 130  #(Rfix, Rgfbc, Rrem in Angstrom)
             ]
fixedatomenergypartition = 1
makedislcylinder finalcnfile = makedisl.cn writecn #quit
vacuumratio = 0.640625 #1-345/960
#vacuumratio = 0.91015625 #1-345/3840
#vacuumratio = 0.5591145833 #1-1693/3840
#vacuumratio = 0.516015625 #1-7434/15360
extendboxspec = [ 3 3 ] extendbox finalcnfile = extend.cn writecn
#
#Stress (in MPa)= (8x14x3 single rfix=20  VIRIAL)
#[ 7.6741814966e+01   1.2998819305e-02  -6.0210315849e-03
#  1.2998819305e-02   7.6745659783e+01  -4.1939472632e-02
# -6.0210315850e-03  -4.1939472632e-02  -5.4400964856e+01]
#Stress (in MPa)= (8x14x3 single rfix=23.6 VIRIAL)
#[ 8.2826153959e+01   1.3344131976e-02  -5.9598456668e-03
#  1.3344131976e-02   8.2830523188e+01  -4.3406099689e-02
# -5.9598456668e-03  -4.3406099689e-02  -5.6254494159e+01]
#-------------------------------------------------------------
#Create Dislocation Dipole
#(screw) [111]
mkdipole = [ 3 2 #z(dislocation line), y(dipole direction)
             0 0 1 #(burgers vector relative to box)
             0 -0.2632  0.2368 #(8x19x5)
             0.305 #\nu
             -10 10 -10 10 1  #number of images
             0 0 0 0 ]
#makedipole finalcnfile = makedp.cn writecn
#extendboxspec = [ 3 3 ] extendbox finalcnfile = extend.cn writecn
#
#Stress (in MPa)= (8x19x3 VIRIAL box fixed)
#[ 1.6218534577e+02   7.7248528450e-04   1.2182575835e+01
#  7.7248528454e-04   1.0997857740e+02   1.0257756578e-03
#  1.2182575835e+01   1.0257756578e-03  -8.0810595561e+01]
#------------------------------------------------------------
#
#Plot Configuration
#
atomradius = 1.0 bondradius = 0.3 bondlength = 0
atomcolor = cyan highlightcolor = purple 
bondcolor = red fixatomcolor = gray80 #red #yellow
win_width = 400 win_height = 400 backgroundcolor = gray30
highlightenergy = [ 1 -8.05 ]
#hideatomenergy = [ 1 -8.09 -6 ]
#plot_restrict = 1
#plot_zmin = 0 plot_zmax = 0.3
plot_select = 1
plotfreq = 10 
rotateangles = [ 0 0 0 1.5 ]
win_width = 500 win_height = 500
openwin reversergb alloccolors rotate saverot refreshnnlist eval plot
#sleep quit
#-------------------------------------------------------------
#Conjugate-Gradient relaxation
#
conj_ftol = 1e-10 conj_itmax = 1000 conj_fevalmax = 10000 #0
conj_fixbox = 1 #conj_monitor = 1 conj_summary = 1
##define relax fortranrelax eval plot
writeall = 1
#relax finalcnfile = relaxed.cn writecn eval
#sleep quit
conj_fixbox = 0
conj_fixboxvec = [ 0 0 1
                   1 0 1
                   0 0 0 ]
stress = [ 0 0 0 
           0 0 0
           0 0 0 ] #(stress in MPa)
relax finalcnfile = relaxed-s0.cn writecn eval
sleep quit
#-------------------------------------------------------------
#Measuring Peierls Stress
incnfile = ../tmp4/relaxed-s2.2.cn readcn eval 
plot sleep quit
#conj_fevalmax = 500
#stressmul = -1
#stress = [ 0 0 0 0 0 500 0 500 0 ] relax eval finalcnfile = relaxed-s0.5.cn writecn
#stress = [ 0 0 0 0 0 600 0 600 0 ] relax eval finalcnfile = relaxed-s0.6.cn writecn 
#stress = [ 0 0 0 0 0 700 0 700 0 ] relax eval finalcnfile = relaxed-s0.7.cn writecn 
#stress = [ 0 0 0 0 0 800 0 800 0 ] relax eval finalcnfile = relaxed-s0.8.cn writecn
#stress = [ 0 0 0 0 0 900 0 900 0 ] relax eval finalcnfile = relaxed-s0.9.cn writecn 
#stress = [ 0 0 0 0 0 1000 0 1000 0 ] relax eval finalcnfile = relaxed-s1.0.cn writecn
#stress = [ 0 0 0 0 0 1100 0 1100 0 ] relax eval finalcnfile = relaxed-s1.1.cn writecn
#stress = [ 0 0 0 0 0 1200 0 1200 0 ] relax eval finalcnfile = relaxed-s1.2.cn writecn
#stress = [ 0 0 0 0 0 1300 0 1300 0 ] relax eval finalcnfile = relaxed-s1.3.cn writecn
#stress = [ 0 0 0 0 0 1400 0 1400 0 ] relax eval finalcnfile = relaxed-s1.4.cn writecn
#stress = [ 0 0 0 0 0 1500 0 1500 0 ] relax eval finalcnfile = relaxed-s1.5.cn writecn
#stress = [ 0 0 0 0 0 1600 0 1600 0 ] relax eval finalcnfile = relaxed-s1.6.cn writecn
#stress = [ 0 0 0 0 0 1700 0 1700 0 ] relax eval finalcnfile = relaxed-s1.7.cn writecn
#stress = [ 0 0 0 0 0 1800 0 1800 0 ] relax eval finalcnfile = relaxed-s1.8.cn writecn
#stress = [ 0 0 0 0 0 1900 0 1900 0 ] relax eval finalcnfile = relaxed-s1.9.cn writecn
#stress = [ 0 0 0 0 0 1910 0 1910 0 ] relax eval finalcnfile = relaxed-s1.91.cn writecn
#stress = [ 0 0 0 0 0 1920 0 1920 0 ] relax eval finalcnfile = relaxed-s1.92.cn writecn
#stress = [ 0 0 0 0 0 1930 0 1930 0 ] relax eval finalcnfile = relaxed-s1.93.cn writecn
#stress = [ 0 0 0 0 0 1940 0 1940 0 ] relax eval finalcnfile = relaxed-s1.94.cn writecn
#stress = [ 0 0 0 0 0 1950 0 1950 0 ] relax eval finalcnfile = relaxed-s1.95.cn writecn
#stress = [ 0 0 0 0 0 1960 0 1960 0 ] relax eval finalcnfile = relaxed-s1.96.cn writecn
#stress = [ 0 0 0 0 0 1970 0 1970 0 ] relax eval finalcnfile = relaxed-s1.97.cn writecn
#stress = [ 0 0 0 0 0 1980 0 1980 0 ] relax eval finalcnfile = relaxed-s1.98.cn writecn
#stress = [ 0 0 0 0 0 1990 0 1990 0 ] relax eval finalcnfile = relaxed-s1.99.cn writecn
#stress = [ 0 0 0 0 0 2000 0 2000 0 ] relax eval finalcnfile = relaxed-s2.0.cn writecn
#stress = [ 0 0 0 0 0 2010 0 2010 0 ] relax eval finalcnfile = relaxed-s2.01.cn writecn
#stress = [ 0 0 0 0 0 2020 0 2020 0 ] relax eval finalcnfile = relaxed-s2.02.cn writecn
#stress = [ 0 0 0 0 0 2030 0 2030 0 ] relax eval finalcnfile = relaxed-s2.03.cn writecn
#stress = [ 0 0 0 0 0 2040 0 2040 0 ] relax eval finalcnfile = relaxed-s2.04.cn writecn
#stress = [ 0 0 0 0 0 2050 0 2050 0 ] relax eval finalcnfile = relaxed-s2.05.cn writecn
#stress = [ 0 0 0 0 0 2060 0 2060 0 ] relax eval finalcnfile = relaxed-s2.06.cn writecn
#stress = [ 0 0 0 0 0 2070 0 2070 0 ] relax eval finalcnfile = relaxed-s2.07.cn writecn
#stress = [ 0 0 0 0 0 2080 0 2080 0 ] relax eval finalcnfile = relaxed-s2.08.cn writecn
#stress = [ 0 0 0 0 0 2090 0 2090 0 ] relax eval finalcnfile = relaxed-s2.09.cn writecn
#stress = [ 0 0 0 0 0 2100 0 2100 0 ] relax eval finalcnfile = relaxed-s2.1.cn writecn
#stress = [ 0 0 0 0 0 2110 0 2110 0 ] relax eval finalcnfile = relaxed-s2.11.cn writecn
#stress = [ 0 0 0 0 0 2120 0 2120 0 ] relax eval finalcnfile = relaxed-s2.12.cn writecn
#stress = [ 0 0 0 0 0 2130 0 2130 0 ] relax eval finalcnfile = relaxed-s2.13.cn writecn
stress = [ 0 0 0 0 0 2140 0 2140 0 ] relax eval finalcnfile = relaxed-s2.14.cn writecn
stress = [ 0 0 0 0 0 2150 0 2150 0 ] relax eval finalcnfile = relaxed-s2.15.cn writecn
stress = [ 0 0 0 0 0 2160 0 2160 0 ] relax eval finalcnfile = relaxed-s2.16.cn writecn
stress = [ 0 0 0 0 0 2170 0 2170 0 ] relax eval finalcnfile = relaxed-s2.17.cn writecn
stress = [ 0 0 0 0 0 2180 0 2180 0 ] relax eval finalcnfile = relaxed-s2.18.cn writecn
stress = [ 0 0 0 0 0 2190 0 2190 0 ] relax eval finalcnfile = relaxed-s2.19.cn writecn
stress = [ 0 0 0 0 0 2200 0 2200 0 ] relax eval finalcnfile = relaxed-s2.2.cn writecn
stress = [ 0 0 0 0 0 2210 0 2210 0 ] relax eval finalcnfile = relaxed-s2.21.cn writecn
stress = [ 0 0 0 0 0 2220 0 2220 0 ] relax eval finalcnfile = relaxed-s2.22.cn writecn
stress = [ 0 0 0 0 0 2230 0 2230 0 ] relax eval finalcnfile = relaxed-s2.23.cn writecn
stress = [ 0 0 0 0 0 2240 0 2240 0 ] relax eval finalcnfile = relaxed-s2.24.cn writecn
stress = [ 0 0 0 0 0 2250 0 2250 0 ] relax eval finalcnfile = relaxed-s2.25.cn writecn
stress = [ 0 0 0 0 0 2260 0 2260 0 ] relax eval finalcnfile = relaxed-s2.26.cn writecn
stress = [ 0 0 0 0 0 2270 0 2270 0 ] relax eval finalcnfile = relaxed-s2.27.cn writecn
stress = [ 0 0 0 0 0 2280 0 2280 0 ] relax eval finalcnfile = relaxed-s2.28.cn writecn
stress = [ 0 0 0 0 0 2290 0 2290 0 ] relax eval finalcnfile = relaxed-s2.29.cn writecn
#stress = [ 0 0 0 0 0 2300 0 2300 0 ] relax eval finalcnfile = relaxed-s2.3.cn writecn
#stress = [ 0 0 0 0 0 2310 0 2310 0 ] relax eval finalcnfile = relaxed-s2.31.cn writecn
#stress = [ 0 0 0 0 0 2320 0 2320 0 ] relax eval finalcnfile = relaxed-s2.32.cn writecn
#stress = [ 0 0 0 0 0 2330 0 2330 0 ] relax eval finalcnfile = relaxed-s2.33.cn writecn
#stress = [ 0 0 0 0 0 2340 0 2340 0 ] relax eval finalcnfile = relaxed-s2.34.cn writecn
#stress = [ 0 0 0 0 0 2350 0 2350 0 ] relax eval finalcnfile = relaxed-s2.35.cn writecn
#stress = [ 0 0 0 0 0 2360 0 2360 0 ] relax eval finalcnfile = relaxed-s2.36.cn writecn
#stress = [ 0 0 0 0 0 2370 0 2370 0 ] relax eval finalcnfile = relaxed-s2.37.cn writecn
#stress = [ 0 0 0 0 0 2380 0 2380 0 ] relax eval finalcnfile = relaxed-s2.38.cn writecn
#stress = [ 0 0 0 0 0 2390 0 2390 0 ] relax eval finalcnfile = relaxed-s2.39.cn writecn
#stress = [ 0 0 0 0 0 2400 0 2400 0 ] relax eval finalcnfile = relaxed-s2.4.cn writecn
#stress = [ 0 0 0 0 0 2410 0 2410 0 ] relax eval finalcnfile = relaxed-s2.41.cn writecn
#stress = [ 0 0 0 0 0 2420 0 2420 0 ] relax eval finalcnfile = relaxed-s2.42.cn writecn
#stress = [ 0 0 0 0 0 2430 0 2430 0 ] relax eval finalcnfile = relaxed-s2.43.cn writecn
#stress = [ 0 0 0 0 0 2440 0 2440 0 ] relax eval finalcnfile = relaxed-s2.44.cn writecn
#stress = [ 0 0 0 0 0 2450 0 2450 0 ] relax eval finalcnfile = relaxed-s2.45.cn writecn
#stress = [ 0 0 0 0 0 2460 0 2460 0 ] relax eval finalcnfile = relaxed-s2.46.cn writecn
#stress = [ 0 0 0 0 0 2470 0 2470 0 ] relax eval finalcnfile = relaxed-s2.47.cn writecn
#stress = [ 0 0 0 0 0 2480 0 2480 0 ] relax eval finalcnfile = relaxed-s2.48.cn writecn
#stress = [ 0 0 0 0 0 2490 0 2490 0 ] relax eval finalcnfile = relaxed-s2.49.cn writecn
#stress = [ 0 0 0 0 0 2500 0 2500 0 ] relax eval finalcnfile = relaxed-s2.5.cn writecn
#stress = [ 0 0 0 0 0 2510 0 2510 0 ] relax eval finalcnfile = relaxed-s2.51.cn writecn
#stress = [ 0 0 0 0 0 2520 0 2520 0 ] relax eval finalcnfile = relaxed-s2.52.cn writecn
#stress = [ 0 0 0 0 0 2530 0 2530 0 ] relax eval finalcnfile = relaxed-s2.53.cn writecn
#stress = [ 0 0 0 0 0 2540 0 2540 0 ] relax eval finalcnfile = relaxed-s2.54.cn writecn
#stress = [ 0 0 0 0 0 2550 0 2550 0 ] relax eval finalcnfile = relaxed-s2.55.cn writecn
#stress = [ 0 0 0 0 0 2560 0 2560 0 ] relax eval finalcnfile = relaxed-s2.56.cn writecn
#stress = [ 0 0 0 0 0 2570 0 2570 0 ] relax eval finalcnfile = relaxed-s2.57.cn writecn
#stress = [ 0 0 0 0 0 2580 0 2580 0 ] relax eval finalcnfile = relaxed-s2.58.cn writecn
#stress = [ 0 0 0 0 0 2590 0 2590 0 ] relax eval finalcnfile = relaxed-s2.59.cn writecn
#stress = [ 0 0 0 0 0 2600 0 2600 0 ] relax eval finalcnfile = relaxed-s2.6.cn writecn
#stress = [ 0 0 0 0 0 2700 0 2700 0 ] relax eval finalcnfile = relaxed-s2.7.cn writecn
#stress = [ 0 0 0 0 0 2710 0 2710 0 ] relax eval finalcnfile = relaxed-s2.71.cn writecn
#stress = [ 0 0 0 0 0 2720 0 2720 0 ] relax eval finalcnfile = relaxed-s2.72.cn writecn
#stress = [ 0 0 0 0 0 2730 0 2730 0 ] relax eval finalcnfile = relaxed-s2.73.cn writecn
#stress = [ 0 0 0 0 0 2740 0 2740 0 ] relax eval finalcnfile = relaxed-s2.74.cn writecn
#stress = [ 0 0 0 0 0 2750 0 2750 0 ] relax eval finalcnfile = relaxed-s2.75.cn writecn
#stress = [ 0 0 0 0 0 2760 0 2760 0 ] relax eval finalcnfile = relaxed-s2.76.cn writecn
#stress = [ 0 0 0 0 0 2770 0 2770 0 ] relax eval finalcnfile = relaxed-s2.77.cn writecn
#stress = [ 0 0 0 0 0 2780 0 2780 0 ] relax eval finalcnfile = relaxed-s2.78.cn writecn
#stress = [ 0 0 0 0 0 2790 0 2790 0 ] relax eval finalcnfile = relaxed-s2.79.cn writecn
#stress = [ 0 0 0 0 0 2800 0 2800 0 ] relax eval finalcnfile = relaxed-s2.8.cn writecn
#sleep quit


#Peierls stress data
#[ 10x16x3 R=23.6 27.8 32 n=345/960  2.18(5) GPa ]
#[ 20x32x3 R=23.6 27.8 32 n=345/3840 2.18(5) GPa ]
#[ 20x32x3 R=55.6 59.8 64 n=1693/3840 2.20(5) GPa ]
#[ 40x64x3 R=119.6 123.8 130 n=7434/15360 2.20(5) 2.19(5)GPa ]
