OEMolFileConverter
Attention
This is a preliminary API and may be improved based on user feedback. It is currently available in C++ and Python.
class OEMolFileConverter
The OEMolFileConverter class extracts data from any
files that pass the OEIsReadable check into OERecords. Custom data extraction based on
OEField inclusion (SD and generic data) and the addition of conformer
tests can be set up through the OEMolConversionOptions.
Constructors
OEMolFileConverter() -> OEMolFileConverter
OEMolFileConverter(arg2: OEMolFileConverter) -> OEMolFileConverter
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.
GetSchemaRecord
GetSchemaRecord() -> OEMolRecord
Returns an OEMolRecord schema of the OERecord produced in each
OEMolFileConverter.GetNextRecord iteration. If a schema record was not given to the
OEMolConversionOptions, one is produced after running
OEMolFileConverter.Open with a valid file.