Infrared spectra

This tutorial shows how to calculate infrared spectra with MLatom.

In previous tutorial, we showed how to calculate vibrational spectra from molecular dynamics trajectories. Here we show an easier and more commonly used way: calculate frequencies and infrared (IR) intensities of static molecules.

Theory

In the harmonic approximation, the frequencies of a stationary point can be calculated by diagonalizing its Hessian matrix (second derivatives of energy with respect to coordinates). The corresponding IR intensities need dipole derivatives (first derivatives of dipole moment with respect to coordinates):

\(I_{n} = \sum \limits _{t=1} ^{3} (\frac {\partial p_{t}} {\partial Q_{n}}) ^{2}\) ,

where \(t\) corresponds to each Cartesian dimension, \(p\) is the dipole moment of the molecule, \(Q_{n}\) is the \(n\) th normal coordinate. Usually we get dipole derivatives with respect to each atomic coordinate, so the above equation can be rewritten as:

\(I_{n} = \sum \limits _{t=1} ^{3} (\sum \limits _{x} \frac {\partial p_{t}} {\partial q_{x}} \frac {\partial q_{x}} {\partial Q_{n}}) ^{2}\) ,

where \(q_{x}\) is the component of atomic coordinates.

Example

We present a simple example of calculating harmonic frequencies and IR intensities of ethanol, whose geometry is provided here ethanol_init.xyz. We need to optimize its geometry first and then calculate its frequencies as frequency calculations are only reasonable for stationary points (e.g., local minima and transition states).

Example with input file

First we need to optimize the geometry of ethanol. Below is the input file for this task. You can refer to geometry optimization tutorial for more details.

geomopt
B3LYP/6-31G*
xyzfile=ethanol_init.xyz
optxyz=ethanol_opt.xyz

Note

At the moment, simpler input described in this documentation only works for the MLatom@XACS version on the XACS cloud computing. If you install MLatom locally, you always need specify additional keywords such as method=B3LYP/6-31G* and qmprog=gaussian etc. to make it work. Local version still has some other limitations such as using only a single CPU with PySCF by default (you need to specify nthreads).

After getting the geometry of the optimized ethanol (ethanol_opt.xyz) we can calculate its frequencies and IR intenities. For IR intenisties, the keyword ir is needed. You can refer to frequencies tutorial for information of other keywords.

ir
B3LYP/6-31G*
xyzfile=ethanol_opt.xyz

You should be able to find in the MLatom output the vibrational analysis and IR intensities.

==============================================================================
                    Vibration analysis for molecule      1
==============================================================================
Multiplicity: 1
This is a nonlinear molecule
Mode     Frequencies     Reduced masses     Force Constants       IR intensities
            (cm^-1)            (AMU)           (mDyne/A)              (km/mol)
    1        248.4747          1.1524             0.0419                32.3833
    2        301.0663          1.0696             0.0571                99.1615
    3        417.5299          2.6381             0.2710                11.2144
    4        830.0330          1.0800             0.4384                 0.0152
    5        912.5116          2.2005             1.0796                 9.7442
    6       1042.3161          2.1512             1.3770                56.5354
    7       1125.4816          2.2612             1.6876                23.7752
    8       1193.9827          1.4953             1.2559                 4.7774
    9       1290.5694          1.2508             1.2275                87.6053
    10       1310.5341          1.1222             1.1356                 0.0903
    11       1427.9291          1.2321             1.4802                 0.4122
    12       1480.9785          1.4590             1.8854                16.5845
    13       1513.8300          1.0411             1.4058                 4.4003
    14       1532.0798          1.0458             1.4464                 3.0858
    15       1561.1233          1.0910             1.5666                 2.6189
    16       2980.0716          1.0552             5.5213                73.9417
    17       3003.5497          1.1085             5.8921                78.0445
    18       3058.1727          1.0352             5.7041                15.7969
    19       3129.0297          1.1026             6.3606                31.5280
    20       3133.5337          1.1038             6.3856                34.2645
    21       3746.8800          1.0665             8.8215                10.4090

On XACS platform, we provide our own implementation of calculating IR intensities. IR intensities are available when using Pyscf for HF and DFT, which are based on the pyscf.prop module.

Any questions or suggestions?

If you have further questions, criticism, and suggestions, we would be happy to receive them in English or Chinese via email, Slack (preferred), or WeChat (please send an email to request to add you to the XACS user support group).