def SolcoreMaterialToStr(material_input):
    """Translate a solcore material composition into a string that is what the Adachi calculator needs."""
    material_string = material_input.__str__().strip('<>').split(' ')
    material_name = material_string[0].strip("'")
    composition = {'material': material_name}
    if len(material_name) > 4:
        material_composition = material_string[2].split('=')
        for i, comp in enumerate(material_composition):
            if comp in material_name:
                composition['element'] = material_composition[i]
                composition['fraction'] = float(material_composition[i + 1])
    output = "%s {'%s':%s}" % (composition['material'], composition[
        'element'], composition['fraction'])
    return output
