def retr_spacegroup_number(xtalstr,ini0):
    """
    Retrieve the space group number.

    When choosing real space grids some space groups imply restrictions
    on the number of points along the different lattice vectors.
    To impose the correct restrictions we need to know the space group
    number of the current system. This function add this number to
    the dictionary.
    """
    ini0["spacegroup"] = xtalstr.spacegroup_number
    return ini0