# -*-shell-script-*-
# Silicon bulk, lattice constant and cohesive energy
MD++ {
setnolog
setoverwrite
dirname = runs/si-bc8
#------------------------------------------------------------
#Read in MEAM potential
meamfile = "/home/caiwei/Codes/MD++/Fortran/MEAM-Baskes/meamf"
ntypes = 1  ename0 = "Siz  " #leave spaces to be compatible with fortran
rcut = 6  kode0 = "library"
readMEAM
NIC = 200 NNM = 200
#--------------------------------------------
# Create Perfect Lattice Configuration
#
#latticestructure = diamond-cubic
#latticeconst = 5.430949821 #(A) for Si
latticestructure = bc8
latticeconst = 6.64 #(A) for Si
makecnspec = [ 1 0 0  2
               0 1 0  2
               0 0 1  2 ]
makecrystal
#--------------------------------------------
# Plot Configuration
#
atomradius = [ 0.8 0.5 ] bondradius = 0.3
win_width = 500 win_height = 500
bondradius = 0.3 bondlength = 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 eval plot
#eval sleep quit
#------------------------------------------------------------
#Conjugate-Gradient relaxation
conj_ftol = 1e-6 conj_itmax = 1000 conj_fevalmax = 1000
conj_fixbox = 0
conj_fixboxvec = [ 0 1 1
                   1 0 1
                   1 1 0 ]
relax eval
sleep quit
#------------------------------------------------------------
#compute bulk modulus
saveH conj_fixbox = 1

restoreH input = [ 0.997 ] scaleH relax eval
restoreH input = [ 0.998 ] scaleH relax eval
restoreH input = [ 0.999 ] scaleH relax eval
restoreH input = [ 1.000 ] scaleH relax eval
restoreH input = [ 1.001 ] scaleH relax eval
restoreH input = [ 1.002 ] scaleH relax eval
restoreH input = [ 1.003 ] scaleH relax eval

#sleep
#quit
}
