(filename, unique=True)
return molecules, f.closed
Reads SMILES from file. File must contain one SMILES string per line
    with \n token in the end of the line.
    Args:
        filename (str): path to the file
        unique (bool): return only unique SMILES
    Returns:
        smiles (list): list of SMILES strings from specified file.
        success (bool): defines whether operation
        was successfully completed or not.
    If 'unique=True' this list contains only unique copies.
Reads SMILES from file. File must contain one SMILES string per line
    with \n token in the end of the line.
    Args:
        filename (str): path to the file
        unique (bool): return only unique SMILES
    Returns:
        smiles (list): list of SMILES strings from specified file.
        success (bool): defines whether operation
        was successfully completed or not.
    If 'unique=True' this list contains only unique copies.
Reads SMILES from file . File must contain one SMILES string per line with \ n token in the end of the line . Args : filename ( str ) : path to the file unique ( bool ) : return only unique SMILES Returns : smiles ( list ) : list of SMILES strings from specified file . success ( bool ) : defines whether operation was successfully completed or not . If unique = True this list contains only unique copies .
def read_smi_file(filename, unique=True):
    """
    Reads SMILES from file. File must contain one SMILES string per line
    with \n token in the end of the line.
    Args:
        filename (str): path to the file
        unique (bool): return only unique SMILES
    Returns:
        smiles (list): list of SMILES strings from specified file.
        success (bool): defines whether operation
        was successfully completed or not.
    If 'unique=True' this list contains only unique copies.
    """
    f = open(filename, 'r')
    molecules = []
    for line in f:
        molecules.append(line[:-1])
    if unique:
        molecules = list(set(molecules))
    else:
        molecules = list(molecules)
    f.close()
    return molecules, f.closed
def read_smi_file ( filename , unique = True ) : f = open ( filename , 'r' ) molecules = [ ] for line in f : molecules . append ( line [ : - 1 ] ) if unique : molecules = list ( set ( molecules ) ) else : molecules = list ( molecules ) f . close ( ) return molecules , f . closed