Convert SMILES text to compound object

    Raises:
        ValueError: SMILES with unsupported format

def smiles_to_compound(smiles, assign_descriptors=True):
    """Convert SMILES text to compound object

    Raises:
        ValueError: SMILES with unsupported format
    """
    it = iter(smiles)
    mol = molecule()
    try:
        for token in it:
                mol(token)
        result, _ = mol(None)
    except KeyError as err:
        raise ValueError("Unsupported Symbol: {}".format(err))
    result.graph.remove_node(0)
    logger.debug(result)
    if assign_descriptors:
        molutil.assign_descriptors(result)
    return result