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);
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);