# -*-shell-script-*-
# MD code of YSZ grain boundary
#------------------------------------------------------------
setnolog
setoverwrite
dirname = runs/yszruns/c
NIC=2000
NNM=2500
#-------------------------------------------------------------
# Read Initial Configuration
#-------------------------------------------------------------
# Species Setting
#-------------------------------------------------------------
# Zr: 0 | O: 1 | Y: 3
#-------------------------------------------------------------
element0 = "Zr"   atommass0=91.220   atomcharge0=+4.0
element1 = "O"    atommass1=15.999   atomcharge1=-2.0
element3 = "Y"    atommass3=88.910   atomcharge3=+3.0
atommass = [ 91.220 15.999 0 88.910 ]
#------------------------------------------------------------
# Plot Configuration
#------------------------------------------------------------
#atomradius = [ 0.5 0.3 0 0.6]
atomradius = [ 0 0 0 0.6]
bondradius = 0.1 bondlength = 0 #2.5
atomcolor0 = "orange" highlightcolor =purple   bondcolor = black 
backgroundcolor = gray
atomcolor1 = "red" atomcolor2 = "cyan" atomcolor3 = "blue"
fixatomcolor = yellow
#------------------------------------------------------------
color00 = "orange"  color01 = "purple" color02 = "green"
color03 = "magenta" color04 = "cyan"   color05 = "purple"
color06 = "gray80"  color07 = "white"
#------------------------------------------------------------
#plot_color_windows = [ 2
#                          -10 -4.5 0  #color00 = orange
#                          -4.5 10  1  #color01 = purple
#                     ]
#------------------------------------------------------------
#plot_atom_info = 1
#plotfreq = 10
rotateangles = [ 0 0 0 1.5 ] win_width = 800 win_height = 800
#openwin alloccolors rotate saverot eval plot
#eval
#sleep quit
#-------------------------------------------------------------
incnfile="inter0001.cn" readcn finalcnfile = "inter0001.cfg" writeatomeyecfg
incnfile="inter0002.cn" readcn finalcnfile = "inter0002.cfg" writeatomeyecfg
incnfile="inter0003.cn" readcn finalcnfile = "inter0003.cfg" writeatomeyecfg
incnfile="inter0004.cn" readcn finalcnfile = "inter0004.cfg" writeatomeyecfg
incnfile="inter0005.cn" readcn finalcnfile = "inter0005.cfg" writeatomeyecfg
incnfile="inter0006.cn" readcn finalcnfile = "inter0006.cfg" writeatomeyecfg
incnfile="inter0007.cn" readcn finalcnfile = "inter0007.cfg" writeatomeyecfg
incnfile="inter0008.cn" readcn finalcnfile = "inter0008.cfg" writeatomeyecfg
incnfile="inter0009.cn" readcn finalcnfile = "inter0009.cfg" writeatomeyecfg
incnfile="inter0010.cn" readcn finalcnfile = "inter0010.cfg" writeatomeyecfg
incnfile="inter0011.cn" readcn finalcnfile = "inter0011.cfg" writeatomeyecfg
incnfile="inter0012.cn" readcn finalcnfile = "inter0012.cfg" writeatomeyecfg
incnfile="inter0013.cn" readcn finalcnfile = "inter0013.cfg" writeatomeyecfg
incnfile="inter0014.cn" readcn finalcnfile = "inter0014.cfg" writeatomeyecfg
incnfile="inter0015.cn" readcn finalcnfile = "inter0015.cfg" writeatomeyecfg
incnfile="inter0016.cn" readcn finalcnfile = "inter0016.cfg" writeatomeyecfg
incnfile="inter0017.cn" readcn finalcnfile = "inter0017.cfg" writeatomeyecfg
incnfile="inter0018.cn" readcn finalcnfile = "inter0018.cfg" writeatomeyecfg
incnfile="inter0019.cn" readcn finalcnfile = "inter0019.cfg" writeatomeyecfg
incnfile="inter0020.cn" readcn finalcnfile = "inter0020.cfg" writeatomeyecfg
incnfile="inter0021.cn" readcn finalcnfile = "inter0021.cfg" writeatomeyecfg
incnfile="inter0022.cn" readcn finalcnfile = "inter0022.cfg" writeatomeyecfg
incnfile="inter0023.cn" readcn finalcnfile = "inter0023.cfg" writeatomeyecfg
incnfile="inter0024.cn" readcn finalcnfile = "inter0024.cfg" writeatomeyecfg
incnfile="inter0025.cn" readcn finalcnfile = "inter0025.cfg" writeatomeyecfg
incnfile="inter0026.cn" readcn finalcnfile = "inter0026.cfg" writeatomeyecfg
incnfile="inter0027.cn" readcn finalcnfile = "inter0027.cfg" writeatomeyecfg
incnfile="inter0028.cn" readcn finalcnfile = "inter0028.cfg" writeatomeyecfg
incnfile="inter0029.cn" readcn finalcnfile = "inter0029.cfg" writeatomeyecfg
incnfile="inter0030.cn" readcn finalcnfile = "inter0030.cfg" writeatomeyecfg
incnfile="inter0031.cn" readcn finalcnfile = "inter0031.cfg" writeatomeyecfg
incnfile="inter0032.cn" readcn finalcnfile = "inter0032.cfg" writeatomeyecfg
incnfile="inter0033.cn" readcn finalcnfile = "inter0033.cfg" writeatomeyecfg
incnfile="inter0034.cn" readcn finalcnfile = "inter0034.cfg" writeatomeyecfg
incnfile="inter0035.cn" readcn finalcnfile = "inter0035.cfg" writeatomeyecfg
incnfile="inter0036.cn" readcn finalcnfile = "inter0036.cfg" writeatomeyecfg
incnfile="inter0037.cn" readcn finalcnfile = "inter0037.cfg" writeatomeyecfg
incnfile="inter0038.cn" readcn finalcnfile = "inter0038.cfg" writeatomeyecfg
incnfile="inter0039.cn" readcn finalcnfile = "inter0039.cfg" writeatomeyecfg
incnfile="inter0040.cn" readcn finalcnfile = "inter0040.cfg" writeatomeyecfg
incnfile="inter0041.cn" readcn finalcnfile = "inter0041.cfg" writeatomeyecfg
incnfile="inter0042.cn" readcn finalcnfile = "inter0042.cfg" writeatomeyecfg
incnfile="inter0043.cn" readcn finalcnfile = "inter0043.cfg" writeatomeyecfg
incnfile="inter0044.cn" readcn finalcnfile = "inter0044.cfg" writeatomeyecfg
incnfile="inter0045.cn" readcn finalcnfile = "inter0045.cfg" writeatomeyecfg
incnfile="inter0046.cn" readcn finalcnfile = "inter0046.cfg" writeatomeyecfg
incnfile="inter0047.cn" readcn finalcnfile = "inter0047.cfg" writeatomeyecfg
incnfile="inter0048.cn" readcn finalcnfile = "inter0048.cfg" writeatomeyecfg
incnfile="inter0049.cn" readcn finalcnfile = "inter0049.cfg" writeatomeyecfg
incnfile="inter0050.cn" readcn finalcnfile = "inter0050.cfg" writeatomeyecfg
incnfile="inter0051.cn" readcn finalcnfile = "inter0051.cfg" writeatomeyecfg
incnfile="inter0052.cn" readcn finalcnfile = "inter0052.cfg" writeatomeyecfg
incnfile="inter0053.cn" readcn finalcnfile = "inter0053.cfg" writeatomeyecfg
incnfile="inter0054.cn" readcn finalcnfile = "inter0054.cfg" writeatomeyecfg
incnfile="inter0055.cn" readcn finalcnfile = "inter0055.cfg" writeatomeyecfg
incnfile="inter0056.cn" readcn finalcnfile = "inter0056.cfg" writeatomeyecfg
incnfile="inter0057.cn" readcn finalcnfile = "inter0057.cfg" writeatomeyecfg
incnfile="inter0058.cn" readcn finalcnfile = "inter0058.cfg" writeatomeyecfg
incnfile="inter0059.cn" readcn finalcnfile = "inter0059.cfg" writeatomeyecfg
incnfile="inter0060.cn" readcn finalcnfile = "inter0060.cfg" writeatomeyecfg
incnfile="inter0061.cn" readcn finalcnfile = "inter0061.cfg" writeatomeyecfg
incnfile="inter0062.cn" readcn finalcnfile = "inter0062.cfg" writeatomeyecfg
incnfile="inter0063.cn" readcn finalcnfile = "inter0063.cfg" writeatomeyecfg
incnfile="inter0064.cn" readcn finalcnfile = "inter0064.cfg" writeatomeyecfg
incnfile="inter0065.cn" readcn finalcnfile = "inter0065.cfg" writeatomeyecfg
incnfile="inter0066.cn" readcn finalcnfile = "inter0066.cfg" writeatomeyecfg
incnfile="inter0067.cn" readcn finalcnfile = "inter0067.cfg" writeatomeyecfg
incnfile="inter0068.cn" readcn finalcnfile = "inter0068.cfg" writeatomeyecfg
incnfile="inter0069.cn" readcn finalcnfile = "inter0069.cfg" writeatomeyecfg
incnfile="inter0070.cn" readcn finalcnfile = "inter0070.cfg" writeatomeyecfg
incnfile="inter0071.cn" readcn finalcnfile = "inter0071.cfg" writeatomeyecfg
incnfile="inter0072.cn" readcn finalcnfile = "inter0072.cfg" writeatomeyecfg
incnfile="inter0073.cn" readcn finalcnfile = "inter0073.cfg" writeatomeyecfg
incnfile="inter0074.cn" readcn finalcnfile = "inter0074.cfg" writeatomeyecfg
incnfile="inter0075.cn" readcn finalcnfile = "inter0075.cfg" writeatomeyecfg
incnfile="inter0076.cn" readcn finalcnfile = "inter0076.cfg" writeatomeyecfg
incnfile="inter0077.cn" readcn finalcnfile = "inter0077.cfg" writeatomeyecfg
incnfile="inter0078.cn" readcn finalcnfile = "inter0078.cfg" writeatomeyecfg
incnfile="inter0079.cn" readcn finalcnfile = "inter0079.cfg" writeatomeyecfg
incnfile="inter0070.cn" readcn finalcnfile = "inter0070.cfg" writeatomeyecfg
incnfile="inter0071.cn" readcn finalcnfile = "inter0071.cfg" writeatomeyecfg
incnfile="inter0072.cn" readcn finalcnfile = "inter0072.cfg" writeatomeyecfg
incnfile="inter0073.cn" readcn finalcnfile = "inter0073.cfg" writeatomeyecfg
incnfile="inter0074.cn" readcn finalcnfile = "inter0074.cfg" writeatomeyecfg
incnfile="inter0075.cn" readcn finalcnfile = "inter0075.cfg" writeatomeyecfg
#incnfile="inter0076.cn" readcn finalcnfile = "inter0076.cfg" writeatomeyecfg
#incnfile="inter0077.cn" readcn finalcnfile = "inter0077.cfg" writeatomeyecfg
#incnfile="inter0078.cn" readcn finalcnfile = "inter0078.cfg" writeatomeyecfg
#incnfile="inter0079.cn" readcn finalcnfile = "inter0079.cfg" writeatomeyecfg
quit
#------------------------------------------------------------
# MD Setting
#------------------------------------------------------------
timestep = 0.0001   # (in ps)
#totalsteps = 100000  # total timesteps to run MD
#------------------------------------------------------------ 
T_OBJ = 3000        # Desired Temperautre (in Kelvin)   
#DOUBLE_T = 1        # Initial temperature is set as twice high as T_OBJ
#initvelocity        # Initialize atoms' velocities according to T_OBJ
#------------------------------------------------------------ 
# HMC / BMC Settings
#------------------------------------------------------------ 
MCjumps = 500000             # Total MC steps
MDstep1 = 10                 # Step 1 MD steps per MC step
MDstep2 = 10                 # Step 2 MD steps per MC step
MDstep3 = 100                # Step 3 MD steps per MC step
MDstep1freq = 5              # Step 1 MD relaxation frequency
MDstep2freq = 20             # Step 2 MD relaxation frequency
MDstep3freq = 100            # Step 3 MD relaxation frequency
MIGRANGE = 4.0               # Migration range
ESHIFT = 0.0                 # Energy shift
#------------------------------------------------------------
kBMC = 5                     # k number of BMC
closeinsp = 12.0             # close inspection index
BMCsecondneighbor=1          # whether include second NN oxygen trial moves
maxNNO = 30                  # maximum number of NN oxygens
firstNNcatdist = 4.0         # distance criterion on the 1st NN cations
firstNNandist = 3.2          # distance criterion on the 1st NN anions
secondNNandist = 5.0         # distance criterion on the 2nd NN anions
firstNNanscale = 1.0         # shift distance scale factor on the 1st NN anions
secondNNanscale = 1.0        # shift distance scale factor on the 2nd NN anions
anfluc1 = 0.00               # random fluctuation of 1st NN oxygens
anfluc2 = 0.00               # random fluctuation of 2nd NN oxygens
#------------------------------------------------------------
scalenumofpairs = 1.2        # scale for the maximum number of pair interactions
#------------------------------------------------------------
integrator_type=1            # Integrator type [6 Gear = 0 VVerlet = 1]
scalevelocity=0              # Use velocity scaler
usenosehoover=0              # Use Nose-Hoover thermostat
vt2=1e28                     # Thermal resovoir
#------------------------------------------------------------  
writeall=1                   # Write output files
equilsteps = 0
#------------------------------------------------------------
saveprop = 1                 # If saveprop=0, property file not written
savepropfreq = 10            # The rate of writing properties
outpropfile = result.out     # assign the output files
openpropfile                 # Open the output file
#------------------------------------------------------------  
savecn = 1                   # If savecn=0, intercn file not written
savecnfreq = 100           # The rate of writing intercn files
intercnfile = inter.cn       # Intercn File Name
openintercnfile              # Open Intercn File
#------------------------------------------------------------
runnnomc                     # Run NNO-included MC
#------------------------------------------------------------  
finalcnfile = final.cn       # Assign the final configuration file
writecn                      # Write final configuration file
#------------------------------------------------------------  
