********************************************************************************
Version 2.0.5
********************************************************************************

OEChem 2.0.5
================================================================================

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

* :oe:func:`OEChem::OEReadMolecule` into an :ref:`OEMol <OEChem_OEMol>` is
  now equivalent to reading into an :ref:`OEGraphMol <OEChem_OEGraphMol>` for
  the majority of use cases. To achieve this, it is now supported to
  call :oe:func:`OEChem::OEReadMolecule` on :ref:`OEConfBase <OEChem_OEConfBase>` as returned by
  :oe:meth:`OEChem::OEMCMolBase::GetActive`.
  See table :ref:`table_ImportPerformance` below that shows the improvements by 
  supported languages.


.. _table_ImportPerformance:

.. list-table:: **Performance improvement of importing molecules from various file formats**

   * - .. image:: ../../releasenotes/images/2015-Oct/ImportPerformance-Cpp.*
          :width: 300 pt
     - .. image:: ../../releasenotes/images/2015-Oct/ImportPerformance-Python.*
          :width: 300 pt
   * - .. image:: ../../releasenotes/images/2015-Oct/ImportPerformance-Java.*
          :width: 300 pt
     -

.. note::

   * OEB-OEMol - **OpenEye** OEBinary file format storing molecules as :ref:`OEMol <OEChem_OEMol>`
     (multi-conformer molecule representation)
   * OEB-OEGraphMol - **OpenEye** OEBinary file format storing molecules as :ref:`OEGraphMol <OEChem_OEGraphMol>`
     (single-conformer molecule representation)

* The performance of reading V2000 MDL MOL files has been significantly
  improved. See table :ref:`table_ImportPerformance` above.

* The performance of 2D coordinate generation has been improved by as much
  as 33% in some cases.

* :oe:meth:`OEChem::OEIsMember::Add` and
  :oe:meth:`OEChem::OEIsMemberPtr::Add` methods have been added.

* Added new :oe:const:`OEChem::OESMILESFlag::AllBonds` output Flavor
  for SMILES generation.  When set all bonds will be explicit in the
  generated output SMILES.

* A new :oe:func:`OEChem::OEIsSDDataFormat` function that can return
  whether the given file format supports SD data information has been added.

* :oe:func:`OEChem::OEGetMDLDimensionFromCoords` and
  :ref:`OESetMDLDimensionFromCoords <OEChem_OESetMDLDimensionFromCoords>` function have been added.

