OEReadMolFromBytesΒΆ

boolean OEReadMolFromByteArray(OEMolBase mol,   String format, OEIntArray data)
boolean OEReadMolFromByteArray(OEMCMolBase mol, String format, OEIntArray data)

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

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

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

Instantiates a molecule 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 or the format and flavor to be specified by one of the constants in OEFormat and OEIFlavor.

Returns ‘true’ if decoding was successful.

Warning

The overload that takes an OEIntArray is deprecated as of 2018.Feb and will be removed in a future version of OEChem TK, please use OEReadMolFromBytes instead.

OEMolBase mol = new OEGraphMol();
bool success = OEChem.OEReadMolFromBytes(mol, ".smi", Encoding.ASCII.GetBytes("c1ccccc1"));
OEMolBase mol = new OEGraphMol();
bool success = OEChem.OEReadMolFromBytes(mol, OEFormat.SMI, OEChem.OEGetDefaultIFlavor(OEFormat.SMI), false, Encoding.ASCII.GetBytes("c1ccccc1"));