# -*-shell-script-*-
# Silicon bulk, lattice constant and cohesive energy
#setnolog
setoverwrite
dirname = runs/si-meam
#------------------------------------------------------------
#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 = body-centered-cubic
#latticeconst = 3.1903995085 #(A) for Si
makecnspec = [ 1 0 0  4
               0 1 0  4
               0 0 1  4 ]
makecrystal
#latticeconst = 5.426 makecrystal eval
#latticeconst = 5.427 makecrystal eval
#latticeconst = 5.428 makecrystal eval
#latticeconst = 5.429 makecrystal eval
#latticeconst = 5.430 makecrystal eval
#latticeconst = 5.431 makecrystal eval
#latticeconst = 5.432 makecrystal eval
#latticeconst = 5.433 makecrystal eval
#latticeconst = 5.434 makecrystal eval
#latticeconst = 5.435 makecrystal eval
#latticeconst = 5.436 makecrystal eval

#latticeconst = 3.185 makecrystal eval
#latticeconst = 3.186 makecrystal eval
#latticeconst = 3.187 makecrystal eval
#latticeconst = 3.188 makecrystal eval
#latticeconst = 3.189 makecrystal eval
#latticeconst = 3.190 makecrystal eval
#latticeconst = 3.191 makecrystal eval
#latticeconst = 3.192 makecrystal eval
#latticeconst = 3.193 makecrystal eval
#latticeconst = 3.194 makecrystal eval
#latticeconst = 3.195 makecrystal eval
#latticeconst = 3.196 makecrystal eval
#quit

#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
#latticeconst = 6.0 makecrystal eval
#latticeconst = 6.2 makecrystal eval
#latticeconst = 6.4 makecrystal eval
#latticeconst = 6.6 makecrystal eval
#latticeconst = 6.8 makecrystal eval
#latticeconst = 7.0 makecrystal eval
#latticeconst = 7.2 makecrystal eval
#latticeconst = 7.4 makecrystal eval
#latticeconst = 7.6 makecrystal eval
#latticeconst = 7.8 makecrystal eval
#latticeconst = 8.0 makecrystal eval
#latticeconst = 8.2 makecrystal eval
#latticeconst = 8.4 makecrystal eval
#latticeconst = 8.6 makecrystal eval
#latticeconst = 8.8 makecrystal eval
#latticeconst = 9.0 makecrystal eval
#latticeconst = 9.2 makecrystal eval
#latticeconst = 9.4 makecrystal eval
#latticeconst = 9.6 makecrystal eval
#latticeconst = 9.8 makecrystal eval
#latticeconst = 10.0 makecrystal eval
#latticeconst = 10.2 makecrystal eval
#latticeconst = 10.4 makecrystal eval
#latticeconst = 10.6 makecrystal eval
#latticeconst = 10.8 makecrystal eval
#latticeconst = 11.0 makecrystal eval
#latticeconst = 11.2 makecrystal eval
#latticeconst = 11.4 makecrystal eval
#latticeconst = 11.6 makecrystal eval
#latticeconst = 11.8 makecrystal eval

#------------------------------------------------------------
#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
#------------------------------------------------------------
#compute bulk modulus
saveH conj_fixbox = 1

#compress
#input = 0.9726 scaleH saveH
#input = 0.9435 scaleH saveH
#input = 0.9072 scaleH saveH
#input = 0.8973 scaleH saveH

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
