OEReadReceptorFromByteArray

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

boolean OEReadReceptorFromByteArray(OEMCMolBase mol,  String format, byte[] data)
boolean OEReadReceptorFromByteArray(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.OEWriteReceptorToByteArray(".oeb", receptor);
OEMolBase receptorIO = new OEGraphMol();
boolean status = oedocking.OEReadReceptorFromByteArray(receptorIO, ".oeb", bytes);
byte[] bytes = oedocking.OEWriteReceptorToByteArray(".oeb.gz", receptor);
OEMolBase receptorIO = new OEGraphMol();
boolean status = oedocking.OEReadReceptorFromByteArray(receptorIO, ".oeb.gz", bytes);
boolean gzip = false;
byte[] bytes = oedocking.OEWriteReceptorToByteArray(OEFormat.OEB, oechem.OEGetDefaultOFlavor(OEFormat.OEB), gzip, receptor);
OEMolBase receptorIO = new OEGraphMol();
boolean status = oedocking.OEReadReceptorFromByteArray(receptorIO, OEFormat.OEB, oechem.OEGetDefaultIFlavor(OEFormat.OEB), gzip, bytes);
boolean gzip = true;
byte[] bytes = oedocking.OEWriteReceptorToByteArray(OEFormat.OEB, oechem.OEGetDefaultOFlavor(OEFormat.OEB), gzip, receptor);
OEMolBase receptorIO = new OEGraphMol();
boolean status = oedocking.OEReadReceptorFromByteArray(receptorIO, OEFormat.OEB, oechem.OEGetDefaultIFlavor(OEFormat.OEB), gzip, bytes);