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
Atomsobject 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 thatnameis passed to theInfraredconstructor.ir_params – Additional keyword arguments passed on to the
Infraredconstructor.
- Returns:
The 2-tuple whose first element is the updated
Atomsafter the calculation and whose second element is aVibrationsDataobject containing the results of the infrared calculation. AInfraredobject can be populated from the results directory by instantiating the object with arguments corresponding tonameandir_paramsand then callingInfrared.read().- Raises:
RuntimeError – No calculator set for
atoms.