* :ref:`OEMMFFTypeResult <OEChem_OEMMFFTypeResult>` class was added along with a new
  :oe:func:`OEChem::OEMMFFAtomType` overloaded function that provides
  better support for the wrapped languages (Python, Java and C#).

* 213 new ring templates have been added to the built-in ring dictionary.

  .. list-table:: **Example of the New 2D Ring Templates**
     :widths: 20 4

     * - **Carbon Skeleton**
       - **Specified Cis/Trans**

     * - .. image:: ../../oechemtk/images/releasenotes-2.0.5/toolkits-2015-Oct-CarbonSkeletonTemplates.*
       - .. image:: ../../oechemtk/images/releasenotes-2.0.5/toolkits-2015-Oct-CisTransTemplates.*

* The performance of reading :oe:const:`OEChem::OEFormat::CDX` files has been
  improved.

* :oe:meth:`SetTitle<OEChem::OEMolBase::SetTitle>` method of :ref:`OEConfBase <OEChem_OEConfBase>` class
  is now slightly faster.


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

* The memory subsystem in the **OpenEye Toolkits** has been revamped
  to allow more types of objects to pass safely between operating
  system threads by default. The following objects are no longer
  affected by :oe:func:`OESystem::OESetMemPoolMode`:

  - :ref:`OEMol <OEChem_OEMol>`
  - :ref:`OEGraphMol <OEChem_OEGraphMol>`
  - :ref:`OEQMol <OEChem_OEQMol>`
  - :ref:`OESubSearch <OEChem_OESubSearch>`
  - :ref:`OEBase <OESystem_OEBase>`

  The upgrade fixes crashes observed in the **OEMolProp TK** and **OEDocking
  TK** in multi-threaded web servers. A more thorough
  description of what can and can't be done with threads with the
  **OpenEye Toolkits** can be found in the recently updated
  :ref:`chapter_multithreading` chapter.

  Care was taken to ensure the same or better level of performance
  with the new system. However, if you experience a performance
  degradation when switching to the **Toolkit 2015.Oct** release, please
  do not hesitate to contact support@eyesopen.com.

  .. warning: IGNORED DUE TO BOB'S REQUEST (IMPLEMENTATION DETAILS)

     **OEChem TK** will now perform a license check during
     molecule construction, instead of at atom and bond creation.
     This earlier license check may cause issues for users doing dynamic license
     addition in their code.

* Previously, :oe:meth:`OEChem::OEMolBase::NewAtom` would not copy coordinates when the
  molecule was the :oe:const:`OEChem::OEMolBaseType::OEMiniMol`
  implementation. This problem has been fixed.

* :oe:meth:`OEChem::OEMCMolBase::GetMCMolTitle` will now be consistent when
  reading single-conformer file formats. Previously, reading SMILES
  and CDX files would set the title on the parent
  :ref:`OEMCMolBase <OEChem_OEMCMolBase>`, but MOL2, CSV, SDF, and single-conformer OEB
  file formats would not.
  All these file formats will now initialize the parent :ref:`OEMCMolBase <OEChem_OEMCMolBase>` title
  allowing more consistent behavior when annotating
  conformer titles (warting) across all file formats. The conformers
  can be warted, leaving the parent title intact as well.

* ``OEChem::OEConfBase::operator bool`` will now conform better
  to the :ref:`OEMolBase <OEChem_OEMolBase>` API by returning whether the
  molecule contains atoms. The previous behavior was odd and unused,
  returning the state of the coordinates in the conformer.

* ``OEChem::OEConfBase::Clear`` will now be consistent with the
  :oe:meth:`OEChem::OEMolBase::Clear` API effectively clearing away all
  generic data, SD data, atoms, and bonds from the parent
  :ref:`OEMCMolBase <OEChem_OEMCMolBase>`.

* :oe:func:`OEChem::OEPerceiveResidues` will no longer crash when a
  thread has a small stack size and the molecule is very large.

* :oe:func:`OEChem::OEAddMols` will no longer crash when used on
  :oe:const:`OEChem::OEMolBaseType::OEMiniMol` molecule implementations.

* :oe:meth:`OEChem::OEBondBase::Clear` will now clear generic data for
  :oe:const:`OEChem::OEMolBaseType::OEMiniMol` molecule
  implementations.

* The following changes were made to improve the support for
  :oe:const:`OEChem::OEFormat::CDX` file format:

  * The problem that caused 2D coordinates to be flipped resulting in
    flipped atom stereo after round-tripping has been fixed.
  * Hydrogen counts for charged aromatic atoms such as ``[cH-]1cccc1`` have been fixed.
  * :oe:const:`OEChem::OEBondStereo::Wavy` and
    :oe:const:`OEChem::OEBondStereo::DoubleEither` bonds are now correctly handled.

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

* The following methods of the :ref:`OEAtomBase <OEChem_OEAtomBase>`
  class are deprecated and will throw a warning when called:

  * :oe:meth:`OEChem::OEAtomBase::HasAlphaBetaUnsat`
    (use :ref:`OEHasAlphaBetaUnsat <OEChem_OEHasAlphaBetaUnsat>` predicate instead)
  * :oe:meth:`OEChem::OEAtomBase::GetAxial`
  * :oe:meth:`OEChem::OEAtomBase::SetAxial`

* Previously, when the function :oe:func:`OEChem::OEParseSmiles` was called with a non-empty
  molecule, the hydrogen counts of the previously-existing atoms would be
  erroneously modified to satisfy normal valences.  Now, the existing atom
  hydrogen counts are untouched.

* The function :oe:func:`OEChem::OEReadMolecule` will now attempt to
  read malformed Rgroup atom information present in the atom block.
  Although an atom symbol of ``R1`` in the atom block may seem
  reasonable, it does not strictly conform to the **CTfile**
  specification. The :oe:func:`OEChem::OEWriteMolecule` function will
  never export information in this form, but an attempt will be made
  to read malformed information on input.

* The function :oe:func:`OEChem::OEReadMolecule` will no longer emit a warning
  when encountering the atom symbol ``*`` with CTfile format input, Instead, it
  will be treated as a :oe:const:`OEChem::OEElemNo::Du` atom.  This is
  in keeping with the return value from :oe:func:`OEChem::OEGetAtomicNum` for ``*``
  and a desire to reduce the number of warnings from :oe:func:`OEChem::OEReadMolecule`.

* The function :oe:func:`OEChem::OEReadMolecule` will now read Rgroup atom
  label information from V3000 format input.  Previously this information was ignored.

* The function :oe:func:`OEChem::OEReadMolecule` will now make a more concerted effort
  to read malformed DOS line endings from input (text) files.  This fix was added
  to :ref:`oeistream <OEPlatform_oeistream>`.

* Trailing white spaces are now removed from SMILES titles.

* When calling the :oe:func:`OEChem::OE3DToInternalStereo` function, the bond stereo
  is perceived from 3D even if the atom stereo perception fails.

* Coordinates in MDL MOL files that cannot be parsed as a real
  floating point number will now be ``0.0`` as per the MDL
  specification. Previously, the string "NaN" would actually translate
  to the floating point ``NaN`` binary representation.

* :oe:meth:`OEChem::oemolistream::GetConfTest` is now ``const``
  correct. The ``const-ness`` of the underlying
  :ref:`OEConfTestBase <OEChem_OEConfTestBase>` is no longer disregarded.

* :oe:meth:`OEChem::oemolistream::GetFileName<OEChem::oemolstreambase::GetFileName>`
  will no longer return an empty string when :ref:`oemolistream <OEChem_oemolistream>` constructor was
  called on a real file.

* During substructure search, the warning: ``OESubSearch::SingleMatch() is unable
  to match bond stereo in the target for patterns with bond stereo, call
  OEPrepareSearch on the target first`` was sometimes incorrectly
  thrown. The underlying stereo perception has been revamped.

* :ref:`OESubSearch <OEChem_OESubSearch>` no longer throws the following message in
  case when :oe:func:`OEChem::OEPrepareSearch` is invoked on the target molecule.
  ``OESubSearch::SingleMatch() is unable to match hybridization in the target
  for patterns with set hybridization, call OEPrepareSearch on the target first.``

* The :ref:`OEUniMolecularRxn <OEChem_OEUniMolecularRxn>` has been improved to reduce
  the number of odd valence and broken aromatic ring results from transformations.

* :oe:func:`OEChem::OEPerceiveChiral` now sets the relevant perception flag
  for empty molecules.

.. oe:language:: c++

   * :oe:func:`OEChem::OEReadMolFromString` and
     :oe:func:`OEChem::OEWriteMolToString` functions now accept file format
     strings without the ``.`` prefix. So both "sdf" and "".sdf"" will be
     interpreted as the :oe:const:`OEChem::OEFormat::SDF` file format.

* :oe:const:`OEChem::OEIFlavor::SMI::Strict` and :oe:const:`OEChem::OEIFlavor::SMI::Canon`
  flavor combination is now valid for the :oe:const:`OEChem::OEFormat::SMI` file
  format.

* :oe:func:`OEChem::OE3DToAtomStereo` and :oe:func:`OEChem::OE3DToBondStereo` functions
  remove the stereo property of an atom (or bond), respectively,
  if it is not chiral or if its stereo configuration can not be determined
  from the 3D.

* :oe:meth:`OEChem::OEAtomBase::SetStereo` and
  :oe:meth:`OEChem::OEBondBase::SetStereo`
  methods now remove the stereo generic data from the atoms (or bonds)
  when calling with the :oe:const:`OEChem::OEAtomStereo::Undefined` or
  :oe:const:`OEChem::OEBondStereo::Undefined` value, respectively.

* :oe:func:`OEChem::OEHasAtomStereoHydrogens` was fixed, it returns ``true``
  for a tetrahedral atom with specified stereo and one explicit hydrogen neighbor.

* :oe:func:`OEChem::OEHasBondStereoHydrogens` was fixed, it returns ``true``
  for an atom that belongs to a cis/trans double bond with one explicit
  hydrogen neighbor.

* :oe:func:`OEChem::OEReadOEBFile` can now be successfully used to
  read and round-trip an empty molecule (no atoms) to an OEB
  file. :oe:func:`OEChem::OEReadMolecule` will still automatically
  skip molecules with no atoms.

* :oe:func:`OESystem::OEBReadDataLength` now takes a default parameter for the
  maximum length.

* :oe:const:`OEChem::OEFormat::Default` now has the same numerical
  value as :oe:const:`OEChem::OEFormat::SMI` instead of
  :oe:const:`OEChem::OEFormat::ISM`. As of **OEChem TK** 2.0.0 (the 2014.Feb
  release), :oe:const:`OEChem::OEFormat::SMI` and
  :oe:const:`OEChem::OEFormat::ISM` are functionally equivalent
  in **OEChem TK's** file handling, so this is mostly a cosmetic change for
  consistency in that effort.

* Explicit hydrogens created by parsing stereo in :term:`SMILES`
  strings is now capped to a maximum of eight explicit
  hydrogens. Previously, a :term:`SMILES` such as ``[C@@H1000000000]``
  would seem to make **OEChem TK** hang indefinitely as it tried to create
  all those explicit hydrogens.

* :oe:func:`OESystem::OEMaskGridByCoordsAndRadii` has been corrected to fix
  a bug introduced in OEGrid 1.5.0 that produced grids of
  the wrong size.

* The function :oe:func:`OEChem::OEReadMolecule` will now simply ignore the V3000
  highlight collection information that was previously causing a read error.

* Previously, the function :oe:func:`OEChem::OEWriteMolecule` could emit lines exceeding 80 chars in
  V3000 format for structures containing many stereocenters.  This is in violation of the
  **CTfile** specification and has been corrected.

* An obscure issue causing a crash in :ref:`OESubSearch <OEChem_OESubSearch>` or
  :oe:meth:`OEChem::OEQMolBase::BuildExpressions` for imines and related
  queries with cis/trans parity and explicit hydrogens has been corrected,
  e.g., ``[H]/N=C/C``.

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

* :ref:`rmsd<section_example_oechem_rmsd>` example
  has been added to generate RMSD alignment for multi-conformer molecules.

* Links to the **CTfile** format document from Biovia (previously Accelrys, Inc.)
  has been updated.
  Note that registration is required to download this document.

* :oe:meth:`OEChem::OE2DRingDictionary::AddRings` return value is now documented.

OEBio 2.0.5
================================================================================

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

* `OEBio::OEFragmentNetwork` class is now exposed in order to allow the
  investigation of the protein-ligand interactions perceived by **OEDocking TK**
  and visualized by **Grapheme TK**.
  The current API is **read only** - *i.e.*, the user cannot build a fragment
  network.

  * The fragment network (`OEBio::OEFragmentNetwork`) is a container
    of typed molecules.
    The following classes are available to classify molecules in a fragment
    network:

    * `OEBio::OEComponentTypeBase` abstract class
    * `OEBio::OEProteinComponentType` concrete type that identifies protein
      molecule of complexes.
    * `OEBio::OELigandComponentType` concrete type that identifies ligand
      molecule of complexes.

  * A fragment (`OEBio::OEFragment`) is a set of atoms of a molecule
    that is stored in the fragment network.

  * A fragment connection (`OEBio::OEFragmentConnection`) is a typed
    link between two fragments of the network.
    The following classes have been added to handle interactions perceived
    by **OEDocking TK**
    (see also :oe:func:`OEDocking::OEAddDockingInteractions` function):

    * `OEBio::OEFragmentConnectionTypeBase` abstract class
    * `OEBio::OEFragmentContactInteraction`
    * `OEBio::OEFragmentHBondInteraction`  along with the related
      `OEBio::OEFragmentHBondType` namespace
    * `OEBio::OEFragmentChelatorInteraction`  along with the related
      `OEBio::OEFragmentChelatorType` namespace

  * The following fragment connection predicates have been added:

    * `OEBio::OEHasConnectionType`
    * `OEBio::OEHasConnection`
    * `OEBio::OEHasResidueConnection`
    * `OEBio::OEIsChelatorInteraction`
    * `OEBio::OEIsHBondInteraction`
    * `OEBio::OEIsInterConnection`
    * `OEBio::OEIsIntraConnection`

  * The following functions have been added:

    * :oe:func:`OEBio::OEIsValidActiveSite` function
    * `OEBio::OEGetConnections` function

* The database of non-ligand residue types maintained by the
  :ref:`OEResidueCategoryData <OEBio_OEResidueCategoryData>` object
  contained within an :ref:`OESplitMolComplexOptions <OEBio_OESplitMolComplexOptions>`
  has been curated.
  Only about 40 percent of the entries previously listed under the category
  :oe:const:`OEBio::OEMolComplexFilterCategory::Misc` remain,
  the remaining entries were recognized to be obscure ligands
  or were moved to other categories, such as
  :oe:const:`OEBio::OEMolComplexFilterCategory::CofactorAndLigand`.
  The category :oe:const:`OEBio::OEMolComplexFilterCategory::DNA_RNA`
  has been expanded to include the more obscure RNA bases.

* Setting modelNum to 0 in the :oe:meth:`OEBio::OESplitMolComplexOptions::ResetFilters` 
  method of :ref:`OESplitMolComplexOptions <OEBio_OESplitMolComplexOptions>` now selects all models.

* Protein Data Bank *biological assembly* files, with extensions like ``.pdb1.gz``,
  can now be read. These files use model numbers to refer to each part of an assembly
  (model numbers are also used to distinguish NMR models). By default, each model
  will be loaded as a separate molecule.
  See :ref:`splitmolcomplex<section_example_oebio_splitmolcomplex>` for an example
  of how to remove the ``ENDM`` flavor in order to load
  all models from a Protein Data Bank file into a single molecule.

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

* A problem that may have affected which residues were selected when
  the option method
  :oe:meth:`OEBio::OESplitMolComplexOptions::SetSeparateResidues` was used
  to select binding site residues has been fixed.


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

* :ref:`printinteractions<section_example_oebio_printinteractions>`
  example has been added to list protein-ligand interactions perceived by
  **OEDocking TK**.

* The :ref:`chapter_stereochemistry` chapter has been rewritten for the sake of clarity.

* Examples :ref:`splitmolcomplex<section_example_oebio_splitmolcomplex>` and
  :ref:`splitmolcomplexfrags<section_example_oebio_splitmolcomplexfrags>`
  have been updated to support the reading of multiple models from a ``PDB`` file.


OESystem 2.0.5
================================================================================

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

* :oe:meth:`OESystem::OERandom::GetSeed` has been added to return
  the current state of the :ref:`OERandom <OESystem_OERandom>` class enabling
  the restart of the random number generator with the given seed.

* :oe:func:`OESystem::OEGridSizeMultiply` has been added to safely multiply
  grid dimensions together while ensuring that it will not cause the
  value to overflow the integer type.

* :ref:`OEOwnedPtr <OESystem_OEOwnedPtr>` is now move-constructable for any
  C++11 enabled compiler. OpenEye's first foray into supporting C++11
  directly in our APIs. C++11 will eventually provide broader usage of
  smart pointers across the **OpenEye Toolkits** API.

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

* :ref:`OEAnnotation <OESystem_OEAnnotation>` can now be successfully round-tripped
  through OEB.

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

* ``HasUnsignedInt`` and ``GetUnsignedInt`` methods have been added to the
  :ref:`OEInterface <OESystem_OEInterface>` class Python wrapping to allow accessing
  command line parameters with ``!TYPE unsigned``.

C#-specific changes
--------------------------------------------------------------------------------

* ``HasUnsignedInt`` and ``GetUnsignedInt`` methods have been added to the
  :ref:`OEInterface <OESystem_OEInterface>` class C# wrapping to allow accessing
  command line parameters with ``!TYPE unsigned``.


OEPlatform 2.0.5
================================================================================

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

* :oe:func:`OEPlatform::OEGetAbsolutePath` is a new function that
  returns the full absolute path of a file.

* :oe:meth:`OEPlatform::OEThread::SetStackSize` has been added to allow
  controlling the maximum amount of stack size that the operating system
  thread will have when it is started with
  :oe:meth:`OEPlatform::OEThread::Start`.

* If a toolkit program fails due to a license error, the paths of any
  license file(s) actually read will be output for diagnostic purposes.

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

* ``OEPlatform::OEMalloca`` will no longer cause crashes when
  attempting to allocate amounts of memory near the maximum allowable
  ``size_t``. ``std::bad_alloc`` will now be thrown instead in these
  situations. Since ``OEPlatform::OEMalloca`` is actually a
  C-preprocessor macro, this change may result in user code throwing
  additional compiler warnings when signed integer types like 'int'
  are passed to ``OEPlatform::OEMalloca``.
  We recommend that users change this code to use ``size_t`` to avoid these warnings.

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

* ``oepstream`` class has been removed since it never worked as originally intended.

* :oe:func:`OEPlatform::OEUncompress` and
  :oe:func:`OEPlatform::OECompress` can now take ``size_t`` instead of
  ``unsigned int`` allowing use on data in excess of 4GB on 64-bit
  machines.

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

* :ref:`OEOnce <OEPlatform_OEOnce>` example code in the documentation will
  now actually compile. Previously, the code would actually crash
  prior to the :ref:`OESubSearch <OEChem_OESubSearch>` memory pool refactoring of this release,
  if any other thread besides the ``main`` thread called the function first.

C++-specific changes
--------------------------------------------------------------------------------

* **OpenEye Toolkits** header files should no longer contain the C++11
  deprecated "register" keyword causing compilations with ``-Werror``
  to fail.

* :ref:`oestream <OEPlatform_oestream>` and derived classes will no longer
  allow implicit conversion to ``int`` and ``unsigned int``. This
  avoids surprising behavior like the following from compiling:

  .. code-block:: c++

     oeisstream is1;
     oeisstream is2;
     bool what = (is1 == is2);

OEGrid
================================================================================

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

* **OEGrid TK** now features more efficient use of memory while
  reading grids from files. Previously, several unnecessary memory allocations
  had sometimes been performed during the read process.

* **OEGrid TK** grids are now officially capped to 4GB of memory since
  the API is designed around ``unsigned int``.

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

* :ref:`OEScalarGrid <OESystem_OEScalarGrid>` and all other grid types will no
  longer crash when the dimensions would cause overflow of an
  ``unsigned int``. The grid types will now throw ``std::bad_alloc``
  if attempting to make the grid memory larger than 4GB.

