Setting up Gaussian09 on Ubuntu

This has worked without issues on Ubuntu 15.04 and above to install the Gaussian 09 binaries.

  1. Copy all Gaussian files to a folder under the home folder, for example
/home/user/g09
  1. Create a scratch directory, for example
/home/user/g09scratch
  1. Create a file at the same folder to set environment variables, for example
/home/user/.login

with the following content

alias g09="/home/user/g09/g09"
export g09root = "/home/user"
export GAUSS_EXEDIR="/home/user/g09"
export GAUSS_SCRDIR="/home/user/g09scratch"
export g09root GAUSS_SCRDIR
  1. Source the parameters by including the line
source /home/user/.login

at the end of the /home/user/.bashrcfile.
5. Jobs can be run from the terminal at the job file location simply by issuing the command

g09 filename

Notes:
A. In different systems g09 will complain of different missing libraries. Typically sudo apt-get install of the missing libraries will solve this. Some frequent missing libraries and packages are:
build-essential
libc6-dev-i386
gfortran
csh
libstdc++6
libc6

B. Some scripts may not run if you are compiling the executables, requiring some modifications:
sed -i 's/gau-machine/.\/gau-machine/' *
sed -i 's/set-mflags/.\/set-mflags/' bldg09
sed -i 's/bsd\/set-mflags/.\/bsd\/set-mflags/' bldg09
sed -i 's/gau-hname/.\/gau-hname/' set-mflags
sed -i 's/cachesize/.\/cachesize/' set-mflags
cp gau-unlimit ..
cp cachesize ..
cp set-mflags ..
cp ../gau-machine .
sed -i 's/getline/get_line/' fsplit.c

C. Gaussian may complain that files are world accessible. The easiest way to solve this issue is to grant read/write permission only to user.

sudo chown -R root:gauss09 g09
sudo chmod -R o-rwx g09
sudo chmod -R 777 gv