def InLineComposition(layer):
    """ Hack to use the Adachi-alfa calculator, provinding the composition as a single string

    :param layer: A layer as defined in the Device structures of the PDD solver
    :return: A mterial string
    """
    comp = layer['properties']['composition']
    if 'element' in comp.keys():
        return comp['material'].replace(comp['element'], comp['element'] +
            str(comp['fraction']))
    else:
        return comp['material']
