def convert_data_to_numbers(tokens, smiles):
    """
    Prepare data for the RNN, convert smiles into arrays of number corresponding to their index in the tokens array

    :param tokens: list of the tokens used
    :type tokens: list of str
    :param smiles: SMILES to convert
    :type smiles: list of str
    :return: input and output of the RNN, input start with a & and and with \\n and output end with two \\n
    """
    x_train = [[tokens.index(atom) for atom in smile] for smile in smiles]
    y_train = [x[1:] + [0] for x in x_train]
    return x_train, y_train