if(! -var nstep) getvar nstep default=5000 min=1000 msg="How may steps to run"
#load force field
include "loadff.inc"
#load MSF built previously
loadmsf file="step5_largebox.msf"
#load pbc setup
include "pbc.inc"
#image groups
imggroup method=resid sorted=true select="all"
#constraint
shake type=bondH tol=1e-6 scale=1.0 maxite=500 ref=para
#nonbond setup
nonbond type=pme nblcutoff=10.0 nbcutoff=8.0 swcutoff=7.0 eps=1.0 \
beta=0.34 ftx=$fftx fty=$ffty ftz=$fftz bsorder=6
#heat up using Berendsen thermostating
ensemble NVT tcoup=Berendsen ttcoup=2.0 Tinit=50 Tref=300
#build MD core
build mdcore timestep=0.002 nprint=100 \
trjfile="step6_heatup.dcd" frqtrj=100 trjfmt=charmm \
enefile="step6_heatup.ene" frqene=10 \
rstfile="step6_heatup.rst" frqrst=100000 \
flushene=true \
randseed=314159 randtype=old \
frqresort=20000
#run MD
runmd nstepmore=$nstep
#change to Nose-Hoover thermostat
ensemble tcoup=nosehoover tmass=1000
#change output files name
mdcp trjfile="step6_equil_nvt.trj" frqtrj=250 trjfmt=movar \
enefile="step6_equil_nvt.ene" frqene=10 \
rstfile="step6_equil_nvt.rst" \
resetstartstep=true
#save mds for restarting run
savemdcore file="step6_equil_nvt.mds"
#run MD
runmd nstepmore=$nstep |