OEHeterogenMetadataToJson

Attention

This API is currently available in C++ and Python.

std::string OEHeterogenMetadataToJson(const OEHeterogenMetadata& metadata,
                                      const bool prettyPrint = true)

Serializes an OEHeterogenMetadata object to a JSON-formatted string. The resulting JSON object contains the following fields:

Field

Type

Description

Title

string

Human-readable title of the heterogen.

Id

string

Identifier for the heterogen (e.g. PDB ligand code).

Smiles

string

SMILES representation of the heterogen.

Type

string

Heterogen component type name, as returned by OEGetHeterogenTypeName.

Tautomers

array of strings

SMILES strings of known tautomeric forms of the heterogen.

The prettyPrint argument controls formatting: when true (the default) the JSON is indented for readability; when false a compact single-line representation is produced.