OEWriteReceptorToByteArrayΒΆ

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

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

Returns a non-empty byte[] if the molecule to encode is identified as a receptor and encoding was successful.

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