.. include:: ../../toolkit-substitutions

********************************************************************************
Version 1.7.2
********************************************************************************

OEChem 1.7.2
================================================================================

* ``OEPDBIFlag``, ``OEPDBOFlag``,
  ``OEMDLOFlag``, ``OEMOPACFlag``
  constants namespaces are deprecated.

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


* :oe:func:`OEChem::OEReadMDLQueryFile` now sets the title of the query
  molecule.

* *OEChem* now recognizes the MDL "wavy" bond. An
  :ref:`OEBondBase <OEChem_OEBondBase>` can be queried for its stereo type by
  querying its generic data for the
  :oe:const:`OEChem::OEProperty::BondStereo` tag. The returned
  ``unsigned int`` will be from the :oe:constns:`OEChem::OEBondStereo`
  namespace.

* *OEChem* now supports MDL query file R group definitions. These are
  lines starting with ``M RGP``. The R group is represented as a
  :ref:`OEQAtomBase <OEChem_OEQAtomBase>` with a :oe:meth:`map
  index<OEChem::OEAtomBase::GetMapIdx>` the same as the R group number
  in the file.

* *OEChem* will now correct amidine and guanidinium functional groups
  where the bonds between C and N are marked as aromatic in MOL2
  files.

* Significant performance improvement to reading single-conformer
  molecules from OEB files. Other minor performance improvements were
  made to OEB as well (including multi-conformer molecules). This
  speeds up ``OEDBMol`` compression and uncompression as well.

* Removed ``OECopyHistory``
  function. ``OEChem::OEReadHeader`` is now smart enough to read
  the header into the :ref:`OEHeader <OESystem_OEHeader>` history if it is
  already populated with another header's information.

* :oe:cls:`oemolthreads<OEChem::oemolthreadbase>` now support reading
  and writing :ref:`OEHeader <OESystem_OEHeader>` objects.

* Added the :oe:meth:`OEChem::oemolthreadbase::PeekMol` method. 

.. oe:language:: python

   * Support for the copy module interface (__copy__ and __deepcopy__)
     for objects that inherit from :ref:`OEBase <OESystem_OEBase>`. This
     makes *OEChem* molecules behave a little more pythonic allowing
     the user to care a little less that they are C++ based objects.

   * Added support for :oe:meth:`OESystem::OEBase::GetData`. This
     improves the ability to use
     :oe:meth:`OESystem::OEBase::AddData` and
     :oe:meth:`OESystem::OEBase::GetDataIter` from python. 

   * Added partial support for :oe:meth:`OESystem::OEBase::AddData` in
     python. Only primitive data types will work. More complex data
     types (Molecules, Surfaces, etc) will fall back to
     :oe:meth:`OESystem::OEBase::SetData`.

   * :oe:func:`OEChem::OESmartsLexReplace` is now properly wrapped for python.

   * Added `OEChem::OEAtomArray` and
     `OEChem::OEBondArray` classes (similar to
     `OEChem::OEFloatArray`) for dealing with arrays of atom
     and bond pointers from python.

   * Fixed an inconsistency of using ``OEIter.Target``. Prior to 1.7.1
     if ``Target`` was used inside a python iteration the ``Target``
     would point to the next item in the iterator, not the current
     one. Therefore, the following assertion always holds:

     .. code-block:: python
        
        atomiter = mol.GetAtoms()
        for atom in atomiter:
            assert atom == atomiter.Target()

     This fix was implemented to support lazy iterators as returned by
     the new alternate location utilities:
     :oe:meth:`OEBio::OEAltLocationFactory::GetGroups` and
     :oe:meth:`OEBio::OEAltGroup::GetLocations`. 

     .. note:: 

        Since the fix was implemented as a reimplementation of the
        ``OEIter.__iter__`` method to make it return a python
        generator instead of the iterator object itself there is now a
        slight difference in the above code snippet and the
        alternative way of using the ``OEIter.next`` python iteration
        protocol as shown in the following code:

        .. code-block:: python


           atomiter = mol.GetAtoms()
           try:
               while True:
                   atom = atomiter.next()
                   assert atom != atomiter.Target()
           except StopIteration:
               pass
       
       This previous code snippet will behave the same in 1.7.0 and
       1.7.1. However, note that now ``OEIter.Target`` returns the
       next item in the iterator. This is fundamentally how
       ``OEIter.next`` is required to work. 

       We could have not provided ``OEIter.next`` at all since the
       only requirement for python iteration is the ``__iter__``
       method. However, we choose to leave a ``OEIter.next``
       implementation in order to not break code that was written like
       the following:

        .. code-block:: python


           atomiter = mol.GetAtoms()
           atom = atomiter.next() # grab the first atom

