A number of file formats don't represent a connection table as a
single representative Kekulé form but instead denote some bonds, such
as those in benzene , as aromatic . OEChem provides a method for
determining a valid, but arbitrary, Kekulé form for such connection
tables using the OEKekulize function. On input to OEKekulize, the
integer bond type property of each bond represents either the bond
order (1 for single, 2 for double, 3 for triple or 4 for quadruple) or
a the value 5 indicating the bond is aromatic or resonant. The
algorithm sets the bond order property from the bond type property,
with the exception of bond type 5, which is assigned a bond order of
either 1 or 2 representing either a single or double bond. The
Boolean return value indicates whether a valid Kekulé form could be
assigned.
Note that OEKekulize requires that the implicit hydrogen counts and
formal charges have been correctly set on all atoms before being
called.
OEKekulize is normally only used by low-level file readers for
interpreting input connection tables. To write out a Kekulé SMILES string, use the OEChem function OEClearAromaticity that clears the
aromaticity property of all atoms and bonds in a molecule, causing the
molecule to be written out as aliphatic with explicit bond orders.