def HydrogenBondEnergy(distance, dpka_max, cutoff, f_angle=1.0):
    """
    returns a hydrogen-bond interaction pKa shift
    """
    if distance < cutoff[0]:
        value = 1.0
    elif distance > cutoff[1]:
        value = 0.0
    else:
        value = 1.0 - (distance - cutoff[0]) / (cutoff[1] - cutoff[0])
    dpKa = dpka_max * value * f_angle
    return abs(dpKa)
