Gaussian

Gaussian

Gaussian is a widely-used computational quantum-chemistry program. It does electronic-structure calculations and standard quantum chemical calculations. Among the methods available are simple molecular mechanics (such as Amber force field), semi-empirical methods (such as CNDO), Hartree-Fock (restricted and unrestricted), MPn (Mollar-Plesset perturbation theory of order n=2,3,4), CI (Configuration-Interaction), CC (Coupled-Cluster), Multi-configurational SCF (such as CAS-SCF) and various DFT (Density-Functional Theory) methods. Specific to Gaussian are high-accuracy energy methods (G2, CBS). It can be used to obtain electronic properties, molecular geometries, vibrational frequencies, orbitals, reaction profiles, and much more. For a more complete list see this Overview.

GaussView: Graphical User Interface for Gaussian

GaussView establishes an interactive visual environment to import or build the molecular structures that interest you; set up, launch, monitor and control Gaussian calculations,; and, retrieve and view the results, all without ever leaving the application.

GaussView 5 reference materials provide tutorials and detailed documentation to access the full capabilities of the interface. Guidance to use GaussView 5 in an interactive session with Gaussian appears below. 

GaussView 6 is now available for use with Gaussian 16.

Important Notes

Installed Versions

All the available versions of Gaussian for use can be viewed by issuing the following command. This applies for other applications as well.

module avail gaussian

output:

---------------------- /usr/local/share/modulefiles -------------------------

gaussian/09(D)    gaussian/g16-avx    gaussian/g16-avx2    gaussian/g16-sse    

The default version is identified by "(default)" behind the module name and can be loaded as:

module load gaussian

The other versions of Gaussian can be loaded as:

module load gaussian/<version>

Then run a script that adds additional environmental variables:

g16.profile

Running Gaussian on the cluster

Running Gaussian 16

Gaussian 16 is now available on the cluster. The Gaussian 16 release notes at gaussian.com/relnotes include a tab that specifically deals with changes from G09. Gaussian also refers users to http://expchem3.com/ for instructional materials associated with a textbook making use of Gaussian 16.

The g16 executable is available in three versions, which feature support for extended instruction sets appropriate for sse-, avx- and avx2-enabled cpus. There are therefore three separate modules installed for Gaussian 16. Use 'module spider gaussian' to list the appropriate module names. The table indicates the nodes on Rider that support each version:

Submitting a batch job using 16-avx, or 16-avx2 requires excluding the nodes unable to support the instruction set, using the following will exclude those nodes that are not able to support avx2 instructions, allowing avx2-enabled nodes to accept the job:

#SBATCH --exclude ./exclude-avx.list  

The exclude files may be copied from /usr/local/doc/GAUSSIAN/exclude-avx.list

Running a serial job

To run a Gaussian batch job on the cluster, you need to create a slurm script for it. The sample script below includes a request for one processor in a single compute node and imposes a limit of 1 hour of wall time. Note that the script includes the command to load the Gaussian module as pointed out previously.

#!/bin/bash

#SBATCH --time=1:00:00

#SBATCH --nodes=1

#SBATCH --ntasks-per-node=1

#SBATCH --job-name=gauss_job

# Change working group to 'gaussian'

newgrp gaussian

# Load the Gaussian module

module load gaussian/g16-sse

# Run Gaussian

g16 water09.com

# copy results back to directory from which the job was submitted

cp -u *.* $SLURM_SUBMIT_DIR

Note that the script specifies that the Gaussian input file is located in the file "water09.com", which should contain the following lines:

%chk=water09.chk

#N B3LYP/6-311+G(3df,2p) opt freq

Gaussian test file

0 1

o

h 1 r

h 1 r 2 a

r=0.98

a=109.

If the job runs successfully the slurm output file should be empty and water09.log will end in lines similar to the following:

 Job cpu time:  0 days  0 hours  0 minutes 10.9 seconds.

 File lengths (MBytes):  RWF=      5 Int=      0 D2E=      0 Chk=      1 Scr=      1

 Normal termination of Gaussian 09 at Tue May 18 14:28:36 2010.

Running a parallel job

This example runs a geometry calculation using the Hartree-Fock method and 3-21G basis set on Cr hexacarbonyl.

The input: hexacarbonyl.com

%NProcShared=6

