drugforge.data.backend.rdkit.set_SD_data

drugforge.data.backend.rdkit.set_SD_data(mol: rdkit.Chem.Mol, data: dict[str, str | list])[source]

Set the SD data on an rdkit molecule, overwriting any existing data. If the length of a list is 1, will set that value to all conformers. If the length of a list is equal to the number of conformers, will set each value to the corresponding conformer. Finally, it will set the properties for the whole molecule to be the data for the first conformer. Otherwise, will raise a ValueError.

Parameters:
  • mol (rdkit.Chem.Mol) – rdkit molecule

  • data (dict[str, list]) – Dictionary of SD data to set. Each key should be a tag name and each value should be a list of values, one for each conformer.