mlchem.chem.calculator.tools.boltzmann_probability¶
- boltzmann_probability(energy_levels: Iterable[float], temperature: int | float, energy_unit: Literal['eV', 'J', 'cal', 'kJ', 'kcal', 'kJ/mol', 'kcal/mol'] = 'kcal/mol') list[float]¶
Calculate the Boltzmann probability for a set of energy levels at a given temperature.
- Parameters:
energy_levels (Iterable[float]) – A list or array of energy levels.
temperature (float or int) – Temperature in Kelvin.
energy_unit (str, optional) – Unit of energy levels. Default is ‘kcal/mol’. Supported units: ‘eV’, ‘J’, ‘cal’, ‘kJ’, ‘kcal’, ‘kJ/mol’, ‘kcal/mol’.
- Returns:
Boltzmann probabilities for the given energy levels.
- Return type:
list[float]
Examples
>>> boltzmann_probability([0, 1, 2], 298, 'kcal/mol')