%Chk=hexacarbonyl.chk

%Mem=1GB

# RHF/3-21G Opt Test SCF=NoVarAcc


Cr(CO)6 3-21G Optimization


 0   1

 Cr  0.00  0.00  0.00

 C   1.93  0.00  0.00

 C  -1.93  0.00  0.00

 C   0.00  1.93  0.00

 C   0.00 -1.93  0.00

 C   0.00  0.00  1.93

 C   0.00  0.00 -1.93

 O   3.07  0.00  0.00

 O  -3.07  0.00  0.00

 O   0.00  3.07  0.00

 O   0.00 -3.07  0.00

 O   0.00  0.00  3.07

 O   0.00  0.00 -3.07

slurm script file: hexacarbonyl.slurm

#!/bin/bash

#SBATCH --job-name=hexacarbonyl_job

#SBATCH --time=1:00:00

#SBATCH --nodes=1

#SBATCH --ntasks-per-node=6

#SBATCH -o hexacarbonyl.o%j


# Load the Gaussian module

module load gaussian

# Change to working directory

cp hexacarbonyl.com $PFSDIR

cd $PFSDIR

# Run Gaussian

g09 hexacarbonyl.com

# copy results back to directory from which the job was submitted

cp -u *.* $SLURM_SUBMIT_DIR

The final 3 lines of hexacarbonyl.log:

Job cpu time:  0 days  0 hours  1 minutes  4.7 seconds.

File lengths (MBytes):  RWF=     15 Int=      0 D2E=      0 Chk=      2 Scr=      1

Normal termination of Gaussian 09 at Tue May 18 22:33:38 2010.

Refer to HPC Guide to Molecular Modeling and Visualization and HPC Software Guide for more information.

GaussView Interactive Session

Start a visual interface session on a compute node by performing the following steps:

Tutorials are available. Youtube may be consulted for useful introductory and advanced user instruction.

Troubleshooting

GaussView 

If gview fails to start with an error like "libGLU.so.1 not found", you need to load the mesa module:

module load mesa


Gaussian

i. You may encounter 'out-of-memory error' like the one below or similar errors as explained in [2]:

==========================================================================

Out-of-memory error in routine RdGeom-1 (IEnd=       7750001 MxCore=       6291456)

 Use %Mem=8MW to provide the minimum amount of memory required to complete this step.

 Error termination via Lnk1e in /usr/local/gaussian/g09/l101.exe at Mon Jul 26 14:30:54 2010.

 Job cpu time:  0 days  0 hours  0 minutes  0.1 seconds.

 File lengths (MBytes):  RWF=      5 Int=      0 D2E=      0 Chk=      1 Scr=      1

===========================================================================

Solution: You need to change the value of %Mem in your input file; let's say 10MW, ...16MW.

ii. You may also encounter the following error:

============================================================================

Error termination request processed by link 9999.

 Error termination via Lnk1e in /usr/local/gaussian/g09/l9999.exe at Tue Jul 27 08:13:24 2010.

=============================================================================

Solution: I replaced gdiis with gediis in the input file following the troubleshoot document [2]

===============================================

# opt=(calcfc,gediis) freq=raman hf/6-31g(d) geom=connectivity

===============================================

iii. Now, you may encounter convergence problem as shown:

==============================================================================

>>>>>>>>>> Convergence criterion not met.

 SCF Done:  E(RHF) =  -2727.91297847     A.U. after  129 cycles

             Convg  =    0.3800D-05             -V/T =  1.9982

 Convergence failure -- run terminated.

 Error termination via Lnk1e in /usr/local/gaussian/g09/l502.

exe at Wed Jul 28 03:42:27 2010

==============================================================================

Solution: Again, the documentation [2] recommends using alternatives like SCF=QC in the input file as shown:

=================================================================

#T SCF=QC

=================================================================

With this alternative, the input file is available on the cluster:

/usr/local/doc/GAUSSIAN/input.dat


An excerpt from the output is included below:

================================================================

...

