3. Vibrational frequencies

Harmonic frequencies, normal modes and ideal-gas thermochemistry come from job: task: frequencies (at the input geometry) or opt_freq (optimize first). Always use opt_freq, or a tightly converged geometry: frequencies need a much tighter minimum than energies.

# Tutorial 03: harmonic frequencies, IR intensities and thermochemistry of water,
# PBE/def2-TZVP. Tight optimization first (task opt_freq). Run from the repository root:
#   OMP_NUM_THREADS=8 ./run_dft tutorials/03_freq/files/h2o_freq.yaml > h2o_freq.out

job:
  task: opt_freq

system:
  charge: 0
  unpaired_electrons: 0
  units: angstrom

functional:
  exchange: pbe
  correlation: pbe

basis:
  name: def2-TZVP
  file: basis/def2-TZVP.nw

scf:
  conv_tol: 1.0e-10

optimization:
  max_force: 1.0e-5
  rms_force: 1.0e-5

frequencies:
  symmetry_number: 2
  temperature: 298.15
  molden_file: h2o_freq.molden

atoms:
  - element: O
    position: [0.000000,  0.000000,  0.117300]
  - element: H
    position: [0.000000,  0.757200, -0.469200]
  - element: H
    position: [0.000000, -0.757200, -0.469200]

How the Hessian is obtained

frequencies: hessian: auto uses the analytic (coupled-perturbed, Gerratt and Mills; Pople et al.) Hessian where available: HF and DFT with LDA, GGA, meta-GGA, global and range-separated hybrids and local hybrids, closed or open shell, with exact or RI-J Coulomb, all-electron or ECP. Otherwise (composed functionals, D3, r⁴SCAN, …) it uses central differences of analytic gradients (\(6N\) SCFs). hessian: numerical forces the latter, which you can use to check the analytic result: in Tutorial 3 the two agree to 0.05 cm⁻¹ and DFTSW27 agrees with PySCF to 1 cm⁻¹.

Output

  • frequencies in cm⁻¹ (imaginary ones marked i), reduced masses and force constants,

  • IR intensities in km/mol (see 4. IR and Raman spectra),

  • normal modes, written also to a Molden file with frequencies: molden_file:,

  • ZPE, thermal energy, enthalpy, Gibbs free energy and entropy contributions at temperature (298.15 K) and pressure (101325 Pa).

Set frequencies: symmetry_number (2 for H₂O and CO₂, 3 for NH₃, 12 for CH₄ and benzene); it is not detected automatically and enters the rotational entropy and \(G\).

Geometry optimization

job:
  task: optimize
optimization:
  coordinates: internal      # internal (default) | cartesian
  max_force: 4.5e-4
  trajectory_file: traj.xyz
  constraints: distance 1 2 0.96; angle 2 1 3 104.5   # distances in system units, angles in degrees

Optimizations use rational-function steps (Banerjee et al.) in redundant internal coordinates (Pulay and Fogarasi) with a Lindh model Hessian (Lindh et al.). Transition states (task: ts, ts_freq) and reaction paths (task: irc, Gonzalez and Schlegel) use the same machinery. Gradients are analytic for collinear HF and DFT; see the Manual for the restrictions.

Related tutorials: Geometry optimization, Vibrational frequencies and IR spectrum.