#!/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

# used TM19 created in moe, then sed chain name in pymol using 
#		alter (all),chain='A'
#		sort 
# then make martini topology: 
./martinize.py -f TM31C_sed.pdb -o system_vaccum.top -x TM31C_CG.pdb -dssp ~/Desktop/dssp-2.0.4-linux-i386 -p backbone -ff martini21

#editconf -f TM19_CG.pdb -o editconf.pdb -bt cubic -d 1 -c

#change martini.itp to #include "martini_v2.2.itp" in system_vaccum.top
#grompp -f minimization_vaccum.mdp -p system_vaccum.top -c editconf.pdb -o minimization_vaccum.tpr
#mdrun -deffnm minimization_vaccum -v

#cp system_vaccum.top system.top

#genbox -cp minimization_vaccum.gro -cs water-box-CG_303K-1bar.gro -vdwd 0.21 -o system_solvated.gro -p system.top

#grompp -f genion.mdp -c system_solvated.gro -p system.top -o system_neutral.tpr
#genion -s system_neutral.tpr -o system_neutral.gro -p system.top -pname NA+ -nname CL- -neutral -conc 0.000001 << EOL
#W
#EOL

#grompp -f minimization.mdp -c system_solvated.gro -p system.top -o minimization.tpr
#mdrun -deffnm minimization -v -nt 4

#grompp -f equilibration.mdp -c minimization.gro -p system.top -o equilibration.tpr
#mdrun -deffnm equilibration -v -nt 4

#grompp -f dynamic.mdp -c equilibration.gro -p system.top -o dynamic.tpr
#mdrun -deffnm dynamic -v -nt 4



rm \#*