...

 ScaDFX=  1.000000  1.000000  1.000000  1.000000

 FoFCou: FMM=F IPFlag=           0 FMFlag=      100000 FMFlg1=           0

         NFxFlg=           0 DoJE=T BraDBF=F KetDBF=T FulRan=T

         Omega=  0.000000  0.000000  1.000000  0.000000  0.000000 ICntrl=     500 IOpCl=  0

         NMat0=    1 NMatS0=    1 NMatT0=    0 NMatD0=    1 NMtDS0=    0 NMtDT0=    0

         I1Cent=           4 NGrid=           0.

 Petite list used in FoFCou.

 Gradient too large for Newton-Raphson -- use scaled steepest descent instead.

 Gradient too large for Newton-Raphson -- use scaled steepest descent instead.

 Gradient too large for Newton-Raphson -- use scaled steepest descent instead.

 Gradient too large for Newton-Raphson -- use scaled steepest descent instead.

 Gradient too large for Newton-Raphson -- use scaled steepest descent instead.

 LinEq1:  Iter=  0 NonCon=     1 RMS=1.91D-05 Max=8.94D-04

 Estimated number of processors is:    3

 AX will form     1 AO Fock derivatives at one time.

 LinEq1:  Iter=  1 NonCon=     1 RMS=1.35D-05 Max=6.04D-04

 Estimated number of processors is:    3

 LinEq1:  Iter=  2 NonCon=     1 RMS=1.96D-06 Max=8.19D-05

 Estimated number of processors is:    3

 LinEq1:  Iter=  3 NonCon=     1 RMS=1.15D-06 Max=4.09D-05

 Estimated number of processors is:    3

 LinEq1:  Iter=  4 NonCon=     1 RMS=1.51D-07 Max=5.89D-06

 Estimated number of processors is:    3

 LinEq1:  Iter=  5 NonCon=     1 RMS=8.59D-08 Max=3.10D-06

 Estimated number of processors is:    3

 LinEq1:  Iter=  6 NonCon=     1 RMS=1.99D-08 Max=7.21D-07

 Estimated number of processors is:    3

 LinEq1:  Iter=  7 NonCon=     0 RMS=1.00D-08 Max=3.19D-07

 Linear equations converged to 3.233D-08 3.233D-07 after     7 iterations.

 LinEq1:  Iter=  0 NonCon=     1 RMS=1.13D-07 Max=3.67D-06

 Estimated number of processors is:    3

 LinEq1:  Iter=  1 NonCon=     1 RMS=4.93D-08 Max=2.47D-06

 Estimated number of processors is:    3

 LinEq1:  Iter=  2 NonCon=     1 RMS=1.39D-08 Max=6.08D-07

 Estimated number of processors is:    3

 LinEq1:  Iter=  3 NonCon=     1 RMS=5.89D-09 Max=2.10D-07

 Estimated number of processors is:    3

 LinEq1:  Iter=  4 NonCon=     1 RMS=2.03D-09 Max=8.03D-08

 Estimated number of processors is:    3

 LinEq1:  Iter=  5 NonCon=     1 RMS=8.83D-10 Max=2.80D-08

 Estimated number of processors is:    3

 LinEq1:  Iter=  6 NonCon=     1 RMS=3.24D-10 Max=1.48D-08

 Estimated number of processors is:    3

 LinEq1:  Iter=  7 NonCon=     0 RMS=1.26D-10 Max=3.49D-09

 Linear equations converged to 4.914D-10 4.914D-09 after     7 iterations.

 SCF Done:  E(RHF) =  -2730.29360378     a.u. after    8 cycles

            Convg  =    0.1199D-06                    38 Fock formations.

              S**2 =  0.0000                  -V/T =  2.0017

 PrsmSu:  requested number of processors reduced to:   2 ShMem   1 Linda.

 PrsmSu:  requested number of processors reduced to:   5 ShMem   1 Linda.

 Calling FoFJK, ICntrl=      2127 FMM=F ISym2X=0 I1Cent= 0 IOpClX= 0 NMat=1 NMatS=1 NMatT=0.

===========================================================================

References:

[1] Home: http://computing.chem.wisc.edu/software/g98.php

[2] Troubleshooting: http://docs.notur.no/application-support/chemistry-applications/gaussian-1/gaussian-03-1/troubleshooting-gaussian-calculations

[3] http://chemistry.ncssm.edu/book/Chap18Gaussian.pdf

[4] http://chemistry.umeche.maine.edu/Modeling/GGGauss.html

[5] http://superbeton.wordpress.com/2007/07/08/gaussian-error-messages/