def get_positions(structure):
    """Wrapper to get the positions from different structure classes"""
    try:  # ASE structure
        return structure.get_scaled_positions()
    except AttributeError:
        try:  # diffpy structure
            return structure.xyz
        except AttributeError:
            raise ValueError("Unable to get positions from structure")