OEReadReceptorFromBytesΒΆ

OEReadReceptorFromBytes(OEMolBase, format, data) -> bool
OEReadReceptorFromBytes(OEMolBase, format, flavor, gzip, data) -> bool

OEReadReceptorFromBytes(OEMCMolBase, format, data) -> bool
OEReadReceptorFromBytes(OEMCMolBase, format, flavor, gzip, data) -> bool

Instantiates a receptor from the contents of ‘data’ in terms of ‘format’. ‘format’ must be a file extension that is readable by OpenEye, for example: ”.oeb.gz”. Overloads which take an unsigned ‘format’, unsigned ‘flavor’ and Boolean ‘gzip’ parameters expect the format and corresponding flavor to be specified by one of the constants in OEFormat and OEIFlavor.

Returns ‘true’ if decoding was successful and the decoded molecule is identified as a receptor.

bytes = oedocking.OEWriteReceptorToBytes(".oeb", receptor)
receptorIO = oechem.OEGraphMol()
status = oedocking.OEReadReceptorFromBytes(receptorIO, ".oeb", bytes)
bytes = oedocking.OEWriteReceptorToBytes(".oeb.gz", receptor)
receptorIO = oechem.OEGraphMol()
status = oedocking.OEReadReceptorFromBytes(receptorIO, ".oeb.gz", bytes)
bytes = oedocking.OEWriteReceptorToBytes(".json", receptor)
receptorIO = oechem.OEGraphMol()
status = oedocking.OEReadReceptorFromBytes(receptorIO, ".json", bytes)
bytes = oedocking.OEWriteReceptorToBytes(".json.gz", receptor)
receptorIO = oechem.OEGraphMol()
status = oedocking.OEReadReceptorFromBytes(receptorIO, ".json.gz", bytes)
gzip = False
bytes = oedocking.OEWriteReceptorToBytes(oechem.OEFormat_OEB,
                                         oechem.OEGetDefaultOFlavor(oechem.OEFormat_OEB), gzip, receptor)
receptorIO = oechem.OEGraphMol()
status = oedocking.OEReadReceptorFromBytes(receptorIO, oechem.OEFormat_OEB,
                                           oechem.OEGetDefaultIFlavor(oechem.OEFormat_OEB), gzip, bytes)
gzip = True
bytes = oedocking.OEWriteReceptorToBytes(oechem.OEFormat_OEB,
                                         oechem.OEGetDefaultOFlavor(oechem.OEFormat_OEB), gzip, receptor)
receptorIO = oechem.OEGraphMol()
status = oedocking.OEReadReceptorFromBytes(receptorIO, oechem.OEFormat_OEB,
                                           oechem.OEGetDefaultIFlavor(oechem.OEFormat_OEB), gzip, bytes)
gzip = False
bytes = oedocking.OEWriteReceptorToBytes(oechem.OEFormat_JSON,
                                         oechem.OEGetDefaultOFlavor(oechem.OEFormat_JSON), gzip, receptor)
receptorIO = oechem.OEGraphMol()
status = oedocking.OEReadReceptorFromBytes(receptorIO, oechem.OEFormat_JSON,
                                           oechem.OEGetDefaultIFlavor(oechem.OEFormat_JSON), gzip, bytes)
gzip = True
bytes = oedocking.OEWriteReceptorToBytes(oechem.OEFormat_JSON,
                                         oechem.OEGetDefaultOFlavor(oechem.OEFormat_JSON), gzip, receptor)
receptorIO = oechem.OEGraphMol()
status = oedocking.OEReadReceptorFromBytes(receptorIO, oechem.OEFormat_JSON,
                                           oechem.OEGetDefaultIFlavor(oechem.OEFormat_JSON), gzip, bytes)