#!/bin/bash
#
# Code by  venkentom@gmail.com
#
# Licenced by the GPL General Public License
# Have a look at:
# http://www.gnu.org/copyleft/gpl.html
# For more information about the GPL License
#
# I am not responsible for what this code does to your hw/sw/mind
# Use at your own risk
# 

#Put gromacs commands after this line

DIR=`pwd`

#Config
NPROCS=2

make_ndx -f system_aa.pdb -o sn1.ndx <<EOL
a C31
a C32
a C33
a C34
a C35
a C36
a C37
a C38
a C39
a C310
a C311
a C312
a C313
a C314
a C315
a C316
del 0-16
q
EOL

make_ndx -f system_aa.pdb -o sn2.ndx <<EOL
a C21
a C22
a C23
a C24
a C25
a C26
a C27
a C28
a C29
a C210
a C211
a C212
a C213
a C214
a C215
a C216
a C217
a C218
del 0-16
q
EOL

g_order -s md.tpr -f md.xtc -n sn1.ndx -d z -od deuter_sn1.xvg
g_order -s md.tpr -f md.xtc -n sn2.ndx -d z -od deuter_sn2.xvg

rm \#*
