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

.. _section_oechem_releasenotes_191:

********************************************************************************
Version 1.9.1
********************************************************************************

OEChem 1.9.1
================================================================================

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

* :ref:`OEOmegaConfTest <OEChem_OEOmegaConfTest>` has been created specifically for output from
  OMEGA.  This conftest ignores invertible nitrogen stereochemistry that OMEGA
  freely adjusts in order to allow these conformers to be read into the same
  :ref:`OEMol <OEChem_OEMol>`.

* :oe:meth:`OEChem::OELibraryGen::SetValidateKekule` added to set
  whether alternative |Kekule| forms are enumerated until a valid form
  is identified before returning a product.

.. oe:language:: python

   * ``OEChem::oemolithread::GetMolData`` method added to return
     a generator over all the molecules of a file in their string
     representation in the source format.

* The :oe:meth:`OEChem::oemolthreadbase::GetMol` method for
  :ref:`oemolithread <OEChem_oemolithread>` class will now return chunks of
  molecule files that can be directly written to files to enable faster
  tokenization of a molecule file. Before this release, this method
  would often not return whitespace that was necessary to delineate
  boundaries between molecules.

.. oe:language:: python java csharp

   * :oe:meth:`OEChem::oemolthreadbase::PutMol` and
     :oe:meth:`OEChem::oemolthreadbase::GetMol` support added to the
     wrapped languages: Python, Java, and C#.

.. oe:language:: csharp

   * :ref:`OETrans <OEChem_OETrans>` and its sibling classes for high-level 3D
     manipulation have been added to C#. These include :ref:`OEQuaternion <OEChem_OEQuaternion>`,
     :ref:`OEEuler <OEChem_OEEuler>`, :ref:`OERotMatrix <OEChem_OERotMatrix>` and
     :ref:`OETranslation <OEChem_OETranslation>`.

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

* :oe:func:`OEChem::OEPerceiveResidues` had a bug introduced in the
  2012.Feb release that could cause crashes or strange
  data to be written to the :oe:meth:`OEChem::OEAtomBase::GetName`
  field whenever :oe:meth:`OEChem::OEAtomBase::GetAtomicNum` returned
  ``0``. Atoms with an atomic number of ``0`` will now be given the
  name of `` UNK`` (note, the leading space to match PDB style
  names).

