import math


def morse_energy(dist, params):
    """The Morse interaction energy

    :param dist: The distance between the two interacting atoms.
    :param params: The Morse parameters.
    :returns: The interaction energy.
    """

    de, a, r0 = params
    return de * ((
            math.exp(a * (r0 - dist)) - 1
            ) ** 2 - 1.0)