GaussianLog
- Import supports the Gaussian log file format.
Background & Context
-
- MIME type: chemical/x-gaussian-log
- Gaussian log file.
- Used to store results of quantum chemistry calculations.
- Plain text format.
Import
- Import["file.log"] imports a Gaussian log file as a Molecule object.
- See the following reference pages for full general information:
-
Import import from a file CloudImport import from a cloud object ImportString import from a string ImportByteArray import from a byte array
Import Elements
- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements - 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.
Examples
open all close allBasic Examples (1)
Import a Gaussian log file as a molecule:
mol = Import["ExampleData/bisCWdhpe2Cl_13benz_c1_freq.log", "GaussianLog"]MoleculePlot3D[mol]Dipole and orbital information is stored in the molecule's MetaInformation:
mol["MetaInformation"]Scope (2)
Some Gaussian log files contain information on the normal vibrational modes:
meta = Import["ExampleData/bisCWdhpe2Cl_13benz_c1_freq.log", {"GaussianLog", "Metadata"}];
{intensities, frequencies} = Lookup[meta, {"InfraredIntensities", "VibrationalFrequencies"}]Assume a Lorentzian line shape for each mode, and plot the calculated infrared absorption spectrum:
σ = 5;
spectrum = Total[MapThread[#1 / ((ω - #2)^2 + σ^2) &, QuantityMagnitude[{intensities, frequencies}]]];Plot[spectrum, {ω, 0, 3200}, IconizedObject[«plotting options»]]Use the Cartesian displacement vectors to make animations of the normal vibrational modes:
mol = Import["ExampleData/bisCWdhpe2Cl_13benz_c1_freq.log", "GaussianLog"];
coords = mol["AtomCoordinates"];
{displacements, frequencies} = Lookup[mol["MetaInformation"], {"CartesianDisplacementVectors", "VibrationalFrequencies"}]Create a function to generate an animation:
atomCoordinates[ωt_, mode_] := (coords + Sin[ωt] displacements[[mode]]);
molPlot3D[ωt_, mode_] := MoleculePlot3D[mol, AtomCoordinates -> (coords + Sin[ωt] displacements[[mode]]), SphericalRegion -> Sphere[{0, 0, 0}, 8], ViewPoint -> {Top, Left}];animation[mode_] := ListAnimate[Table[molPlot3D[ωt, mode], {ωt, 0, 2π, .1}], AnimationRate -> 300frequencies[[mode]] / Max[frequencies]]Animate the asymmetric chlorine stretching mode:
animation[34]Animate the symmetric chlorine stretching mode:
animation[35]History
Introduced in 2020 (12.1)