OEReadMolFromBytesΒΆ

OEReadMolFromBytes(OEMolBase, format, data) -> bool
OEReadMolFromBytes(OEMolBase, format, gzip, data) -> bool

OEReadMolFromBytes(OEMCMolBase, format, data) -> bool
OEReadMolFromBytes(OEMCMolBase, format, gzip, data) -> bool

Interprets a molecule from the contents of ‘data’ in terms of ‘format’. ‘format’ must be a file extension that is both readable by OpenEye. For example: ”.oeb.gz”. The overloads which take a Boolean ‘gzip’ parameter expect format to be specified by one of the constants in OEFormat.

Returns ‘true’ if decoding was successful.

mol = OEGraphMol()
success = OEReadMolFromBytes(mol, ".smi", "c1ccccc1")
mol = OEGraphMol()
success = OEReadMolFromBytes(mol, OEFormat_SMI, False, "c1ccccc1")