OEReadReceptorFromBytesΒΆ

boolean OEReadReceptorFromBytes(OEMolBase mol,  String format, byte[] data)
boolean OEReadReceptorFromBytes(OEMolBase mol,  int format, int flavor, boolean gzip, byte[] data)

boolean OEReadReceptorFromBytes(OEMCMolBase mol,  String format, byte[] data)
boolean OEReadReceptorFromBytes(OEMCMolBase mol,  int format, int flavor, boolean gzip, byte[] data)

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.

byte[] bytes = OEDocking.OEWriteReceptorToBytes(".oeb", receptor);
OEGraphMol receptorIO = new OEGraphMol();
bool status = OEDocking.OEReadReceptorFromBytes(receptorIO, ".oeb", bytes);
byte[] bytes = OEDocking.OEWriteReceptorToBytes(".oeb.gz", receptor);
OEGraphMol receptorIO = new OEGraphMol();
bool status = OEDocking.OEReadReceptorFromBytes(receptorIO, ".oeb.gz", bytes);
byte[] bytes = OEDocking.OEWriteReceptorToBytes(".json", receptor);
OEGraphMol receptorIO = new OEGraphMol();
bool status = OEDocking.OEReadReceptorFromBytes(receptorIO, ".json", bytes);
byte[] bytes = OEDocking.OEWriteReceptorToBytes(".json.gz", receptor);
OEGraphMol receptorIO = new OEGraphMol();
bool status = OEDocking.OEReadReceptorFromBytes(receptorIO, ".json.gz", bytes);
bool gzip = false;
byte[] bytes = OEDocking.OEWriteReceptorToBytes(OEFormat.OEB, OEChem.OEGetDefaultOFlavor(OEFormat.OEB), gzip, receptor);
OEGraphMol receptorIO = new OEGraphMol();
bool status = OEDocking.OEReadReceptorFromBytes(receptorIO, OEFormat.OEB, OEChem.OEGetDefaultIFlavor(OEFormat.OEB), gzip, bytes);
bool gzip = true;
byte[] bytes = OEDocking.OEWriteReceptorToBytes(OEFormat.OEB, OEChem.OEGetDefaultOFlavor(OEFormat.OEB), gzip, receptor);
OEGraphMol receptorIO = new OEGraphMol();
bool status = OEDocking.OEReadReceptorFromBytes(receptorIO, OEFormat.OEB, OEChem.OEGetDefaultIFlavor(OEFormat.OEB), gzip, bytes);
bool gzip = false;
byte[] bytes = OEDocking.OEWriteReceptorToBytes(OEFormat.JSON, OEChem.OEGetDefaultOFlavor(OEFormat.JSON), gzip, receptor);
OEGraphMol receptorIO = new OEGraphMol();
bool status = OEDocking.OEReadReceptorFromBytes(receptorIO, OEFormat.JSON, OEChem.OEGetDefaultIFlavor(OEFormat.JSON), gzip, bytes);
bool gzip = true;
byte[] bytes = OEDocking.OEWriteReceptorToBytes(OEFormat.JSON, OEChem.OEGetDefaultOFlavor(OEFormat.JSON), gzip, receptor);
OEGraphMol receptorIO = new OEGraphMol();
bool status = OEDocking.OEReadReceptorFromBytes(receptorIO, OEFormat.JSON, OEChem.OEGetDefaultIFlavor(OEFormat.JSON), gzip, bytes);