#!/bin/bash
#Author: akiyama
#Facebook: b98202054@ntu.edu.tw
#No restriction of the number of Queue
#Please put this .sh file in the directory containing input files(.in)
#Excute input files(.in) and restore outcome as .out files

path=`pwd`
list=$(ls *.in | cut -d '.' -f1)
for i in $list
do
cat >$i.csh <<OWARU
#!/bin/csh
#PBS -l nodes=1:ppn=1
qchem $path/$i.in $path/$i.out
OWARU
qsub $i.csh
done