# -*-shell-script-*-
# Silicon on Gold
#  test validity of MEAM potential
#------------------------------------------------------------
# Test MEAM potential
# Kuo, C.-L., Clancy, P.,  (Kuo04ss-AuSimeam.pdf)
#   MEAM molecular dynamics study of a gold thin film on a silicon substrate,
#   Surface Science, 551, 39-58 (2004).
#
# Chin-Lung Kuo and Paulette Clancy, (Kuo05msmse-AuSiOmeam.pdf)
#  Development of atomistic MEAM potentials for the silicon-oxygen-gold
#  ternary system, Modelling Simul. Mater. Sci. Eng. 13, 1309-1329 (2005).
#------------------------------------------------------------
setnolog
setoverwrite
dirname = runs/si_au
#------------------------------------------------------------
#Read in MEAM potential
meamfile = "/home/caiwei/Codes/MD++/Fortran/MEAM-Baskes/meamf"
meafile  = "/home/caiwei/Codes/MD++/Fortran/MEAM-Baskes/meafile_Au_Si"
#meafile  = "/home/caiwei/Codes/MD++/Fortran/MEAM-Baskes/meafile_Si_Au"
ntypes = 2  ename0 = "Au2  " ename1 = "Si2  " #leave spaces to be compatible with fortran
#meafile  = "/home/caiwei/Codes/MD++/Fortran/MEAM-Baskes/meafile_Mo_Si"
#ntypes = 2  ename0 = "Mo2  " ename1 = "Si1  " #leave spaces to be compatible with fortran
rcut = 8.0  kode0 = "library"
readMEAM
#
#------------------------------------------------------------
#Read in configuration file
#
#incnfile = AuSi4.cn  readcn
# relaxed structure: bond L = 2.23  E = 3.540 (17.700/5)
#                    [fix L = 2.01  E = 2.444]
#   Si2 ibar=-3    :      L = 2.314 E = 2.8202
#         reference: bond L = 2.01  E = 3.49
#
#incnfile = Au2Si7.cn readcn
# relaxed structure: bond L = 2.48 E = 3.774 (33.969/9)
#   Si2 ibar=-3    :      L = 2.1888 E = 3.2996
#         reference: bond L = 2.02  E = 3.84
#
#incnfile = fcc-au-6x6x6.cn readcn
#
#incnfile = dc-si-6x6x6.cn readcn
#
#incnfile = b1-ausi-6x6x6.cn readcn
#
#incnfile = L12-au3si-6x6x6.cn readcn
# relaxed structure: a = 4.158 (24.95 / 6)  Ecoh = 4.936 (4.2646 / 864)
#      Si3 Au3       a = 4.159              Ecoh = 4.936
#   Si2 ibar=-3    : a = 4.108              Ecoh = 5.233
#         reference: a = 4.150              Ecoh = 4.939
#
#reversespecies
#--------------------------------------------
element0 = "Au"   element1 = "Si"  
atommass = [ 196.96655 28.0855 ] # Si, Au (g/mol)
NNM = 200 NIC = 200
#--------------------------------------------
# Compute equilibrium lattice constant (Au)
latticesize = [ 1 0 0  6
                0 1 0  6
                0 0 1  6 ]
#crystalstructure = face-centered-cubic
#latticeconst = 3.9 makecrystal eval
#latticeconst = 4.0 makecrystal eval
#latticeconst = 4.1 makecrystal eval
#latticeconst = 4.2 makecrystal eval
#latticeconst = 4.3 makecrystal eval
#latticeconst = 4.4 makecrystal eval
#finalcnfile = fcc-au-6x6x6.cn writeall = 1 writecn quit
#quit
#--------------------------------------------
# Compute equilibrium lattice constant (Si)
crystalstructure = diamond-cubic
latticeconst = 5.431 makecrystal nspecies = 2 
input = [ 1 -10 10 -10 10 -10 10 ] fixatoms_by_position
input = 1 setfixedatomsspecies freeallatoms #Si
eval
quit
latticeconst = 5.3 makecrystal eval
latticeconst = 5.4 makecrystal eval
latticeconst = 5.5 makecrystal eval
latticeconst = 5.6 makecrystal eval
latticeconst = 5.7 makecrystal eval
quit
#--------------------------------------------
# Compute equilibrium lattice constant (Si - Au)
#crystalstructure = NaCl #(B1)
#latticeconst = 4.1 makecrystal eval
#latticeconst = 4.2 makecrystal eval
#latticeconst = 4.3 makecrystal eval
#latticeconst = 4.4 makecrystal eval
#latticeconst = 4.5 makecrystal eval
#latticeconst = 4.6 makecrystal eval
#latticeconst = 4.8 makecrystal eval
#latticeconst = 4.9 makecrystal eval
#latticeconst = 5.0 makecrystal eval
#latticeconst = 5.1 makecrystal eval
#latticeconst = 5.2 makecrystal eval
#quit
#--------------------------------------------
# Compute equilibrium lattice constant (Si - Au)
#crystalstructure = L1_2
#latticeconst = 3.2 makecrystal eval
#latticeconst = 3.4 makecrystal eval
#latticeconst = 3.6 makecrystal eval
#latticeconst = 3.8 makecrystal eval
#latticeconst = 4.0 makecrystal eval
#latticeconst = 4.2 makecrystal eval
#latticeconst = 4.4 makecrystal eval
#latticeconst = 4.6 makecrystal eval
#latticeconst = 4.8 makecrystal eval
#latticeconst = 5.0 makecrystal eval
#latticeconst = 5.2 makecrystal eval
#latticeconst = 5.4 makecrystal eval
#latticeconst = 5.6 makecrystal eval
#latticeconst = 5.8 makecrystal eval
#quit
# grep EPOT runs/si_au/A.log | sed -s 's/EPOT=//;'
#--------------------------------------------
# Plot Configuration
#
atomradius = [ 0.8 0.5 ] bondradius = 0.3 
win_width = 500 win_height = 500
bondradius = 0.3 bondlength = 2.5 #2.8285 #for Si
atomcolor = orange atomcolor1 = gray90 highlightcolor = purple  bondcolor = green
fixatomcolor = yellow backgroundcolor = gray70
color00 = "orange"  color01 = "purple" color02 = "green"
color03 = "magenta" color04 = "cyan"   color05 = "purple"
color06 = "gray80"  color07 = "white"
#plot_color_windows = [ 2
#                          -10 -3.8 0  #color00 = orange
#                          -3.8 10  1  #color01 = purple
#                     ]
plot_atom_info = 2 #2: real coordinates, 3: energy of atoms
plotfreq = 10
rotateangles = [ 0 0 0 1.2 ]
openwin alloccolors rotate saverot refreshnnlist plot
#eval sleep quit
#------------------------------------------------------------
#Conjugate-Gradient relaxation
conj_ftol = 1e-6 conj_itmax = 1000 conj_fevalmax = 1000000
conj_fixbox = 0
conj_fixboxvec = [ 0 1 1   #box remain rectangular
                   1 0 1
                   1 1 0 ]
