# 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. ```{literalinclude} ../tutorials/03_freq/files/h2o_freq.yaml :language: yaml ``` ## How the Hessian is obtained `frequencies: hessian: auto` uses the **analytic** (coupled-perturbed, [Gerratt and Mills; Pople et al.](#ref-cphf)) 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 {doc}`Tutorial 3 <../tutorials/03_freq/index>` 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 {doc}`ir_raman`), - 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 ```yaml 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.](#ref-rfo)) in redundant internal coordinates ([Pulay and Fogarasi](#ref-pulay92)) with a Lindh model Hessian ([Lindh et al.](#ref-lindh95)). Transition states (`task: ts`, `ts_freq`) and reaction paths (`task: irc`, [Gonzalez and Schlegel](#ref-irc)) use the same machinery. Gradients are analytic for collinear HF and DFT; see the Manual for the restrictions. Related tutorials: {doc}`../tutorials/02_geomopt/index`, {doc}`../tutorials/03_freq/index`.