********************************************************************************
Version 2.2.0
********************************************************************************

OEChem TK 2.2.0
================================================================================

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

* Atom and bond expressions of query molecules have been optimized for
  substructure search. The graphs below show the performance improvement since
  the 2018.Oct release.
  Optimization has been turned on for both MDL queries
  and SMARTS patterns and can be controlled by the following options:

  * :oe:const:`OEChem::OESmartsParseOpts::Optimize` when using the :oe:func:`OEChem::OEParseSmarts` function
  * :oe:const:`OEChem::OEMDLQueryOpts::Optimize` when using the :oe:func:`OEChem::OEReadMDLQueryFile` function

  .. list-table:: **Substructure search performance improvement for MDL queries**
     :widths: 250 350

     * - .. image:: ../../oechemtk/images/releasenotes-2.2.0/MDL-SearchTimes.png
            :width: 250pt
       - .. image:: ../../oechemtk/images/releasenotes-2.2.0/MDL-Improvement.png
            :width: 350pt

  .. list-table:: **Substructure search performance improvement for SMARTS patterns**
     :widths: 250 350

     * - .. image:: ../../oechemtk/images/releasenotes-2.2.0/SMARTS-SearchTimes.png
            :width: 250pt
       - .. image:: ../../oechemtk/images/releasenotes-2.2.0/SMARTS-Improvements.png
            :width: 350pt

* A new :oe:const:`OEChem::OEFormat::OEZ` compressed binary format has been
  added with the ``.oez`` extension.
  This file format only supports multi-conformer molecules derived
  from the :ref:`OEMCMolBase <OEChem_OEMCMolBase>` class.
  Each molecule is individually compressed in the file
  using the `Zstandard <https://facebook.github.io/zstd/>`_
  compression algorithm.
  See the :ref:`section_molreadwrite_compressed` section for more details.

  .. note::

     This new file format is not backwards compatible. **OpenEye** applications and
     toolkits released before April 2019 will *not* be able to read or write
     this file format.

* An :ref:`OEBitVector <OESystem_OEBitVector>` object now can be attached as generic data
  to any :ref:`OEBase <OESystem_OEBase>` object. Its derived classes now round-trip through the
  OEB format.

* Multi-conformer molecule overloads have been added to the following existing APIs:

  * :oe:func:`OEChem::OEMDLHasParity`
  * :oe:func:`OEChem::OEMDLGetParity`
  * :oe:func:`OEChem::OEMDLSetParity`
  * :oe:func:`OEChem::OEMDLClearParity`

* New input flavors, :oe:const:`OEChem::OEIFlavor::MDL::SuppressEmptyMolSkip`,
  :oe:const:`OEChem::OEIFlavor::SDF::SuppressEmptyMolSkip`,
  and :oe:const:`OEChem::OEIFlavor::RDF::SuppressEmptyMolSkip`, have been added to the MDL
  formats to allow returning empty molecule records.
  This allows the SD data to be recovered from these records.

* New output flavors, :oe:const:`OEChem::OEOFlavor::MDL::SuppressTimestamps` and
  :oe:const:`OEChem::OEOFlavor::SDF::SuppressTimestamps`,
  have been added to the MDL formats to explicitly suppress timestamps in the file header.
  This is convenient for generating diffable test files.

* A new :oe:func:`OEChem::OEResidueToString` function has been added to convert an
  :ref:`OEResidue <OEChem_OEResidue>` object into string representation.

* The following new classes have been added to provide alternative ways to access tagged property
  data in molecules:

  * :ref:`OEMolPropertyFxn <OEChem_OEMolPropertyFxn>`
  * :ref:`OEMolSDPropertyFxn <OEChem_OEMolSDPropertyFxn>`
  * :ref:`OEMolGDPropertyFxn <OEChem_OEMolGDPropertyFxn>`
  * :ref:`OEMolTaggedPropertyFxn <OEChem_OEMolTaggedPropertyFxn>`
  * :ref:`OEMolPropertyList <OEChem_OEMolPropertyList>`

* New predicates, :ref:`OEIsValidAtomValence <OEChem_OEIsValidAtomValence>` and :ref:`OEIsValidMDLAtomValence <OEChem_OEIsValidMDLAtomValence>`,
  have been added to provide the ability to loop over atoms that satisfy the **OpenEye** and
  MDL valence model requirements, respectively.

