Gaussian Tips and Troubleshooting Guide
Gaussian Tips and Troubleshooting Guide
This guide compiles common errors encountered when running Gaussian calculations and provides practical solutions. Whether you’re optimizing geometries, computing frequencies, or running excited-state calculations, these tips should help you navigate the most frequent issues.
Tip: Use your browser’s search function (Ctrl+F / Cmd+F) to quickly find specific error messages. This guide is inspired by and builds upon resources from the computational chemistry community, particularly Zhe Wang’s comprehensive error guide.
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
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.
General Best Practices
Input File Organization
-
Always include route section: Start with
#followed by method and keywords - Use title line: Provide a descriptive title
- Specify charge and multiplicity: Essential for proper calculation
-
Use checkpoint files: Include
%chk=filename.chkfor recovery
Example Well-Structured Input:
%mem=8GB
%nprocshared=4
%chk=water_opt.chk
# opt freq b3lyp/6-31g(d)
Water optimization
0 1
O 0.000000 0.000000 0.117300
H 0.000000 0.757200 -0.469200
H 0.000000 -0.757200 -0.469200
Monitoring Calculations
-
Watch output in real-time: Use
tail -fto monitor progress:tail -f jobname.log -
Check for convergence: Look for “Optimization completed” or “Normal termination”
- Save intermediate results: Use checkpoint files to restart or extract data
Performance Tips
- Use appropriate basis sets: Don’t use larger basis sets than necessary
- Parallelize wisely: More cores don’t always mean faster (memory trade-off)
-
Use efficient methods: Consider
opt=calcfcto calculate force constants once -
Chain calculations: Use
geom=allcheckto continue from previous calculations
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!