OEReadReceptorFromString¶
bool OEReadReceptorFromString(OEMolBase &mol, const std::string &format, const std::string &data)
bool OEReadReceptorFromString(OEMolBase &mol, unsigned format, unsigned flavor, bool gzip, const std::string &data)
bool OEReadReceptorFromString(OEMCMolBase &mol, const std::string &format, const std::string &data)
bool OEReadReceptorFromString(OEMCMolBase &mol, unsigned format, unsigned flavor, bool gzip, const std::string &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.
std::string bytes = OEWriteReceptorToString(".oeb", receptor);
OEGraphMol receptorIO;
bool status = OEReadReceptorFromString(receptorIO, ".oeb", bytes);
std::string bytes = OEWriteReceptorToString(".oeb.gz", receptor);
OEGraphMol receptorIO;
bool status = OEReadReceptorFromString(receptorIO, ".oeb.gz", bytes);
bool gzip = false;
std::string bytes = OEWriteReceptorToString(OEFormat::OEB, OEGetDefaultOFlavor(OEFormat::OEB), gzip, receptor);
OEGraphMol receptorIO;
bool status = OEReadReceptorFromString(receptorIO, OEFormat::OEB, OEGetDefaultIFlavor(OEFormat::OEB), gzip, bytes);
bool gzip = true;
std::string bytes = OEWriteReceptorToString(OEFormat::OEB, OEGetDefaultOFlavor(OEFormat::OEB), gzip, receptor);
OEGraphMol receptorIO;
bool status = OEReadReceptorFromString(receptorIO, OEFormat::OEB, OEGetDefaultIFlavor(OEFormat::OEB), gzip, bytes);