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

# Things to consider: -f is the CG input structure, -p is the AA topology!
# separate topology for protein made using pdb2gmx: CHARMM27 with cmap correction
# lipids treated by CHARMM36
# water treated by CHARMM TIP3P model
# use posre.itp and posre_popc.itp for position restrained during backwarding step

sh initram.sh -f dynamic_cg.gro -o system_aa.gro -to charmm36 -p topol_aa.top

grompp -f emst.mdp -c system_aa.gro -p backmapped.top -o emst.tpr 
mdrun -deffnm emst -v -nt 4

grompp -f eq.mdp -c emst.gro -p backmapped.top -o eq.tpr 
mdrun -deffnm eq -v

grompp -f md.mdp -c eq.gro -p backmapped.top -o md.tpr -t eq.trr
mdrun -deffnm md -v



rm \#*
