How to install Gaussian 16 on Linux, ubuntu and CentOS

Gaussian 16, the latest version of Gaussian software, is a state-of-the-art toolkit for electronic structure modelling. Gaussian 16 is available for a wide variety of computer systems. A suitable environment for operating Gaussian is a Linux based computer. However, many users have difficulty installing the package on a Linux machine.

In this tutorial, I’ll show you how to install Gaussian 16 on Linux (Ubuntu and CentOS). You can use this procedure on any Linux or UNIX computer.

Note: This blog is a compact version of the full Gaussian 16 installation guide. Watch the full video tutorial here or on the Insilicosci YouTube channel. You can also copy and paste commands from this page if you prefer not to type them.

Play Video about Gaussian installation video

Downloads

Gaussian 16 is commercial software and you can consult the Gaussian website about how to provide the binary file.

Click on the below button to download the Gaussian & GaussView setup file and a simple Gaussian test file.

You can extract files after downloading by these commands:

				
					cd ~/Downloads
tar -xvf installation_files.tgz
				
			

I assumed you have downloaded the compressed file in the Download folder. If the file is in a different location, change the path in the cd command.

How to Install gaussian 16 on ubuntu

First you need to extract the Gaussian 16 binary file in a proper place.

				
					cd /opt
sudo tar -xvJf ~/path_to_binary_file/G16_binary.tbJ
				
			

Then you must create a new user group to specify which users are allowed to use the Gaussian 16, and then add your user to this new group.

				
					whoami
sudo groupadd g16
sudo usermod -aG g16 username
				
			

Replace username with your username in the above command, and if you don’t know your username, the whoami command reveals your current username.

After that, restart the computers and check your groups by the groups command. You must see g16 among the groups.

Then change directory to the opt folder and set the owner and permission of the g16 folder using below commands. At the end, you can check the permissions of the folder by the ls -lrt command.

				
					groups
cd /opt
sudo chown -R root:g16
sudo chmod -R 750 g16
ls -lrt
				
			

You must Introduce Gaussian variable to the bash shell. This can be done by sourcing the setup file in the .bashrc file. To do so, first open the .bashrc file by a text editor like vi, nano, or gedit (you only need one of the last three commands).

				
					sudo cp ~/Downloads/installation_files/g16setup /etc
vi ~/.bashrc
gedit ~/.bashrc
nano ~/.bashrc
				
			

and then save the file after adding the following line at the end.

				
					source /etc/g16setup
				
			

Gaussian 16 also requires a scratch folder to perform tasks. So you must create a scratch folder at your home directory by the following command:

				
					mkdir -p ~/scratches/g16
				
			

Run a Gaussian 16 test job

Until now, you have installed the Gaussian software on your computer, so let’s run a test input file to verify the program works properly.

				
					cd ~/Downloads/installation_files
g16 < water.gjf > water.out
				
			

This job takes only a few seconds to complete. After completing the task, open the output file with a text editor and scroll to the end. There must be the term “Normal termination of Gaussian 16 …” at the end of the file.

How to Install Gaussian 16 on CentOS

The procedure for installing Gaussian on a CentOS machine is exactly the same. The only subtle difference is that in older versions of CentOS your user is not a sudoer by default. One way to solve this problem is to login as a root user before executing commands that require root privileges.

So the command list is like this:

				
					su
### type_your_password ###

cd /opt
tar -xvJf ~/path_to_binary_file/G16_binary.tbJ
groupadd g16
usermod -aG g16 username
				
			

Then restart your computer. And after that:

				
					groups
cd /opt
su
### type your password ###

chown -R root:g16
chmod -R 750 g16
ls -lrt
cp /path_to_the_gaussian_setup_file/g16setup /etc

				
			

At this point, you no longer need root privileges, so you should exit the root user.

				
					exit
				
			

Then edit the .bashrc file with a simple text editor like vi, nano, or gedit,

				
					vi ~/.bashrc
nano ~/.bashrc
gedit ~/.bashrc
				
			

and add the following line to the end of the file.

				
					source /etc/g16setup
				
			

Make the scratch folder by this command.

				
					mkdir -p ~/scratches/g16
				
			

Finnaly, test the program by running a test job.

				
					
cd /the_path_to_the_test_job
g16 < water.gjf > water.out
				
			

Install Gaussian 16 on a multi-user computer

It is quite easy to install Gaussian 16 on a multi-user system if you have previously installed it for a single user using my instructions. All you need to do is.

a) Login to the other user.

b) Setup the bashrc file of each user.

				
					vi ~/.bashrc

				
			

Open the bashrc file with a text editor and add the below line at the end of the file.

				
					source /etc/g16setup
				
			

c) Add the user to the g16 group.

				
					sudo usermod -aG g16 username
				
			

Note: If the user is not a sudoer, first login to the main system user and then provoke the above command there.

d) Create a scratch folder in the user home directory.

				
					mkdir -p ~/scrathes/g16
				
			

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top