* The :oe:meth:`OEChem::OEMolBase::NewGroup` method now also takes
  an :ref:`OEAtomBondSet <OEChem_OEAtomBondSet>` object.

* New :oe:func:`OEChem::OECheckAtomValence` and :oe:func:`OEChem::OECheckAtomValences` functions
  have been added that check if an atom or all atoms of a molecule have valid valences.

* A new :oe:meth:`OEChem::OELibraryGen::NumPossibleProducts` method
  has been added that returns the number of possible products that can be generated.

* New :oe:func:`OEChem::OEClearSDData` and :oe:func:`OEChem::OEClearPDBData`  function overloads
  have been added to clear SD or PDB data of multi-conformer molecules.

* A new :oe:func:`OEChem::OEShortestPath` overload function has been added
  that disallows traversing excluded bonds in the path.

* A new :oe:meth:`OEChem::OEAtomBondSet::GetParent` method has been added.

* A new :oe:func:`OEChem::OEGetResidueIndexFromCode` function has been added.

* The :oe:func:`OEChem::OEPDBOrderAtoms` function has been updated to take an argument
  that preserves the PDB residue order. It defaults to ``false`` to preserve
  backwards compatibility.

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

* The number of cases where round-tripping to MDL file format results in stereo information loss
  has been significantly reduced.

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

* High-level SMILES readers such as :oe:func:`OEChem::OESmilesToMol` and
  :oe:func:`OEChem::OEReadMolecule`  now clear cis/trans bond specifications on bonds
  in small rings (less than 7 members).

* The :oe:meth:`OEChem::oemolistream::open<OEChem::oemolstreambase::open>` and
  :oe:meth:`OEChem::oemolostream::open<OEChem::oemolstreambase::open>`
  methods now correctly set the formats for ``gz`` filenames.

* A bug that caused a crash when an invalid :ref:`oemolostream <OEChem_oemolostream>` is finalized
  has been fixed.

* :oe:meth:`OEChem::oemolistream::Setgz` and :oe:meth:`OEChem::oemolostream::Setgz` methods
  are now a no-op if the state of the stream is unchanged.

* An issue that caused the JSON writer to crash with user-specified cis/trans stereo
  has been fixed.

* The MDL V3000 reader has been fixed and no longer marks "either" double bonds with cis/trans parity.

* The MDL V2000 reader has been fixed and no longer adds "either" double marks to chiral
  but unspecified cis/trans double bonds.

* :oe:func:`OEChem::OESubsetMol` no longer crashes when breaking and adding multiple R-groups
  to the same atoms.

* Cobalt ions are now assigned a formal charge when being read from the PDB file.

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

* The ``__str__`` method of the :ref:`OEResidue <OEChem_OEResidue>` class now invokes the
  new :oe:func:`OEChem::OEResidueToString` function.

* The :oe:meth:`OEChem::OEMolDatabase::GetMoleculeString` method has been fixed
  and now returns ``bytes``.

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

* New code snippets have been added to the
  :oe:src:`Substructure Search<SNIPPET-SubstructureSearchMatch>` section to show
  how to reconstruct matches for the original molecule.

* A new :ref:`section_example_oechem_molchunk` example has been added.

* New code snippets have been added to the :oe:func:`OEChem::OEChemIsLicensed`
  function.

OEBio TK 2.2.0
================================================================================

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

* A new :oe:func:`OEBio::OEIsCTerminalAtom` predicate has been added to identify the C-terminal
  atom(s) in a protein structure.

* A new :oe:func:`OEBio::OEIsNTerminalAtom` predicate has been added to identify the N-terminal
  atom(s) in a protein structure.

* A new :ref:`OEAtomMatchResidue <OEBio_OEAtomMatchResidue>` predicate has been added to identify residue
  atoms by RegEx.

* New :oe:func:`OEBio::OEGetResidueAtom` functions have been added to provide easy access for
  specific residue atoms.

* The :oe:func:`OEBio::OEIsBackboneAtom` predicate has been updated to take an
  optional argument to consider the terminal oxygen atom (OXT) as part
  of the backbone.