.. oe:language:: java

   * Added support for :oe:meth:`OESystem::OEBitVector::ToHexString` in
     Java.

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


* Fixed a :oe:func:`OEChem::OEReadMDLQueryFile` segmentation fault when
  perceiving aromaticity with spirane rings containing generic atoms.

* Fixed a bug where atom parity was ignored when reading a 3D MOL file.

* Fixed a memory leak when initializing an
  :ref:`OEMCSSearch <OEChem_OEMCSSearch>` with its
  :oe:meth:`constructor<OEChem::OEMCSSearch::Constructors>`. The
  workaround in 1.7.0 is to use the
  :oe:meth:`OEChem::OEMCSSearch::Init` method instead.

* Fixed a memory leak with :ref:`OEMCSSearch <OEChem_OEMCSSearch>` when
  :oe:meth:`OEChem::OEMCSSearch::SetMaxMatches` was set to a number
  lower than the total number of matches found.

* Fixed memory leak when creating and destroying multiple
  :ref:`OELingoSim <OEChem_OELingoSim>` objects.

* Some :oe:constns:`OEChem::OEOFlavor::PDB` flavor combinations would
  generate corrupt data.

* :oe:func:`OEChem::OESmilesAtomCount` now includes atoms of the form
  ``[#6]`` in its count.

* Fixed a bug where map indices on explicit hydrogens would be ignored
  when generating SMILES. For example, ``[CH]`` would get generated even
  if the hydrogen had a map index specified. Now ``[H:1][C]`` will be
  generated.

.. oe:language:: java

   * Fixed a crash that was introduced in 1.7.0 that would occur when
     using :oe:meth:`OEChem::oemolostream::flush` or any
     :ref:`oemolostream <OEChem_oemolostream>` method that returned an instance of
     itself.

.. oe:language:: python

   * The feature added in 1.7.0 of retrieving a python dictionary of
     the contents of an :ref:`OEBase <OESystem_OEBase>` with the
     :oe:meth:`OESystem::OEBase::GetData` method was leaking
     memory. This has been fixed in this release.

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

* Energy set on an :ref:`OEGraphMol <OEChem_OEGraphMol>` using
  :oe:meth:`OEChem::OEMolBase::SetEnergy` would not get written out to
  OEB files. Energy data will now round-trip through the OEB format.

* Automatic conformer combining through the
  :oe:meth:`OEChem::oemolistream::SetConfTest` interface will now
  combine separate single-conformer molecules in an OEB into a
  multi-conformer molecule similar to the other file formats *OEChem*
  supports for that behavior (MOL2, SDF, etc).

* :oe:func:`OEChem::OEPerceiveBondOrders` is more stable to pre-existing bond
  orders on the molecule.

* Rare non-deterministic bug fixed for sulfur monoxide bug in
  :oe:func:`OEChem::OEPerceiveBondOrders`. 

* *OEChem* now recognizes the ``DU`` residue name and the mythical ``DT``
  residue which is synonym for ``  T``. 

* The new overload of :oe:func:`OEChem::OEIsReadable` to take a string
  would return ``true`` if there was no periods ('.') in the string
  and the string began with a readable file extension, for example,
  "MDL-FOO".

* Fixed a bug when :ref:`OELibraryGen <OEChem_OELibraryGen>` failed to generated
  products with correct |Kekule|-form. 

OESystem 1.7.2
================================================================================

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

* Added the :oe:func:`OESystem::OEGetBitCounts` function to efficiently
  get certain bit counts when comparing two
  :ref:`OEBitVector <OESystem_OEBitVector>` objects. This function is useful for
  implementing custom fingerprint similarity measures.

* Added the :oe:meth:`OESystem::OEBitVector::SetData` method to allow a
  rapid method of initializing an :ref:`OEBitVector <OESystem_OEBitVector>` with
  binary data.

* Added :oe:meth:`OESystem::OEErrorHandler::Verbose` method to send
  :oe:const:`OESystem::OEErrorLevel::Verbose` level messages. 

* Added ``OESystem::OEHeader::operator bool`` to test whether
  the :ref:`OEHeader <OESystem_OEHeader>` has any data in it.

* Added :oe:meth:`OESystem::OEBoundedBuffer::Peek` and
  :oe:meth:`OESystem::OEProtectedBuffer::Peek` methods. 

* Optimized writing generic data attached to an
  :ref:`OEBase <OESystem_OEBase>`. This optimized ``OEDBMol::Compress``.

* Minor optimization to a common *OEChem* iterator. 

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

* Fixed a memory leak with ``OEConstIter``. 

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

* Renamed the ``OEMakeFP`` function to
  :oe:func:`OESystem::OEParseHex` to be more explicit about what is
  does.

* Valgrind would throw warnings about a change made in 1.7.0 for
  thread safety issues. Though this was not a true memory leak the
  code has been slightly changed to silence this warning.

* Fixed an exponential growth bug when adding history to an
  :ref:`OEHeader <OESystem_OEHeader>`.

* Assignment operators for :ref:`OEMultiGrid <OESystem_OEMultiGrid>` now properly
  copy the titles of the subgrids.

OEPlatform  1.7.2
================================================================================

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

* Added the :oe:func:`OEPlatform::OESetLicenseFile` function to allow
  dynamically setting which OpenEye license file to use.

* Added the :oe:func:`OEPlatform::OEGetCurrentWorkingDirectory` function
  to return the current working directory for the process.

* Optimized :oe:meth:`OEPlatform::oeigzstream::seek<OEPlatform::oestream::seek>`  to only rewind the stream if seeking backwards. Therefore, the optimal
  way to seek in a gzipped file is in increasing ``oefpos_t`` order. 

* Optimized :oe:meth:`OEPlatform::oeisstream::getbuffer`. 

* Optimized :oe:meth:`OEPlatform::oeosstream::clear`. 

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

* Revised the :oe:meth:`OEPlatform::oestream::length` and
  :oe:meth:`OEPlatform::oestream::size` documentation to be more
  accurate.

* ``oefpos_t`` now works for files greater than 4GB on 64-bit
  windows.

* Fixed an infinite loop that would occur from the following code:

  .. code-block:: c++

     oeosstream sfs;
     sfs.open("foobar");
     sfs.write("blah");

  :oe:meth:`OEPlatform::oeosstream::open<OEPlatform::oeostream::open>`
  will return ``false``. Ignoring the ``false`` return value would cause
  :oe:meth:`OEPlatform::oeosstream::write<OEPlatform::oeostream::write>` to
  loop indefinitely.


OEBio 1.7.2
================================================================================

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

* Introduced new *OEBio* classes to manage alternate locations in
  protein data bank structures along with a new PDB input flavor
  :oe:const:`OEChem::OEIFlavor::PDB::ALTLOC` to retain alternate
  location atoms on input. 

  .. seealso::

     :ref:`Alternate Locations <section_alternate_location_factory>`

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

* The crystal symmetry routines were broken in the 1.7.0 release by a
  corrupted matrix.
   
* When reading symmetry from external sources (*i.e.* PDB files or maps)
  a warning is thrown when reading out of date space groups rather
  than fail to read symmetry.

* Setting space groups will fail unless the most current space group
  constraints are used.

* Added the following space group aliases for older style space groups.

  ::

     I 1 2 1 -> C 1 2 1
     P 1-    -> P -1


OEGrid 1.3.3
================================================================================

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

* :oe:func:`OESystem::OEMakeGridFromCenterAndExtents` added for a grid
  of an arbitrary template type.

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

* Fixed a rare crash in :oe:func:`OESystem::OEMakeRegularGrid` that was
  caused by floating point round-off error.
