def dfttk_config_to_espei(config):
    """Convert a DFTTK configuration, e.g. [['Fe', 'Ni'], ['Fe']] to ESPEI's configuration [['FE', 'NI'], 'FE']"""
    espei_config = []
    for subl in config:
        if len(subl) == 1:
            # this sublattice is an endmember
            espei_config.append(subl[0].upper())
        else:
            # this sublattice has an interaction
            espei_config.append([comp.upper() for comp in subl])
    return espei_config