def parse_smi_file(smiles, name, file_smiles):
    """
    The function takes smiles formula or file in smi format
    and converts it into two lists with smiles and names of a
    substances.

    Parameters
    ----------
    smiles : str
        Chemical formula of substance in SMILES format.
    Returns
    -------
    smile_list : list
        List with smiles for every analyzing structures.
    ids : list
        List with names of analyzing structures.
    """
    smile_list = []
    ids = []
    
    if smiles is not None:
        
        smile_list = [smiles]
        ids = [name.replace(' ', '_').replace('(', '').replace(')', '')]
    
    elif file_smiles is not None:
        with open(file_smiles) as smi:
            for line in smi:
                #Replacing hard parsible elements. For example actinomycin D will actinomycin_D.
                smile_list.append(line.split('\t')[1].replace('\n', ''))
                ids.append(line.split('\t')[0].replace(' ', '_').replace('(', '').replace(')', ''))
    
    return smile_list, ids