for i in {2..4};do
obgen nag${i}.smi > nag${i}.mol
babel -imol nag${i}.mol -opdb nag${i}.pdb
prepare_ligand4.py -l nag${i}.pdb
vina --config vina.cfg --receptor prot.pdbqt --ligand nag${i}.pdbqt --out nag${i}_prot.pdbqt --log nag${i}_prot.log
done

for i in *.log;do
echo -e "$i" >> logs.txt
grep 'mode' $i -A 5 >> logs.txt
echo -e "\n" >> logs.txt
done