def submit(ds, entry_name, molecule, index):
    """
    Submit an optimization job to a QCArchive server.

    Parameters
    ----------
    ds : qcportal.collections.OptimizationDataset
        The QCArchive OptimizationDataset object that this calculation
        belongs to
    entry_name : str
        The base entry name that the conformation belongs to. Usually,
        this is a canonical SMILES, but can be anything as it is represents
        a key in a dictionary-like datastructure. This will be used as an
        entry name in the dataset
    molecule : QCMolecule
        The JSON representation of a QCMolecule, which has geometry
        and connectivity present, among others
    index : int
        The conformation identifier of the molecule. This is used to make
        the entry names unique, since each conformation must have its own
        unique entry in the dataset in the dataset

    Returns
    -------
    (unique_id, success): tuple
    unique_id : str
        The unique_id that was submitted to the dataset. This is the name
        of the new entry in the dataset.
    success : bool
        Whether the dataset was able to successfully add the entry. If this
        is False, then the entry with the name corresponding to unique_id
        was already present in the dataset.
    """

    # This workaround prevents cmiles from crashing if OE is installed but has
    # no license. Even though rdkit is specified, protomer enumeration is OE-
    # specific and still attempted.
    # oe_flag = cmiles.utils.has_openeye
    # cmiles.utils.has_openeye = False


    
    # attrs = cmiles.generator.get_molecule_ids(molecule, toolkit="rdkit")
    

    # cmiles.utils.has_openeye = oe_flag

    CIEHMS = "canonical_isomeric_explicit_hydrogen_mapped_smiles"
    molecule["extras"] = {CIEHMS: entry_name}
    attrs = {CIEHMS: entry_name}

    unique_id = entry_name + f"-{index}"

    success = False
    try:
        ds.add_entry(unique_id, molecule, attributes=attrs, save=False)
        success = True
    except KeyError:
        pass

    return unique_id, success