ccu.workflows.vibration

DFT-code agnostic standard vibration calculation workflow utilities.

For all other species, ccu.workflows.vibration.run_vibration provides a standardized, DFT-code-agnostic workflow that can be used to approximate the Hessian in the ground state, ccu.workflows.vibration.run_vibration(). This function is a thin wrapper around the ase thermochemistry utilities that conveniently logs all relevant thermochemistry data as well as other information (e.g., forces, frozen atoms, frequencies) to a file.

After running ccu.workflows.vibration.run_vibration(), one can then run ccu.thermo.gibbs.calculate_free_energy() to obtain the entropic correction (\(-TS\)) and the vibrational zero-point energy (\(ZPE\)). The Gibbs free energy is then calculated as:

(1)\[ G = E - TS + ZPE\]

where \(E\) is the DFT-calculated energy from ccu.workflows.vibration.run_vibration().

In both of the above cases, one has the option to use the CLI (ccu thermo chempot and ccu thermo gibbs) or the Python API (ccu.thermo.chempot.calculate() or ccu.workflows.vibration.run_vibration() with ccu.thermo.gibbs.calculate_free_energy()).

Example

from ase.build import molecule
from ase.calculators.emt import EMT
from ccu.workflows.vibration import run_vibration

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

Run a vibrational calculation.

This function is a convenience wrapper around Vibrations.

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

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

  • vib_params – Additional keyword arguments passed on to the Vibrations 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 vibration calculation. A Vibrations object can be populated from the results directory by instantiating the object with arguments corresponding to name and vib_params and then calling Vibrations.read().

Raises:

RuntimeError – No calculator set for atoms.

See also

Vibrations