import pickle


def write_universe(u, name='default'):
    """Write a universe to working directories as pickle

    Args:
        u (MDAnalysis.Universe): the Universe to save
        name (str, optional): the name of . Defaults to 'default'.

    Returns:
        str: filename
    """
    filename = f"{name}.pkl"
    pickle.dump(u, open(filename, "wb"))
    return name