# -*-shell-script-*-
# MD code of Finnis-Sinclair Mo
#  create vacancy-interstitial (Frenkel) pair
setnolog
setoverwrite
dirname = runs/mo-frenkel
#--------------------------------------------
#Read in potential file
#
potfile = ~/Codes/MD++/potentials/mo_pot readpot
#------------------------------------------------------------
#Create Perfect Lattice Configuration
#
latticestructure = body-centered-cubic latticeconst = 3.1472 #(A) for Mo
latticesize = [ 1   0   0    10
                0   1   0    10
                0   0   1    10  ]
makecrystal finalcnfile = perf.cn writecn                
#-------------------------------------------------------------
#Create a Frenkel pair by moving an atom
#          activate  dx dy dz  atom_ID
input = [ 1         15 15 0   75       ] moveatom
#-------------------------------------------------------------
#Plot Configuration
atomradius = 1.0 bondradius = 0.3 bondlength = 0
atomcolor = cyan highlightcolor = purple backgroundcolor = gray
bondcolor = red fixatomcolor = yellow
color00 = "orange"  color01 = "red"    color02 = "green"
color03 = "magenta" color04 = "cyan"   color05 = "purple"
color06 = "gray80"  color07 = "white"
#----------------------------------
#  Use local energy to visualize defects
#plot_color_axis = 0
#plot_color_windows = [ 2
#                       -6.78 -6.7  6  #color06 = gray80
#                       -6.7  -6    4  #color04 = cyan
#                     ]
#----------------------------------
#  Use CSD to visualize defects
plot_color_axis = 2
plot_color_windows = [ 2
                       1  3    6  #color06 = gray80
                       3 10    4  #color04 = cyan
                     ]
#----------------------------------
plot_atom_info = 5  plotfreq = 10 
rotateangles = [ 0 0 0 1.2 ]
#
win_width = 600 win_height = 600
openwin alloccolors rotate saverot refreshnnlist eval plot
#sleep quit
#-------------------------------------------------------------
#Conjugate-Gradient relaxation
conj_ftol = 5e-5 conj_itmax = 1000 conj_fevalmax = 1000
conj_fixbox = 1 
relax finalcnfile = relaxed.cn writecn
#-------------------------------------------------------------
#Plot local energy or CSD parameter histogram
#eval input = [ -6.80 -5  50 ] # min, max, ngrid for energy
eval input = [  0.1  10  50 ] # min, max, ngrid for CSD
#
GnuPlotHistogram 
#-------------------------------------------------------------
sleep
quit
#-------------------------------------------------------------
