for i in {2..5};do
#obgen nag${i}.smi > nag${i}.mol
#babel -imol nag${i}.mol -opdb nag${i}.pdb
#prepare_ligand4.py -l nag${i}.pdb
python /usr/share/pyshared/AutoDockTools/Utilities24/prepare_flexreceptor4.py -r prot.pdbqt -s CYS54_ALA103_TYR105
vina --config vina.cfg --receptor prot_rigid.pdbqt \
    --ligand nag${i}.pdbqt --out nag${i}_prot.pdbqt --log nag${i}_prot_flex.log
out=nag${i}_prot_flex.log
echo -e "$out" >> tables_flex.txt
grep 'mode' $out -A 5 >> tables_flex.txt
done