#!/bin/bash
for i in {2..7};do
     ep=$( echo "scale=5; 1/$i/$i/$i"  | bc -l )
     sed "s/1.00000/0$ep/" et.top > v_${i}.top
	
     grompp_d -f md -c box_big -p v_${i}.top -o vb_${i} -maxwarn 1 && mdrun_d -deffnm  vb_${i} -v
     grompp_d -f md -c box_38 -p v_${i}.top -o v_${i} -maxwarn 1 && mdrun_d -deffnm  v_${i} -v
         
     echo -e "LJ-(SR)\nCoulomb-(SR)\n0" | g_energy -f -b 10  vb_${i} -o eb_${i} -driftcorr > vb_${i}.txt
     echo -e "LJ-(SR)\nCoulomb-(SR)\n0" | g_energy -f -b 10  v_${i} -o e_${i} -driftcorr > v_${i}.txt
        
done