drugforge.data.backend.openeye.load_openeye_mol2
- drugforge.data.backend.openeye.load_openeye_mol2(mol2_fn: str | Path) openeye.oechem.OEMol[source]
Load an OpenEye MOL2 file and return it as an OpenEye OEMol object. Reads multiple conformers into the OEMol object but if the MOL2 file contains multiple molecules, it will only return the first one.
- Parameters:
MOL2_fn (Union[str, Path]) – Path to the MOL2 file to load.
- Returns:
An OpenEye OEMol object containing the molecule data from the MOL2 file.
- Return type:
oechem.OEMol
- Raises:
FileNotFoundError – If the specified file does not exist.
oechem.OEError – If the MOL2 file cannot be opened.
Notes
This function assumes that the MOL2 file contains a single molecule. If the file contains more than one molecule, only the first molecule will be loaded.