kmeans.py
def molecule_supplier_from_name(input_file_name):
    """
    Get the appropriate molecule supplier based on file extension
    :param input_file_name: input file name
    :return: molecule supplier
    """
    ext = os.path.splitext(input_file_name)[-1]
    if ext == ".smi":
        suppl = Chem.SmilesMolSupplier(input_file_name, titleLine=False)
    elif ext == ".sdf":
        suppl = Chem.SDMolSupplier(input_file_name)
    elif ext == ".mae":
        suppl = Chem.MaeMolSupplier(input_file_name)
    else:
        print("%s is not a valid molecule extension" % ext)
        sys.exit(1)
    return suppl

    Get the appropriate molecule supplier based on file extension
    :param input_file_name: input file name
    :return: molecule supplier
    
Get the appropriate molecule supplier based on file extension
Get the appropriate molecule supplier based on file extension
def molecule_supplier_from_name(input_file_name):
    ext = os.path.splitext(input_file_name)[-1]
    if ext == ".smi":
        suppl = Chem.SmilesMolSupplier(input_file_name, titleLine=False)
    elif ext == ".sdf":
        suppl = Chem.SDMolSupplier(input_file_name)
    elif ext == ".mae":
        suppl = Chem.MaeMolSupplier(input_file_name)
    else:
        print("%s is not a valid molecule extension" % ext)
        sys.exit(1)
    return suppl
def molecule_supplier_from_name ( input_file_name ) : ext = os . path . splitext ( input_file_name ) [ - 1 ] if ext == ".smi" : suppl = Chem . SmilesMolSupplier ( input_file_name , titleLine = False ) elif ext == ".sdf" : suppl = Chem . SDMolSupplier ( input_file_name ) elif ext == ".mae" : suppl = Chem . MaeMolSupplier ( input_file_name ) else : print ( "%s is not a valid molecule extension" % ext ) sys . exit ( 1 ) return suppl
Get the appropriate molecule supplier based on file extension
Get the appropriate molecule supplier based on file extension
"""
    Get the appropriate molecule supplier based on file extension
    :param input_file_name: input file name
    :return: molecule supplier
    """
None
input_file_name
input file name
input file name