Gaussian 16 Linux
Linux excels at batch processing. Here is a bash script to run a series of single-point energies on all .gjf files in a folder:
#!/bin/bash
for input in *.gjf; do
base=$input%.gjf
echo "Running $base at $(date)" >> job.log
# Run with 4 cores, save unique log
g16 -p=4 $input $base.log
# Check for convergence
if grep -q "Normal termination" $base.log; then
echo "SUCCESS: $base" >> job.log
# Extract final SCF energy
grep "SCF Done" $base.log | tail -1 >> energies.txt
else
echo "FAILED: $base" >> job.log
fi
done
On university clusters, you never run Gaussian interactively. Instead, you write a submission script. gaussian 16 linux