def _en_to_enth(energy, concs, A, B, C):
    """Converts an energy to an enthalpy.

    Converts energy to enthalpy using the following formula:
    Enthalpy = energy - (energy contribution from A) - (energy contribution from B) -
        (energy contribution from C)
    An absolute value is taken afterward for convenience.
    
    Parameters
    ----------
    energy : float
        The energy of the structure
    concs : list of floats
        The concentrations of each element
    A : float
        The energy of pure A
    B : float
        The energy of pure B
    C : float
        The energy of pure C

    Returns
    -------
    enth : float
       The enthalpy of formation.
    """

    enth = abs(energy - concs[0]*A - concs[1] * B - concs[2] * C)
    return enth