pwtools.pwscf.read_dynmat_ir_raman

pwtools.pwscf.read_dynmat_ir_raman(filename='dynmat.out', natoms=None, cols={1: 'freqs', 3: 'ir', 4: 'raman', 5: 'depol'})[source]

Read dynmat.x text output file and extract IR and Raman intensities.

Parameters:
  • filename (str) – dynmat.x text output file (e.g. from dynmat.x < dynmat.in > dynmat.out)

  • natoms (int) – number of atoms in the cell

  • cols (dict) – column numbers of the text block

Returns:

  • cols = None – Return the parsed array as found in the file

  • cols = dict – Return dict with keys from cols and 1d arrays {'freqs': <array>, 'ir': <array>, 'raman': <array>, 'depol': <array>}. If a column is not present, the array is None.

Notes

The parsed textblock looks like this:

# mode   [cm-1]    [THz]      IR          Raman   depol.fact
    1      0.00    0.0000    0.0000         0.0005    0.7414
    2      0.00    0.0000    0.0000         0.0005    0.7465
    3      0.00    0.0000    0.0000         0.0018    0.2647
    4    252.27    7.5627    0.0000         0.0073    0.7500
    5    252.27    7.5627    0.0000         0.0073    0.7500
    6    548.44   16.4419    0.0000         0.0000    0.7434
    7    603.32   18.0872   35.9045        18.9075    0.7366
    8    656.82   19.6910    0.0000         7.9317    0.7500
    9    656.82   19.6910    0.0000         7.9317    0.7500
   10    669.67   20.0762   31.5712         5.0265    0.7500
   11    738.22   22.1311    0.0000         0.0000    0.7306
   12    922.64   27.6600   31.5712         5.0265    0.7500

Some columns (e.g. IR, Raman) may be missing.