OEHeterogenMetadataFromJson

Attention

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

bool OEHeterogenMetadataFromJson(OEHeterogenMetadata& metadata,
                                 const std::string& json)

Populates an OEHeterogenMetadata object from a JSON-formatted string. The function recognizes the following fields in the JSON object:

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, resolved via OEGetHeterogenTypeID.

Tautomers

array of strings

SMILES strings of known tautomeric forms of the heterogen.

Unrecognized or missing fields are silently ignored. Returns true if the JSON string was successfully parsed as an object; returns false if the string is not valid JSON or does not represent a JSON object.