drugforge.data.backend.openeye.save_openeye_sdfs

drugforge.data.backend.openeye.save_openeye_sdfs(mols, sdf_fn: str | Path) Path[source]

Write a list of OpenEye OEGraphMol objects to a single SDF file.

Parameters:
  • mols (list of oechem.OEGraphMol) – The list of OEGraphMol objects to write to the SDF file.

  • sdf_fn (Union[str, Path]) – The path of the SDF file to create or overwrite.

Returns:

The path of the SDF file that was written.

Return type:

Path

Raises:

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

Notes

This function will overwrite any existing file with the same name as sdf_fn.