#!/bin/tcsh

cp ../../run1/build/full.topo.hmr ./
cat << EOF > pt-randomize.in
parm full.topo.hmr

trajin ../../run1/build/rand.crds
trajout rand.crds restart

randomizeions :3-13 around :1-2 by 4.0 overlap 4.0 noimage seed 5
EOF

cpptraj -i pt-randomize.in > pt-randomize.log
ambpdb -p full.topo.hmr < rand.crds > full.pdb

cat << EOF > md-git.runit
#!/bin/tcsh
#SBATCH -p compute
#SBATCH -J aa-m2-eq
#SBATCH -o logtest.o%j
#SBATCH -N 1
#SBATCH --ntasks-per-node=24
#SBATCH -t 24:00:00

setenv AMBERHOME "/oasis/projects/nsf/slc216/droe/GIT/amber"
setenv runpmemd "ibrun -n 24 -o 0 \$AMBERHOME/bin/pmemd.MPI"
set path = (\$AMBERHOME/bin \$path)

../../../../../scripts/eq-dan.tcsh
EOF

qsub md-git.runit
