Gaussian Basics and Troubleshooting
Gaussian Basics and Troubleshooting
This guide starts with a short tutorial on how to write and run a basic Gaussian job—input layout, parallelism and memory, and geometry optimization for minima and transition states. The second half is a troubleshooting catalog for common errors. The companion ORCA Basics and Troubleshooting guide covers the same topics for ORCA. For background on how the SCF works in practice (scaling, integrals, guesses, convergence accelerators, and analytical gradients), see SCF in Practice. The error catalog builds on community resources, particularly Zhe Wang’s comprehensive error guide.
Tip: Use your browser’s search function (Ctrl+F / Cmd+F) to quickly find specific error messages.
Basic input file
A Gaussian input has Link 0 lines (%…), a route section (# …), a title, charge and multiplicity, then coordinates. Blank lines separate the title from the molecule specification and usually end the file.
%mem=8GB
%nprocshared=4
%chk=water_opt.chk
# opt freq b3lyp/def2SVP EmpiricalDispersion=GD3BJ
Water optimization and frequencies
0 1
O 0.000000 0.000000 0.117300
H 0.000000 0.757200 -0.469200
H 0.000000 -0.757200 -0.469200
-
%mem,%nprocshared, and%chkset memory, shared-memory cores, and the checkpoint file. - The route line starts with
#and lists method, basis, and job keywords. - The title line is free text; the next non-blank line is
charge multiplicity, then atoms. - Prefer Cartesian coordinates unless you have a reason to use a Z-matrix. Visualization tools (GaussView, Avogadro) help avoid formatting mistakes.
London dispersion is critical for organics, noncovalent contacts, and many reaction energetics, yet it is missing from most hybrid functionals (including bare B3LYP and PBE0). Add EmpiricalDispersion=GD3BJ (or GD3), or use a functional that already includes a dispersion model such as wB97XD.
Recommended functionals
Practical starting points in Gaussian:
-
B3LYP-D3(BJ) — everyday hybrid with Grimme D3(BJ):
b3lyp … EmpiricalDispersion=GD3BJ. -
PBE0-D3(BJ) — solid global hybrid (Gaussian keyword
PBE1PBE) with the same dispersion keyword:PBE1PBE … EmpiricalDispersion=GD3BJ. -
ωB97X-D — range-separated hybrid with a built-in dispersion correction:
wB97XD(do not stack an extraEmpiricalDispersionterm on top).
Useful DFT benchmark and method papers:
- GMTKN55 (Goerigk et al., 2017) — large main-group thermochemistry, kinetics, and noncovalent-interaction benchmark of many dispersion-corrected DFAs.
- Grimme, WIREs Comput. Mol. Sci. (2011) — review of London dispersion corrections to DFT and why they matter beyond weakly bound dimers.
-
Grimme et al., J. Chem. Phys. (2010) — DFT-D3 parametrization (the usual
EmpiricalDispersion=GD3/GD3BJfamily). -
Chai and Head-Gordon, PCCP (2008) — ωB97X-D functional (Gaussian
wB97XD). -
Mardirossian and Head-Gordon, PCCP (2014) — ωB97X-V (strong hybrid with VV10; useful context even when you use
wB97XDin Gaussian). - Goerigk et al., ChemPhysChem (2011) — dispersion-corrected DFT on the S66/S66x8 noncovalent interaction sets.
Recommended basis sets
Prefer the Karlsruhe def2 family for DFT work (Gaussian keywords def2SVP and def2TZVP):
- def2-SVP — economical split-valence polarized set for geometry optimizations, frequencies, and exploratory energetics.
- def2-TZVP — triple-zeta polarized set for more converged single points or final energetics once the structure is settled.
These sets were designed with DFT (and HF/MP2) in mind, are balanced across much of the periodic table, and pair heavier elements with Stuttgart effective core potentials so you do not need a separate all-electron treatment for most mid-to-late-row atoms. The examples below use def2SVP for routine jobs; step up to def2TZVP when you need tighter energetics.
The original design and accuracy assessment across a large molecular test set is in Weigend and Ahlrichs (2005).
Parallelism and memory
%nprocshared sets how many cores Gaussian uses with shared-memory parallelism. %mem is the memory Gaussian is allowed to allocate. On many systems Gaussian uses roughly 1 GB more than the value you set, so leave headroom relative to the job script:
%mem=8GB
%nprocshared=4
#SBATCH --mem=16G # comfortably above %mem
#SBATCH --cpus-per-task=4
Match %nprocshared to the CPU count you requested. If memory is limited, reduce cores first: fewer processors lower the peak memory demand. Use %nprocshared rather than Linda-style nprocl unless your site explicitly supports Linda.
Checkpoint files (%chk=…) are worth keeping for restarts and chained jobs (geom=allcheck, guess=read). Point GAUSS_SCRDIR at a large scratch filesystem when jobs write heavy intermediate files.
Optimizing minima
For a ground-state minimum, put opt on the route line. Computing frequencies in the same job confirms a true minimum (no imaginary modes):
# opt freq b3lyp/def2SVP EmpiricalDispersion=GD3BJ
Useful options when an optimization is slow or stubborn:
# opt=(calcfc,maxcycle=200) b3lyp/def2SVP EmpiricalDispersion=GD3BJ
-
calcfccomputes force constants at the start (often more stable than a crude guess Hessian). -
maxcycleraises the step limit when the structure is close but not quite there. - Alternatives such as
opt=RFO,opt=GDIIS, oropt=cartesianare covered in the troubleshooting half if the default optimizer stalls.
What “done” looks like: the log reports that the optimization completed (or “Normal termination”), and a frequency job shows zero imaginary frequencies for a minimum. Inspect the geometry in a viewer before trusting the energy.
Optimizing transition states
A transition-state search maximizes energy along one mode and minimizes along the others. A typical Gaussian setup is:
# opt=(ts,calcfc,noeigentest) freq b3lyp/def2SVP EmpiricalDispersion=GD3BJ
Practical checklist:
- Start from a good TS guess (often from a scan or a previous lower-level TS).
- Use
opt=tswith an initial Hessian (calcfcorcalcallwhen affordable). - After convergence, run frequencies and confirm exactly one imaginary mode that matches the reaction coordinate.
noeigentest (or noeigen) skips the intermediate eigenvalue check when the optimizer reports the wrong number of negative eigenvalues mid-run. That can let the search continue, but it does not replace a final frequency verification—see the TS troubleshooting section below.
When a calculation fails or behaves oddly, use the catalog below. Search for the error text or the symptom that matches your output.
Troubleshooting common issues
Memory and Resource Issues
Insufficient Memory Errors
Common Error Messages:
CISAX needs XXXXX more words of memoryXXXXX words are not enough for AlAXAOgalloc: could not allocate memorymalloc failed: Resource temporarily unavailable
Solutions:
-
Increase memory allocation: Use the
%memdirective at the top of your input file:%mem=8GBNote: Gaussian actually uses about 1 GB more than specified, so set
%memto at least 1 GB less than your job script’s memory allocation. -
Reduce CPU cores: If memory is limited, reduce the number of processors:
%nprocshared=4This reduces memory requirements per core.
-
Check job script settings: Ensure your job submission script (SLURM, PBS, etc.) allocates sufficient memory:
#SBATCH --mem=16G # Should be ~1GB more than %mem
Geometry Optimization Issues
Optimization Not Converging
Error Messages:
Number of steps exceeded, NStep= 100Delta-x Convergence NOT MetMaximum of *** iterations exceeded in RedStp
Solutions:
-
Increase maximum cycles: Add
opt=maxcycle=nwhere n is 2-3 times the current number of steps:# opt=calcfc opt=maxcycle=200 -
Try different optimization methods:
-
opt=RFO- Rational Function Optimization -
opt=GDIIS- Geometry Direct Inversion in Iterative Subspace -
opt=GEDIIS- Geometry Energy-Direct Inversion in Iterative Subspace
-
-
Switch coordinate system: If Z-matrix fails, try Cartesian coordinates:
opt=cartesian -
Check initial geometry: Verify your starting structure is reasonable. Use molecular visualization software (GaussView, Avogadro) to inspect the geometry.
-
Modify symmetry: Sometimes reducing symmetry helps:
# symm=loose
Transition State Optimization Issues
Error Message:
Wrong number of Negative eigenvalues: Desired= 1 Actual= 4
Solution: If you’re optimizing a transition state but get multiple negative frequencies, use:
opt=(ts,noeigen)
This skips the eigenvalue check. However, always verify your final structure has exactly one imaginary frequency!
Frequency Calculation Issues
Frequency Calculation Errors
Error Messages:
Error in INITNFLinear search skipped for unknown reasonInconsistency: ModMin= N Eigenvalue= MM
Solutions:
-
Ensure optimization converged: Frequency calculations require a fully optimized geometry. Check that your optimization completed successfully.
-
Use
freq=readfc: If you have a checkpoint file with force constants:# freq=readfc -
Recalculate from scratch: Sometimes it’s best to re-optimize and then compute frequencies in a single job:
# opt freq
SCF Convergence Issues
For the conceptual background (guesses, DIIS, SOSCF, direct vs conventional integrals), see SCF in Practice. The recipes below are Gaussian-specific.
SCF Not Converging
Error Messages:
Convergence failure -- run terminatedSCF Done: E(RB3LYP) = ... A.U. after 50 cycles
Solutions:
-
Use convergence aids:
scf=(conver=8,xqc)-
conver=8sets tighter convergence criteria -
xqcuses quadratic convergence
-
-
Try different initial guess:
guess=mix guess=huckel guess=read # from checkpoint file -
Use damping:
scf=(conver=8,damp) -
Check for problematic systems:
- Open-shell systems may need
stable=opt - Systems with near-degeneracies may need different methods
- Open-shell systems may need
Post-HF Method Convergence
CCSD/CCSD(T) Not Converging
Error Messages:
-
Error termination via Lnk1e in l913.exe(after CCSD iterations) - Large amplitudes in the output
Solutions:
-
Increase maximum cycles:
ccsd(t,maxcyc=100)Default is 50 cycles.
-
Check convergence trend: Look at the
DE(Corr)values in the output. If they’re converging (approaching a stable value), increasing cycles should help. -
Verify reference state: Ensure your HF reference is reasonable. Try:
stable=optbefore the CCSD calculation.
- Try different basis set: Sometimes a smaller or different basis set helps establish convergence.
File and I/O Errors
Disk Space Issues
Error Messages:
Erroneous write. write 122880 instead of 4239360writwa: No space left on deviceErroneous write during file extend
Solutions:
-
Check disk space:
df -h du -sh ~/scratch/ -
Clean up scratch directory: Remove old checkpoint files and temporary files.
-
Use smaller basis set: For very large calculations, consider using a smaller basis set or reducing system size.
-
Set scratch directory: Ensure
GAUSS_SCRDIRpoints to a directory with sufficient space:export GAUSS_SCRDIR=/path/to/large/disk/scratch
Checkpoint File Issues
Error Messages:
Error termination in NtrErr: Operation on file out of rangeError imposing constraints
Solutions:
-
Regenerate checkpoint file: The checkpoint file may be corrupted or incomplete. Re-run the calculation that generates the needed data.
-
Don’t rely on incomplete checkpoints: If a previous job failed or was killed, don’t try to read from its checkpoint file.
Input File Errors
Z-Matrix and Coordinate Errors
Error Messages:
End of file in ZsymbFound a string as inputThere are no atoms in this input structureSymbol not found in Z-matrixVariable index is out of rangeDetermination of dummy atom variables in z-matrix conversion failed
Solutions:
-
Check input format: Ensure proper spacing and formatting in your Z-matrix or Cartesian coordinates.
-
Use Cartesian coordinates: If Z-matrix conversion fails, switch to Cartesian:
# opt=cartesian -
Verify atom definitions: Check that all atoms are properly defined and variables are correctly referenced.
- Use GaussView or similar: Generate input files using molecular visualization software to avoid formatting errors.
Method-Specific Issues
DFT Functional Limitations
Error Message:
-
No func 3rd derivs with HSE(or similar for other functionals)
Explanation: Some functionals don’t support third-order derivatives needed for hyperpolarizability calculations.
Solutions:
-
For polarizability only: Use
polar=Numerical:# polar=NumericalThis calculates polarizability α but may fail for hyperpolarizability β.
-
Use different functional: Switch to a functional that supports third-order derivatives (most standard functionals do).
- Check output: Sometimes the desired property (e.g., α) is calculated before the error occurs, so check earlier in the output file.
System and Permission Errors
Gaussian Installation Issues
Error Messages:
Files in the Gaussian directory are world accessible. This must be fixed.failed to open execfile
Solutions:
-
Fix permissions:
chmod -R 750 /path/to/Gaussian -
Check Linda vs. OpenMP: If using
nprocl, ensure your system supports Linda. Otherwise, usenprocshared:%nprocshared=8 # instead of nprocl -
Verify environment variables: Check that
g09rootorg16rootandGAUSS_EXEDIRare set correctly.
Monitoring and performance tips
-
Watch output in real time:
tail -f jobname.logwhile the job runs. - Check for convergence: Look for “Optimization completed” or “Normal termination”.
-
Save intermediate results: Keep checkpoint files for restarts and
geom=allcheckchains. - Use an appropriate basis: Larger is not always better for exploratory work.
-
Parallelize wisely: More cores trade against memory; match
%nprocsharedto the allocation. -
Prefer
opt=calcfcwhen the default Hessian guess is unreliable.
Quick Reference: Common Fixes
| Problem | Quick Fix |
|---|---|
| Out of memory | Increase %mem or decrease %nprocshared
|
| Optimization not converging | Add opt=maxcycle=200 or try opt=RFO
|
| SCF not converging | Add scf=(conver=8,xqc) or scf=damp
|
| Multiple negative frequencies | Use opt=(ts,noeigen) but verify result |
| Disk space error | Clean scratch directory or use smaller basis |
| Checkpoint file error | Regenerate checkpoint from scratch |
| Z-matrix error | Switch to opt=cartesian
|
Additional Resources
- Gaussian Official Documentation
- Gaussian User’s Reference
- Zhe Wang’s Gaussian Error Guide
- Crawford Group Computational Chemistry Resources
Getting Help
If you encounter errors not covered here:
- Check the full output file: Errors often have context earlier in the file
- Search error messages: Many errors are documented online
- Consult colleagues: Often someone has seen the same issue
- Gaussian support: For licensed users, contact Gaussian Inc. support
Remember: Computational chemistry calculations can be finicky. When in doubt, start simpler (smaller basis set, fewer atoms) and work your way up!