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