# -*-shell-script-*-
# Monte Carlo simulation of Stinger-Weber Silicon
#  adiabatic switching to harmonic approximation of the same potential
#setnolog
setoverwrite
dirname = runs/si-perf-sw2ha
#------------------------------------------------------------
#Read in structure
#
incnfile = ../../structures/CSD-book/chap6/si64-600K-3.cn readcn
#------------------------------------------------------------
#
#Plot Configuration
#
atomradius = 0.9 bondradius = 0.3 bondlength = 2.8285 #for Si
atomcolor = orange highlightcolor = purple  bondcolor = red
backgroundcolor = gray fixatomcolor = yellow
color00 = "orange"  color01 = "purple" color02 = "green"
color03 = "magenta" color04 = "cyan"   color05 = "purple"
color06 = "gray80"  color07 = "white"
plot_color_windows = [ 2
                          -10 -4.44 0  #color00 = orange
                          -4.44 -3  1  #color01 = purple
                     ]
plot_atom_info = 3
plotfreq = 10
plot_limits = [ 1 -10 10 -0.4 0.0 -10 10 ]
rotateangles = [ 0 -90 -90 1.5 ]
win_width = 600 win_height = 600
#openwin alloccolors rotate saverot refreshnnlist eval plot
#sleep quit
#------------------------------------------------------------
#Monte Carlo Simulation
#
totalsteps = 500000 saveprop = 1 openpropfile savepropfreq = 100
printfreq  = 5000
mcatom = -1 #-1: move all atoms, 0: move a random atom at each step
T_OBJ = 600  timestep = 0.02 #Angstrom
#randseed = 10129 srand48
srand48bytime
#
#runMC #(standard MC simulation)
#finalcnfile = final.cn writecn quit
#
#------------------------------------------------------------
#MC Adiabatic Switching Simulations
#RLIST = 5.6 #enlarge neighborlist radius for switching simulations

# reference perfect crystal structure
incnfile = ../../structures/CSD-book/chap6/si64-perf.cn readcn setconfig1 

# when config2 = NULL, MD++ will switch config1 to an Einstein crystal
#  or Harmonic Approximation of the original potential
switchfreq = 10      # change lambda every 10 MC steps
Ecoh = -4.63         # energy of Einstein crystal is offset by Ecoh * NP
#------------------------------------------------------------
# forward switching (real crystal -> HA potential)

switchfunc = 0 #curved switching function (default)
#switchfunc = 1 #linear switching function

#refpotential = 0 #Einstein crystal as reference potential (default)
refpotential = 1 #Harmonic approximation of the original potential as reference

# load previously computed Hessian matrix
incnfile = ../si-perf-ha/hessian.out readHessian

# an equilibrated structurre, starting point of switching simulation
#  equilibrated structure at 600 K
incnfile = ../../structures/CSD-book/chap6/si64-600K-3.cn

readcn lambda0 = 0 lambda1 = 1 runMCSWITCH finalcnfile = f01a.cn writecn
readcn lambda0 = 0 lambda1 = 1 runMCSWITCH finalcnfile = f01b.cn writecn
readcn lambda0 = 0 lambda1 = 1 runMCSWITCH finalcnfile = f01c.cn writecn
readcn lambda0 = 0 lambda1 = 1 runMCSWITCH finalcnfile = f01d.cn writecn
readcn lambda0 = 0 lambda1 = 1 runMCSWITCH finalcnfile = f01e.cn writecn

quit
#------------------------------------------------------------
# Reverse Switching requires an equilibrated configuration with HA potential
#  as the initial configuration
#  This can be done by running a switching simulation with lambda0=lambda1=1
#
#incnfile = ...
#
#readcn lambda0 = 1 lambda1 = 0 runMCSWITCH finalcnfile = f10a.cn writecn
#readcn lambda0 = 1 lambda1 = 0 runMCSWITCH finalcnfile = f10b.cn writecn
#readcn lambda0 = 1 lambda1 = 0 runMCSWITCH finalcnfile = f10c.cn writecn
#readcn lambda0 = 1 lambda1 = 0 runMCSWITCH finalcnfile = f10d.cn writecn
#readcn lambda0 = 1 lambda1 = 0 runMCSWITCH finalcnfile = f10e.cn writecn
#
#quit
#------------------------------------------------------------
