OESmilesFileConverter

Attention

This is a preliminary API and may be improved based on user feedback. It is currently available in C++ and Python.

class OESmilesFileConverter

The OESmilesFileConverter class extracts data from SMI, ISM, CAN, CXSMILES, and USM files into OERecord. With the addition of an OEMolConversionOptions, a SMILES OEField and a molecule title OEField can be added to the OERecord.

Constructors

OESmilesFileConverter() -> OESmilesFileConverter
OESmilesFileConverter(arg2: OESmilesFileConverter) -> OESmilesFileConverter

Open

Open(path: str, displayName: str = str()) -> bool
Open(path: str, options: OEMolConversionOptions,
     displayName: str = str()) -> bool

Returns a boolean based on whether the file can be opened. OEMolConversionOptions is set at open.

Close

Close() -> None

Closes the stream.

GetNextRecord

GetNextRecord(record: OEMolRecord) -> int

Steps through each row of the file adding to the OEMolRecord passed into the function. The function returns constants based on each pass. Return codes: SaiphReturnCode::Success, SaiphReturnCode::Fail, SaiphReturnCode::EndOfFile

GetProgress

GetProgress() -> float

Returns the percentage of the file that has been traversed.