def open_xyz(xyz_file):
    """
    Opens an xyz file and returns a list of lists

    Parameters
    ----------
    xyz_file: String
        File path

    Returns
    ----------
    List of lists: List of lists
        Outer list is whole xyz file, each inner list is a line of the file containing
        the symbol and x,y,z coordinates

    """
    file = open(xyz_file, 'r').read().splitlines()
    if len(file[0].split()) != 1:
        exit('Not a proper xyz file!')
    natoms = int(file[0])
    if natoms != len(file[2:]):
        exit(
            'Number of atoms in header does not match number of atoms in file!'
            )
    else:
        return file[2:]