* The :oe:func:`OEBio::OEIsWater` predicate has been updated to take two optional
  arguments:

  * to match hydrogen atoms in water molecules
  * to match the water ions :math:`OH^{-}` and :math:`H_{3}O^{+}`

* A new :oe:func:`OEBio::OEIsStandardProteinResidue` overload that
  takes an atom has been added.

New features (Preliminary)
--------------------------------------------------------------------------------

* The following preliminary APIs have been added to handle design units:

  * :ref:`OEDesignUnit <OEBio_OEDesignUnit>`
  * :oe:const:`OEBio::OEDesignUnitFileType`
  * :oe:func:`OEBio::OEIsReadableDesignUnit`
  * :oe:func:`OEBio::OEIsWriteableDesignUnit`
  * :oe:func:`OEBio::OEReadDesignUnit`
  * :oe:func:`OEBio::OEWriteDesignUnit`

  * :oe:constns:`OEBio::OEDesignUnitComponents`

  * :oe:func:`OEBio::OESubsetDesignUnit`
  * :oe:func:`OEBio::OEUpdateDesignUnit`

  * :oe:constns:`OEBio::OEIridiumCategory`
  * :ref:`OEIridiumData <OEBio_OEIridiumData>`
  * :oe:func:`OEBio::OEGetIridiumCategoryName`
  * :oe:func:`OEBio::OEGetIridiumCategoryFromName`
  * :ref:`OEStructureQuality <OEBio_OEStructureQuality>`

  * :oe:func:`OEBio::OEGetDesignUnitComponentID`
  * :oe:func:`OEBio::OEGetDesignUnitComponentName`

  The above classes and functions are currently used by **Spruce TK** for
  protein handling.

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

* The :oe:func:`OEPlaceHydrogens<OEBio::OEPlaceHydrogens>` function has been improved:

  * The :oe:const:`OEBio::OEPlaceHydrogensMoverClass::NH2` mover perception has
    been updated.
  * The :oe:const:`OEBio::OEPlaceHydrogensMoverClass::COOH` mover perception
    has been updated to only mark the atoms involved in the mover.

Java-specific changes
--------------------------------------------------------------------------------

* The Java example in the :ref:`section_example_oebio_splitmolcomplexlowlevel`
  section has been fixed.

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

* A new :ref:`chapter_interactions` chapter has been added.

* Code snippets have been added to the :oe:func:`OEBio::OESetCrystalSymmetry` and
  :oe:func:`OEBio::OEGetCrystalSymmetry` functions.

OESystem TK 2.2.0
================================================================================

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

* The :oe:func:`OESystem::OEMakeMolecularGaussianGrid` function now returns ``false``
  for an empty molecule.

* New code snippets have been added to the :oe:constns:`OESystem::OEThrow`
  class to demonstrate how to redirect warning and error messages to a file.

OEPlatform TK 2.2.0
================================================================================

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

* The following APIs have been rewritten using standard C++11 classes:

  * :ref:`OEMutex <OEPlatform_OEMutex>` now uses `std::mutex <https://en.cppreference.com/w/cpp/thread/mutex>`_.
  * :ref:`OETryMutex <OEPlatform_OETryMutex>` now uses `std::try_lock <https://en.cppreference.com/w/cpp/thread/mutex/try_lock>`_.
  * :ref:`OELock <OEPlatform_OELock>` and :ref:`OELockSpinlock <OEPlatform_OELockSpinlock>`
    now use `std::lock_guard <https://en.cppreference.com/w/cpp/thread/lock_guard>`_.

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

* The :oe:func:`OEPlatform::OEAddLicenseFromHttp` function available in the wrapped
  languages (Python, Java, and C#) now accepts HTTP
  responses with a ``text/plain; charset=utf-8`` content type.

OEGrid TK 1.6.3
================================================================================

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

* The :oe:func:`OESystem::OEReadMTZ` function has been updated to read CCP4 alternative
  space group numbers (e.g., 4005).

* :oe:func:`OESystem::OEReadGrid` no longer loses its title beyond the first blank space.

* A potential memory corruption issue with Gaussian volume calculation has been fixed.