* :oe:func:`OEChem::OEAssignAromaticFlags` no longer takes an
  ``OEAroModel``, which was a ``unsigned short *`` typedef, but takes
  an integer from the :oe:constns:`OEChem::OEAroModel` namespace
  instead. Global constants prepended with ``OEAroModel*`` are now
  deprecated. This works around a serious bug that would sometimes
  cause :oe:func:`OEChem::OEAssignAromaticFlags` to not do anything to
  the molecule. This may break source-level backwards compatibility
  for strongly typed languages (C++, Java, and C#) if a global
  constant prepended with ``OEAroModel*`` was stored as a
  variable.

.. oe:language:: c++ java csharp

   Code may have to be ported like the following:

.. oe:language:: c++

   .. code-block:: c++

      OEAroModel m = OEChem::OEAroModelOpenEye;
      // change the previous line to the following
      unsigned int = OEChem::OEAroModel::OpenEye;

      OEAssignAromaticFlags(mol, m);


.. oe:language:: java

   .. code-block:: java

      short[] m = oechem.getOEAroModelOpenEye();
      // change the previous line to the following
      int m = OEAroModel.OpenEye;

      OEAssignAromaticFlags(mol, m);


.. oe:language:: csharp

   .. code-block:: csharp

      SWIGTYPE_p_unsigned_char m = OEChem.OEAroModelOpenEye;
      // change the previous line to the following
      uint m = OEAroModel.OpenEye;

      OEAssignAromaticFlags(mol, m);


.. oe:language:: python

   Python code should continue to work due to dynamic typing. The only
   change for python is that the following ``OEAroModel*`` global
   constants are now deprecated.


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

.. oe:language:: java

   * The :ref:`oemolistream <OEChem_oemolistream>` constructor that takes a
     :ref:`oeistream <OEPlatform_oeistream>` argument had its ownership flag
     default changed from ``true`` to ``false`` for Java. There is no
     way to pass ownership to the object from Java without usually
     resulting in a crash, so passing the value of ``true`` to this
     constructor will now throw an error message.

* :ref:`oemolithread <OEChem_oemolithread>` and :ref:`oemolothread <OEChem_oemolothread>` can
  no longer to be copy constructed. They are heavy weight objects
  representing real operating system threads and thus should not be
  copied.

.. oe:language:: java

   * Resolved an issue in Java where compiling against the OpenEye jar
     would cause additional class files to appear in the current
     directory.

   .. warning::

      There is a known bug concerning OpenEye constants that occurs
      when compiling against an older version of the OpenEye jar and
      running against a newer version of the OpenEye jar. Please make
      sure to run against java programs against the same version it
      was compiled with.


* The MDL V3000 reader now throws a warning that the ``ENDPTR`` and ``ATTACH`` bond
  properties will be ignored.

* :oe:meth:`OEChem::OEMatch::AddPair` now checks whether the atom and
  bond pairs belong to the same molecule.

* :ref:`OELibraryGen <OEChem_OELibraryGen>` now allows an aromatic bond to become
  a triple bond when breaking a ring.


OESystem 1.9.1
================================================================================

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

* Adding a default constructor for the
  :ref:`OELinearColorGradient <OESystem_OELinearColorGradient>` class that generates a
  color gradient with no color stop. The
  :oe:meth:`OESystem::OEColorGradientBase::IsEmpty` was added to be
  able to determine if the object was default constructed.
  Additionally, the
  :oe:meth:`OESystem::OEColorGradientBase::GetColorAt` method will
  always return the color
  :oe:const:`OEBlack<OESystem::OESystem::OEBlack>` for a color gradient
  with no color stops, i.e.,
  :oe:meth:`OESystem::OEColorGradientBase::IsEmpty` returns ``true``.


* :oe:func:`OESystem::OEStringTabsToSpaces` function added to expand
  tab characters to 4 space characters.

* :oe:meth:`OESystem::OEBitVector::FromHexString` performance has been
  significantly improved.

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

* :oe:func:`OESystem::OEStringTokenizeQuoted` now treats consecutive
  delimiters as blank fields.

* :ref:`OEErrorHandler <OESystem_OEErrorHandler>`, and thus
  :oe:constns:`OESystem::OEThrow`, will no longer record the
  number of messages that did not actually get through due to the
  message not meeting the :oe:meth:`OESystem::OEErrorHandler::SetLevel`
  threshold.

* :oe:func:`OESystem::OEParseCommandLine` will now call ``exit(0)`` if
  the internal call to :oe:func:`OESystem::OECheckHelp` returns
  ``true`` that a ``--help`` parameter is found. That is, program
  execution with the ``--help`` parameter should not be considered
  abnormal program termination.

* :oe:func:`OEMath::OEGeom3DRotVectorToTransform` return type changed
  from ``void`` to ``bool`` to be able to indicate cases when the
  function can fail.

.. oe:language:: python

   * :oe:meth:`OESystem::OEAnnotation::GetChildren` will now work in
     Python.

   * ``ProcessCommandLineStreams`` was deprecated, and is now
     removed.


Documentation fixes
--------------------------------------------------------------------------------

* :oe:meth:`OESystem::OEBitVector::FromHexString` and
  `OESystem::OEBitVector::ToHexString` documentation has been
  corrected to explain their behavior with respect to bit vector
  lengths and the handling of non-hexadecimal digits in the
  translation process.

* :oe:func:`OESystem::OECheckHelp` is now documented.

OEPlatform 1.9.1
================================================================================

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

* :oe:meth:`OEPlatform::oeifstream::pread` method added to allow
  multiple threads to read from a single file.

* :ref:`oeiofstream <OEPlatform_oeiofstream>` class added to support reading and
  writing to the same open file.

* :oe:meth:`OEPlatform::oeistream::read` method added to read the
  entire contents of the stream or throw ``std::bad_alloc`` whenever
  the system runs out of memory.

.. oe:language:: c++

   * :ref:`oeistream <OEPlatform_oeistream>` methods that read into
     ``std::string`` objects have been significantly optimized.

   * `OEPlatform::oeifstream::getline` that takes a
     ``std::string`` without a size parameter was arbitrarily capped
     to only read a line 64K long. The method will now keep reading
     data provided there is enough memory to allocate for the
     ``std::string``.

   * OE_CURRENT_FUNCTION macro added that provides a ``const char *``
     to the name of the current C++ function.

* :ref:`oemultiostream <OEPlatform_oemultiostream>` has been added.  More than one
  :ref:`oeostream <OEPlatform_oeostream>` can be added to this class for simultaneous output.

* :oe:func:`OEPlatform::OEFileTempDescriptor` added to safely create
  temporary files without race
  conditions. :oe:func:`OEPlatform::OEFileRandomName` is now deprecated
  as it can lead to race conditions in the file names it generates.

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

* `OEPlatform::oeifstream::getline` would sometimes cause
  buffer overflows whenever ``max`` characters were actually in the
  line. The documentation was not very clear what this ``max``
  parameter meant, it used to be the line size, not including the null
  terminator. Now it means the size of available memory in the ``buffer``
  passed in, including the null terminator, and the documentation is
  now more clear on the subject.

* `OEPlatform::oeifstream::append` will now close the previous
  file before opening the next file. Before, calling the ``append``
  method in a loop could lead to the process easily running out of a
  available file descriptors.

* The macros ``OE32BIT`` and ``OE64BIT`` were improperly set on 64-bit
  Windows.

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

* :oe:func:`OEPlatform::OEGetHostIdent` fixed to work on machines where
  ``eth0`` was not in use for network traffic.

OEBio 1.9.1
================================================================================

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

* :ref:`OESequenceAlignment <OEBio_OESequenceAlignment>` methods
  :oe:meth:`GetBackboneMatch<OEBio::OESequenceAlignment::GetBackboneMatch>` and
  :oe:meth:`GetCAlphaMatch<OEBio::OESequenceAlignment::GetCAlphaMatch>`
  now returns :ref:`OEMatchBase <OEChem_OEMatchBase>` instead of :ref:`OEMatch <OEChem_OEMatch>`.

Documentation fixes
--------------------------------------------------------------------------------

* :ref:`OERotamer <OEBio_OERotamer>` class is now documented for working with
  frequently observed conformations of amino-acid sidechains .


OEGrid 1.4.2
================================================================================

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

* :oe:func:`OESystem::OEReadGrid` no longer leaks memory for
  :oe:const:`CCP4<OESystem::OEGridFileType::CCP4>` files.
