OEWriteReceptorToStringΒΆ

std::string OEWriteReceptorToString(const std::string &format, const OEMolBase &mol)
std::string OEWriteReceptorToString(const std::string &format, OEMolBase &mol)

std::string OEWriteReceptorToString(unsigned int format, unsigned int flavor, bool gzip, const OEMolBase &mol)
std::string OEWriteReceptorToString(unsigned int format, unsigned int flavor, bool 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 std::string if the molecule to encode is identified as a receptor and encoding was successful.

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);
std::string bytes = OEWriteReceptorToString(".json", receptor);
OEGraphMol receptorIO;
bool status = OEReadReceptorFromString(receptorIO, ".json", bytes);
std::string bytes = OEWriteReceptorToString(".json.gz", receptor);
OEGraphMol receptorIO;
bool status = OEReadReceptorFromString(receptorIO, ".json.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);
bool gzip = false;
std::string bytes = OEWriteReceptorToString(OEFormat::JSON, OEGetDefaultOFlavor(OEFormat::JSON), gzip, receptor);
OEGraphMol receptorIO;
bool status = OEReadReceptorFromString(receptorIO, OEFormat::JSON, OEGetDefaultIFlavor(OEFormat::JSON), gzip, bytes);
bool gzip = true;
std::string bytes = OEWriteReceptorToString(OEFormat::JSON, OEGetDefaultOFlavor(OEFormat::JSON), gzip, receptor);
OEGraphMol receptorIO;
bool status = OEReadReceptorFromString(receptorIO, OEFormat::JSON, OEGetDefaultIFlavor(OEFormat::JSON), gzip, bytes);