dt_Boolean dt_molgraph(dt_Handle object)
The function calls dt_mod_on(3), then performs the following operations: all bond orders are set to "single", aromaticity is turned off, hydrogen counts are set to the lowest "normal" count, charges and masses are set to zero, and isolated Hydrogen atoms (not connected to any other atoms) are removed. Then dt_mod_off(3) is called before returning.
The resulting structure is essentially what's used to generate a GRAPH SMILES in Thor. The canonical SMILES of this object generates the graph string. For molecules, the canonical smiles is used directly as the GRAPH. For reactions, the string is postprocessed to convert the ">" characters to ".".
Note that this function operates directly on the object; if one wants to preserve the original molecule or reaction, make a copy of the molecule or reaction before calling dt_molgraph().