eval relax 
eval # evaluate potential energy after relaxation
writeall=1 
finalcnfile = relaxed.cn writecn
#quit
plot sleep quit
#-------------------------------------------------------------





























#Appendix
#-------------------------------------------------------------
# meamf file
# elt   lat   z ielement atwt    alpha      b0    b1   b2  b3   alat  esub asub t0  t1   t2    t3  rozero ibar
#'Siz' 'dia'  4.  14     28.086  4.87       4.4   5.5  5.5 5.5  5.431 4.63 1.   1.0 3.13 4.47 -1.80 1.600 0
#'Sis' 'dia'  4.  14     28.086  4.87       4.4   5.5  5.5 5.5  5.431 4.63 1.   1.0 3.13 4.47 -1.80 2.05  0
#
#'Six' 'dia'  4.  14     28.086  4.87       4.4   5.5  5.5 5.5  5.431 4.63 1.   1.0 2.05 4.47 -1.80 1.000 0
#'SiG' 'dia'  4.  14     28.086  4.87       4.1   4.0  1.5 3.5  5.431 4.63 1.   1.0 1.75 4.47 -1.80 1.000 0
#'Si'  'dia'  4.  14     28.086  4.87       4.8   4.8  4.8 4.8  5.431 4.63 1.   1.0 3.30 5.105 -0.80 1.   1
#'Sit' 'dia'  4.  14     28.086  4.87       4.4   5.5  5.5 5.5  5.431 4.63 1.   1.0 2.05 4.47 -0.00 1.000 0
#'Au1' 'fcc'  12. 79     196.967 6.34090112 5.45  2.20 6   2.20 4.07  3.93 1.04 1.0 3.15 1.51  2.60 1.    0
#'Au'  'fcc'  12. 79     196.967 6.34090112 5.449 2.20 6   2.20 4.07  3.93 1.04 1.0 1.58956328 1.50776392 2.60609758 1. 0
#
#'Si2' 'dia'  4.  14     28.086  4.87       4.4   5.5  5.5 5.5  5.4271 4.63 1.   1.0 2.05 4.47 -1.80 2.05 0
#'Au2' 'fcc'  12. 79     196.967 6.34       5.45  1.2  6   1.2  4.0729 3.93 1.04 1.0 2.59 -1.0  4.51 0.87 0
#       y     y   y      y       y          y     y    y   y    c      y    y    y   y    y     y    y
#'Ge'  'dia'  4   32     72.64   4.98       4.55  5.5  5.5 5.5  5.6575 3.85 1.   1.0 4.02 5.23 -1.60 1.60 0
#unknown parameters
#alatt - Ri0
#att (only for fitting ? no, can specify in meafile.)
#rep (only for fitting ? no, can specify in meafile.)
#ibar (negative square root calls - specify how rho bar is computed)
#t1 = 2.05 but should be 3.13 is this a typo in Kuo 2004?
# (no, also in Baskes 1999, 3.13 + 3/5*(-1.80) = 2.05 )
# need to add legend = 0.6 to meafile
#
# meafile_Au_Si
#deltas account for the change of esub (Ei0)
# what is legend?
# 8/8/97 added correction to t3 term (legend)
# legendre correction: see Baskes99msea-mosi.pdf
# also see Baskes94msmse-NiSi.pdf
#
# The order Au2-Sis is important
# add repuls(1,2)=1.27 to meafile_Au_Si
#  legend = 0.6 seems to make agreement worse (N/A)
# a and Ecoh not exactly match with reference for L1_2 (should be B1)
#
# ibar - how electron density rhobar is calculated
#
# what is ialloy?
