def atom2dict(atom, dictionary=None):
    """Get a dictionary of one of a structure's
    :class:`diffpy.structure.Structure.atoms` content.

    Only values necessary to initialize an atom object are returned.

    Parameters
    ----------
    atom : diffpy.structure.Structure.atom
        Atom in a structure.
    dictionary : dict, optional
        Dictionary to update with structure atom information. If None
        (default), a new dictionary is created.

    Returns
    -------
    dictionary : dict
        Dictionary with structure atoms information.
    """
    if dictionary is None:
        dictionary = {}
    dictionary.update(
        {
            attribute: atom.__getattribute__(attribute)
            for attribute in ["element", "label", "occupancy", "xyz", "U"]
        }
    )
    return dictionary