#!/bin/bash

((j=0)); 
for i in ../conf/*.pdb; do
    ((j=j+1))
    mkdir b$j
    cd b$j
    cp $i .
    cp ../transition*.mdp .
    cp ../../*.itp .
    cp ../../*_joined.top .
    gmx grompp -f transitionQ.mdp   -c $i  -p *_joined.top   -maxwarn 200 -o topolQ.tpr
    cd ..
done