Daylight v4.9
Release Date: 1 February 2008

Name

dt_molgraph - Modify a molecule or reaction by converting to its graph

Generic Prototype

dt_molgraph(dt_Handle) => dt_Boolean

C Prototype

#include "dt_smiles.h"

dt_Boolean dt_molgraph(dt_Handle object)

FORTRAN Prototype

include 'dt_f_smiles.inc'

logical dt_f_molgraph(object)

integer*4 object

Description

Modifies the molecule or reaction object to generate an oxidation-suppressed representation of the 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().

Return Value

Returns TRUE if the operation succeeded. The object will then be a valid graph molecule or reaction. If it fails, the molecule object will be deallocated.

Related Topics

dt_alloc_mol(3) dt_cansmiles(3) dt_mod_on(3) dt_mod_off(3) dt_smilin(3)