Gaussian
com_to_xyz.sh
#!/bin/bash
for i in $(ls *com)
do
base=$(basename $i .com)
cat ${base}.com | sed '/Tv/d' | sed "/^\$/d" | sed '1,3d' > temp.xyz # Remove translational vectors and Remove empty lines
nlines=$(wc -l < temp.xyz)
echo $nlines > ${base}.xyz
echo >> ${base}.xyz
cat temp.xyz >> ${base}.xyz
done
rm temp.xyz
Generating NTOs for all transitions
Generating NTOs for all transitions
#!/bin/bash
#=======================================================================
for j in $(seq 1 12) # change the number 12 to the highest trans number
do
cp ../*.chk . # keep the original check point file in previous folder
chkfile1=$(ls *.chk)
chkfile=$(echo ${chkfile1} | sed 's/.chk//g')
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# replace minimal with NTO for versions above G09.B
rm trans_${j}.com
cat > trans_${j}.com <<END
%chk=${chkfile}.chk
%mem=4GB
%nproc=4
# Geom=AllCheck ChkBas Guess=(Read,Only) Density=(Check,Transition=${j}) Pop=(SaveNTO,Minimal)
--link1--
%chk=${chkfile}.chk
%mem=4GB
%nproc=4
# Geom=AllCheck ChkBas Guess=(Read,Only)
END
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
g09 trans_${j}.com
formchk ${chkfile}.chk
cubegen 0 mo=homo ${chkfile}.fchk trans_${j}_homo.cub &
cubegen 0 mo=lumo ${chkfile}.fchk trans_${j}_lumo.cub
rm ${chkfile}.fchk
done
#=======================================================================
rm *.chk