drugforge.data.backend.openeye.load_openeye_sdf

drugforge.data.backend.openeye.load_openeye_sdf(sdf_fn: str | Path) openeye.oechem.OEMol[source]

Load an OpenEye SDF file and return it as an OpenEye OEMol object. Reads multiple conformers into the OEMol object but if the sdf file contains multiple molecules, it will only return the first one.

Parameters:

sdf_fn (Union[str, Path]) – Path to the SDF file to load.

Returns:

An OpenEye OEMol object containing the molecule data from the SDF file.

Return type:

oechem.OEMol

Raises:
  • FileNotFoundError – If the specified file does not exist.

  • oechem.OEError – If the SDF file cannot be opened.

Notes

This function assumes that the SDF file contains a single molecule. If the file contains more than one molecule, only the first molecule will be loaded.