ccu.workflows.infrared

DFT-code agnostic standard infrared calculation workflow utilities.

Example

from ase.build import molecule
from ase.calculators.emt import EMT
from ccu.workflows.infrared import run_infrared

atoms = molecule("CO2")
atoms.calc = EMT()
# Only vibrate O atoms
indices = [a.index for a in atoms if str(a.symbol) == "O"]
run_infrared(atoms, nfree=4, indices=indices)
ccu.workflows.infrared.run_infrared(atoms: Atoms, *, name: str = 'ir', **ir_params: Any) tuple[Atoms, VibrationsData][source]

Run an infrared calculation.

This function is a convenience wrapper around Infrared.

Parameters:
  • atoms – An Atoms object with an attached calculator with which to run the infrared calculation.

  • name – A string used to name the cache directory, ir summary, ir mode trajectories, and ir data files. Defaults to "ir". Note that name is passed to the Infrared constructor.

  • ir_params – Additional keyword arguments passed on to the Infrared constructor.

Returns:

The 2-tuple whose first element is the updated Atoms after the calculation and whose second element is a VibrationsData object containing the results of the infrared calculation. A Infrared object can be populated from the results directory by instantiating the object with arguments corresponding to name and ir_params and then calling Infrared.read().

Raises:

RuntimeError – No calculator set for atoms.