SDFLoader has no id_field

I am featurizing from an SDF file using SDFLoader. Unfortunately, I realized that SDFLoader does not have an id_field option. Instead, it automatically generates a SMILES string and stores that in the ID field of the DiskDataset object.

I do have CID labels in my SDF file, and I would like to use these as the IDs. First, why does the SDFLoader not have an id_field, like the other loaders?Next, does anyone have any suggestions for how I could coerce SDFLoader to store my CID labels in the ID field of the DiskDataset it generates?

Thanks for your help!

1 Like