Gaussian

3 minute read

Published:

Notes on Gaussian electronic structure simulation code

Gaussian 16 Manual

Troubleshooting wiki by Cory C. Pye

Sample input file

About Gaussian 16 Input

%Chk=heavyLink 0 section
# HF/6-31G(d) Opt=ModRedunRoute section
 Empty line
Opt jobTitle section
 Empty line
0 1Molecule Specification section
H 1.0000 1.5000Atomic coordinates/bonds/etc.
 
 Empty line

Link 0 Commands

These control how the computer will run the simulation (e.g., number of processors, dynamic memory to use, checkpoints). All Link 0 Commands go at the top of the input file before any Route commands.

Set the number of processors to run on

%nprocs=N, where N is the desired number of processors to use. If this is not set in the header, it will default to a value of 1 and only run on one processor.

Declare the memory to use

%mem=N Sets the dynamic memory used in 8-byte words. This value is followed by ‘KB’, ‘MB’, ‘GB’, or ‘TB’ to indicate kil-, mega-, giga-, and tera-bytes or words. Default value is 800MB

Ex. %mem=8GB will have 8 GB of dynamic memory assigned

Setup a checkpoint file

This is particularly useful if you are performing simulations in series (e.g., structure optimization followed by partial charge calculation)

%chk=filename.chk This will produce a checkpoint file at the end of the first simulation and can be used as the input to a following simulation

Route Commands

These define the kind of calculation to be performed. They follow the Link 0 Commands section, with no preceding empty lines

Molecule specifications

This section can describe a molecule (or more than one), including the atom types/names, coordinates, angles, bonds, charge.

Multi-step simulations

To perform multiple steps (e.g., structure optimization before electronic structure calculation), you must use a Link1 command between the commands for each simulation

Including --Link1-- after the empty line from the first simulation will allow you to run another with altered (or entirely different) parameters. It is often necessary to produce a checkpoint file from the first simulation which will be input to the second simulation. If a checkpoint is given using the %OldChk Link 0 command and geom=Checkpoint Route command, then no molecule section needs to be defined, other than the spin and multiplicity.

Sample file for structure optimization and electronic structure calculation

The following code will perform structure optimization and then partial charge calculation for the molecule. It is commanded to use 4 processors and produce checkpoints after each calculation. The first step is structural optimization using the B3LYP-31G(d,p) basis set. The output of this will be fed into the partial charge calculation step which uses the same basis set, but now with the CHELP scheme used to report atomic partial charges.

%nproc=4
%Chk=Monomer_GeomOpt.chk
#n B3LYP/6-31G(d,p) Opt

Monomer Structure Optimization

0 1
C       1.000000        1.000000        0.000000
C       -0.540000       1.000000        0.000000
C       -1.170000       1.000000        1.390000
O       -2.390000       1.070000        1.510000
N       -0.360000       0.910000        2.440000
C       -0.820000       1.000000        3.820000
C       -1.460000       -0.340000       4.240000
C       -2.250000       -0.280000       5.570000
N       -3.380000       0.680000        5.540000
H       -3.850000       0.690000        6.470000
H       -3.090000       1.660000        5.510000
C       -4.470000       0.540000        4.550000
C       -5.340000       1.800000        4.580000
C       -5.930000       2.170000        5.970000
S       -4.790000       2.700000        7.200000
O       -4.440000       1.410000        7.740000
O       -3.710000       3.210000        6.400000
O       -5.500000       3.610000        8.050000
H       1.380000        1.020000        -1.020000
H       1.400000        0.100000        0.480000
H       1.400000        1.880000        0.510000
H       -0.920000       0.130000        -0.540000
H       -0.920000       1.880000        -0.530000
H       0.630000        0.920000        2.250000
H       -1.540000       1.820000        3.890000
H       0.010000        1.260000        4.490000
H       -0.680000       -1.100000       4.320000
H       -2.120000       -0.710000       3.450000
H       -1.580000       -0.000000       6.390000
H       -2.630000       -1.270000       5.820000
H       -5.070000       -0.350000       4.770000
H       -4.070000       0.420000        3.540000
H       -6.170000       1.680000        3.880000
H       -4.780000       2.660000        4.200000
H       -6.560000       1.390000        6.400000
H       -6.580000       3.030000        5.850000

--Link1--
%OldChk=Monomer_GeomOpt.chk
%Chk=Monomer_SPC.chk
#n B3LYP/6-31G(d,p) POP=CHELP Geom=Checkpoint

Monomer Partial Charge Calculation

0 1