
OEDepict TK 2.3.0
================================================================================

New features
--------------------------------------------------------------------------------

* Functionalities have been added to customize the general layout of the molecule display:

  * the margin(s) around the molecule can now be changed
    (for more details, see :oe:meth:`OEDepict::OE2DMolDisplayOptions::SetMargin` and
    :oe:meth:`OEDepict::OE2DMolDisplayOptions::SetMargins` methods)
  * the height of the title area can now be changed
    (for more details, see :oe:meth:`OEDepict::OE2DMolDisplayOptions::SetTitleHeight` method)

   .. list-table:: **Example of molecule display layouts depending on position of the title**
      :widths: 250 250 250
      :header-rows: 1

      * - title hidden
        - title at the top
        - title at the bottom

      * - .. image:: ../../depicttk/images/OE2DMolDisplayLayout_TitleHidden.*
        - .. image:: ../../depicttk/images/OE2DMolDisplayLayout_TitleTop.*
        - .. image:: ../../depicttk/images/OE2DMolDisplayLayout_TitleBottom.*

* A new highlighting style, :oe:const:`OEDepict::OEHighlightStyle::Lasso`,
  has been added along with the corresponding highlighting class :ref:`OEHighlightByLasso <OEDepict_OEHighlightByLasso>`.
  See the example in :ref:`Figure: Example of highlighting using the "lasso" style<figure_2015_lasso>`.
  below.

  .. _figure_2015_lasso:

  .. figure:: ../../depicttk/images/releasenotes-2.3.0/Lasso-toolkits2015_Oct.*
     :align:  center

     **Example of highlighting using the "lasso" style**

* Text can now be associated with hyperlinks via the :ref:`OEFont <OEDepict_OEFont>` class.
  This functionality is only available for :file:`PDF` and :file:`SVG` image formats.
  For more details and an example see the :oe:meth:`OEDepict::OEFont::SetHyperlink` method.

* The title of the molecule is now scaled along with the size of the image by default.
  The :oe:meth:`OEDepict::OE2DMolDisplayOptions::SetTitleFontScale` method was added
  to enable changing the scaling factor or allowing a fixed font size to be used
  regardless of the dimensions of the image.
  See also the :oe:meth:`OEDepict::OE2DMolDisplayOptions::SetTitleFont` method.

* The :oe:meth:`OEDepict::OE2DMolDisplayOptions::SetAtomLabelFontScale` method now allows
  using a fixed font size regardless of size of the molecule.
  Previously, the atom labels of the molecule were scaled along with the size of molecule.

* In case of the :oe:const:`OEDepict::OEBondColorStyle::ByElement` style, the
  wedge/hash stereo bonds are also colored by the corresponding element types.
  See the effect of this change in :ref:`Table: Example of bond coloring<table_2015_bond_color>` below.

  .. _table_2015_bond_color:

  .. list-table:: **Example of bond coloring**

     * - **OEDepict TK 2.2.6 (2015.Jun)**
       - **OEDepict TK 2.3.0 (2015.Oct)**
     * - .. image:: ../../depicttk/images/releasenotes-2.3.0/BondColoring-toolkits2015_Jun.*
       - .. image:: ../../depicttk/images/releasenotes-2.3.0/BondColoring-toolkits2015_Oct.*

* If the width or the height of a molecule display is not specified it will be set to ``50.0``.

* :oe:func:`OEDepict::OEWriteReportToString` function has been added.

* :oe:func:`OEDepict::OEDrawCurvedBorder` function has been added.

Major bug fixes
--------------------------------------------------------------------------------

* The layout of the molecule depiction has been improved to eliminate atom label clippings.
  These label clippings used to occur in cases when font scales larger than
  the default value were used.
  See the effect of this change in
  :ref:`Table: Improved depiction layout<table_2015_depict_layout>` below.

  .. _table_2015_depict_layout:

  .. list-table:: **Improved depiction layout**

     * - **OEDepict TK 2.2.6 (2015.Jun)**
       - **OEDepict TK 2.3.0 (2015.Oct)**
     * - .. image:: ../../depicttk/images/releasenotes-2.3.0/DepictionLayout_toolkits2015_Jun.*
       - .. image:: ../../depicttk/images/releasenotes-2.3.0/DepictionLayout_toolkits2015_Oct.*

