Background & Context

    • MIME type: chemical/x-gaussian-log
    • Gaussian log file.
    • Used to store results of quantum chemistry calculations.
    • Plain text format.


  • Import["file.log"] imports a Gaussian log file as a Molecule object.
  • See the reference pages for full general information on Import.
  • ImportString supports the Gaussian log format.

Import Elements

  • General Import elements:
  • "Elements"list of elements and options available in this file
    "Rules"full list of rules for each element and option
  • Data elements:
  • "Molecule"a symbolic representation of the molecule model
    "Metadata"an Association containing results from the file
  • Results such as molecular-orbital energies and occupation are stored in the "Metadata".
  • The calculation results are also included in the "Molecule" element. Use mol["MetaInformation"] to retrieve them from the molecule mol.
  • Three-dimensional coordinates from the log file are stored in the molecule in the AtomCoordinates option value.
  • Use mol["AtomCoordinates"] to retrieve the coordinates from the imported molecule mol.


open allclose all

Basic Examples  (1)

Import a Gaussian log file as a molecule:

Show the molecule in 3D:

Dipole and orbital information is stored in the molecule's MetaInformation:

Scope  (2)

Some Gaussian log files contain information on the normal vibrational modes:

Assume a Lorentzian line shape for each mode, and plot the calculated infrared absorption spectrum:

Use the Cartesian displacement vectors to make animations of the normal vibrational modes:

Create a function to generate an animation:

Animate the asymmetric chlorine stretching mode:

Animate the symmetric chlorine stretching mode: