# -*-shell-script-*-
# MD code of BCC Mo. edge dislocation
#------------------------------------------------------------
setnolog
setoverwrite
dirname = runs/CSD-book/chap3/moedge
#dirname = runs/CSD-book/chap3/moedge-300K
#--------------------------------------------
#Read in potential file
#
potfile = ~/Codes/MD++/potentials/mo_pot readpot
#------------------------------------------------------------
#Read in structure
#
#incnfile = ~/Codes/MD++/structures/CSD-book/chap3/moedge-30x20x8.cn readcn
#incnfile = ~/Codes/MD++/structures/CSD-book/chap3/moedge-30x20x8-cut.cn readcn
#incnfile = ~/Codes/MD++/structures/CSD-book/chap3/moedge-30x20x8-equil300K.cn readcn
#incnfile = topol.cn readcn
incnfile = ../moedge-300K/inter0009.cn readcn
#------------------------------------------------------------
#Create Perfect Lattice Configuration
#
#allocmultiple = 3
#latticestructure = body-centered-cubic latticeconst = 3.1472 #(A) for Mo
#makecnspec = [  0.5 0.5 0.5  30
#                -1 0 1   10
#                1 -2 1   8 ]
#makecn   finalcnfile = crystal1.cn writecn
#makecnspec = [  0.5 0.5 0.5  29
#                -1 0 1   10
#                1 -2 1   8 ]
#makecn   finalcnfile = crystal2.cn writecn
#incnfile = crystal1.cn splicecnspec = [ 2 0 ] splicecn
#finalcnfile = splice.cn writecn
#-------------------------------------------------------------
#setfixedatomspec = [ 0 -0.6 0.6 0.41 0.6 -0.6 0.6 ] setfixedatoms
#setfixedatomspec = [ 0 -0.6 0.6 -0.6 -0.44 -0.6 0.6 ] setfixedatoms
#removefixedatoms
#------------------------------------------------------------
#colors for Central symmetry view
color00 = "red" color01 = "blue" color02 = "green"
color03 = "magenta" color04 = "cyan" color05 = "purple"
color06 = "gray80"
#-------------------------------------------------------------
#
#Plot Configuration
#
atomradius = 1.0 bondradius = 0.3 bondlength = 0
atomcolor = cyan highlightcolor = purple backgroundcolor = gray
bondcolor = red fixatomcolor = yellow
hideatomenergy = [ 1 -6.725 -6 ]
#highlightenergy = [ 1 -6.725 ]
#plot_restrict = 1 plot_zmin = 0.4 plot_ymax = 0.5
#plot_restrict = 1 plot_ymin = 0
#plot_restrict = 1 plot_ymax = 0
plot_select = 3 plot_highlight = [ 0 0 1 2 3 4 5 6 7 8 9 ]
plotfreq = 10 
rotateangles = [ 0 0 0 1.2 ]
win_width = 600 win_height = 600
openwin  reversergb alloccolors rotate saverot refreshnnlist eval plot
#sleep quit
#-------------------------------------------------------------
#(central symmetry)
coloraxis = 2 refreshnnlist NCS = 8
#calcentralsymmetry writeall = 1 finalcnfile = topol.cn writecn #quit
#energyhistspec = [ 0 0 50 ] GnuPlotEnergyHistogram quit
color_window = [ 2
#                 0.05 0.2 0
                 0.5  10  4
                 10   20  6
               ]
plot
#finalcnfile = top.cfg writeatomeyecfg
#finalcnfile = bot.cfg writeatomeyecfg
sleep quit
#------------------------------------------------------------
#Conjugate-Gradient relaxation
#
conj_ftol = 1e-3 conj_itmax = 1000 conj_fevalmax = 1000
conj_fixbox = 1 
#relax finalcnfile = relaxed.cn writecn
#
conj_fixbox = 0 stress = [ 0 0 0 0 0 0 0 0 0 ]
#relax finalcnfile = relaxed.cn writecn
#sleep quit
#-------------------------------------------------------------
#MD setting
#fixbox = 1 #for MD
T_OBJ = 300 #(in K)
timestep = 0.0005 # (ps)
atommass = 95.94  #Mo (g/mol)
#for equilibration
DOUBLE_T = 1
initvelocity totalsteps = 2000
scalevelocity = 0
atomTcpl = 200.0 #Atomic T-coupling constant (for velocity scaling)
#saveprop = 0
saveprop = 1 savepropfreq = 10 openpropfile 
#run
writeall = 1
#finalcnfile = equil.cn writecn
#sleep quit
#quit
#------------------------------------------------------------
#Typical MD Simulation
#
usenosehoover = 1   vt2 = 1e28  
totalsteps = 200000 equilsteps = 0
saveprop = 1 savepropfreq = 100 openpropfile 
savecn = 1 savecnfreq = 1000 openintercnfile
#boundaryspeed = [ 0 0 -2e-3 ] #-5e-3
# on(1)/off(0) csdmin csdmax sdir(y) fdir(x) f(upper surface) f(lower surface)
boundaryforce = [ 1 10 20 2 1 -0.01289846848526006154 0.01304339509745399481 ] 
run  finalcnfile = run.cn writecn
quit