* The bounding boxes of labels are now considered when positioning atom properties.
  As a result, the number of overlaps is reduced in cases where font scales larger than
  the default value are used.
  See the effect of this change in
  :ref:`Table: Example of improving the positioning of atom properties<table_2015_AtomPropPositioning>`
  below.

  .. _table_2015_AtomPropPositioning:

  .. list-table:: **Example of improving the positioning of atom properties**

     * - **OEDepict TK 2.2.6 (2015.Jun)**
       - **OEDepict TK 2.3.0 (2015.Oct)**
     * - .. image:: ../../depicttk/images/releasenotes-2.3.0/AtomPropPosition_toolkits2015_Jun.*
       - .. image:: ../../depicttk/images/releasenotes-2.3.0/AtomPropPosition_toolkits2015_Oct.*

Minor bug fixes
--------------------------------------------------------------------------------

* The default parameter for the maximum number of bond rotations of the
  :ref:`OEAlignmentOptions <OEDepict_OEAlignmentOptions>` class is :math:`2^{16} = 65536`.
  This means that by default only the first 16 single bonds of the *fit*
  molecule will be rotated to maximize molecule alignment when invoking
  the :oe:func:`OEDepict::OEPrepareAlignedDepiction` function.

* :oe:func:`OEDepict::OEPrepareAlignedDepiction` has been optimized
  to be 10% faster on average. The algorithm was also revised to
  reduce the accumulation of floating point errors.

* The atom mapping index is no longer displayed (redundantly) in the case of R-groups.
  See the effect of this change in
  :ref:`Table: Example of displaying atom map indices<table_2015_atom_map_idx>` below.
  See also the :ref:`OEDisplayAtomMapIdx <OEDepict_OEDisplayAtomMapIdx>` class.

  .. _table_2015_atom_map_idx:

  .. list-table:: **Example of displaying atom map indices**

     * - **OEDepict TK 2.2.6 (2015.Jun)**
       - **OEDepict TK 2.3.0 (2015.Oct)**
     * - .. image:: ../../depicttk/images/releasenotes-2.3.0/RGroup-AtomMapIdx-toolkits2015_Jun.*
       - .. image:: ../../depicttk/images/releasenotes-2.3.0/RGroup-AtomMapIdx-toolkits2015_Oct.*


* :oe:const:`OEDepict::OEAromaticStyle::Circle` depiction style has been improved.
  See the effect of this change in
  :ref:`Table: Example of Kekule (default) and circle aromatic depiction styles<table_2015_AromaticityStyle>`
  below.

  .. _table_2015_AromaticityStyle:

  .. list-table:: **Example of Kekule (default) and circle aromatic depiction styles**

     * - aromaticity style
       - **OEDepict TK 2.2.6 (2015.Jun)**
       - **OEDepict TK 2.3.0 (2015.Oct)**

     * - :oe:const:`OEDepict::OEAromaticStyle::Kekule`
       - .. image:: ../../depicttk/images/releasenotes-2.3.0/AromaticStyle_Kekule_toolkits2015_Jun.*
       - .. image:: ../../depicttk/images/releasenotes-2.3.0/AromaticStyle_Kekule_toolkits2015_Oct.*

     * - :oe:const:`OEDepict::OEAromaticStyle::Circle`
       - .. image:: ../../depicttk/images/releasenotes-2.3.0/AromaticStyle_Circle_toolkits2015_Jun.*
       - .. image:: ../../depicttk/images/releasenotes-2.3.0/AromaticStyle_Circle_toolkits2015_Oct.*

* If a bond display style cannot be determined - for example, in case of a broken molecule -
  the bond is now displayed using the  :oe:const:`OEDepict::OEBondDisplayType::Any` style
  and no error message will be thrown.

* :oe:func:`OEDepict::OEAddHighlightOverlay` function no longer generates
  different images on different platforms.

Python-specific changes
--------------------------------------------------------------------------------

* The deprecated Ogham API is no longer tested in Python.
  See also :ref:`release_notes_deprecated_ogham` section.


Documentation changes
--------------------------------------------------------------------------------

* :ref:`section_mol_display_transparent` section was added to show how to generate
  molecule depiction with a transparent background.

* Code snippets have been added to the following functions:

  * :oe:func:`OEDepict::OERenderMoleculeToString`
  * :oe:func:`OEDepict::OEWriteImageToString`

* All images in this documentation  have been automatically regenerated to
  reflect the changes made since the previous release.
