
********************************************************************************
Version 1.3.4
********************************************************************************

OEChem 1.3.4
================================================================================

New Features
--------------------------------------------------------------------------------

*  A new :oe:func:`OEChem::OEChemIsLicensed` API point has been provided
   to allow an application to check whether the *OEChem*, *OESystem* and
   *OEPlatform* libraries have managed to find a suitable run-time
   license.  This function can safely be called from programs to
   determine *a priori* whether using *OEChem* functionality may
   trigger a fatal error, allowing a warning to be issued and/or
   calls the affected functionality to be avoided.

*  A new ``MOL2::Substructure`` flavor has been added to the
   high-level writers (and a new default argument to the low-level
   :oe:func:`OEChem::OEWriteMol2File`) to force the writer to emit a suitable
   ``@TRIPOS<SUBSTRUCTURE>`` record even for molecules having only
   a single substructure.  The default behavior remains the same
   (to omit the record for *small* molecules) to save space in
   the common case.

*  *OEChem*'s SMILES format parser, :oe:func:`OEChem::OEParseSmiles`, has been
   tweaked to treat SMILES with inconsistent cis/trans bond stereo,
   such as ``C/C=C(/C)/C``, as a soft warning rather than as a hard
   error.  Previously, *OEChem* followed the Daylight toolkits, treating
   this as a serious error, and returning an empty molecule.  The
   new behavior is that a warning is now thrown to :oe:constns:`OESystem::OEThrow`,
   but the molecule is returned, just without specified stereochemistry
   for the problematic bond(s).  This allows *OEChem* to be used to
   correct/recover SMILES generated by buggy SMILES writers.

*  The functions :oe:func:`OEChem::OEAtomSetMDLParity` and
   :oe:func:`OEChem::OEAtomGetMDLParity` have been introduced, to simplify the
   task of storing and retrieving the MDL parity value associated
   with each atom.

*  The OEB file format readers and writers will now preserve PDB
   file header records, if they are present on the original molecule.

*  A new function :oe:func:`OEChem::OEGetCenterAndExtents` can be used to
   retrieve the center and 3D extents of a given :ref:`OEMolBase <OEChem_OEMolBase>`.

*  The file format extension ``.isosmi`` is now treated as
   a synonym for ``.ism``, indicating isomeric SMILES.

*  The :oe:meth:`OEChem::OEQMolBase::BuildExpressions` function now avoids
   constructing an atomic hybridization constraint if the query atom's
   :oe:meth:`OEChem::OEAtomBase::GetHyb` method returns zero.

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

*  A problem with the generation of canonical isomeric SMILES has
   been fixed, that for pathological molecules with specified cis/trans
   stereochemistry could cause the canonical SMILES string to be written
   using ``/`` (forward slash) for some input orderings and
   ``/`` (backslash) for others.  The resulting SMILES weren't
   incorrect (and the perceived symmetry invariants were fine), but this
   allowed equivalent isomers to be given non-identical isomeric SMILES
   strings.

*  Fixed a bug in the 1.3.3 changes to the :oe:func:`OEChem::OEPerceiveResidues`
   function.  The new functionality to identify an acetyl as an N-terminal
   blocking group, PDB code ``ACE``, could get confused when pattern
   matching some pathological graphs, such as proteins with N-terminal
   proline residues.

*  Fixed a bug in the OEB file format writer that could result in
   the coordinates of a multiconformer molecule becoming scrambled if
   the atoms of the :ref:`OEMolBase <OEChem_OEMolBase>` has been reordered, with
   :oe:meth:`OEChem::OEMolBase::OrderAtoms`, (and no atoms had been deleted) before
   writing the molecule.  This could also affected the :oe:meth:`OEChem::OEMolBase::Compress`
   and :oe:meth:`OEChem::OEMolBase::UnCompress` methods.

*  Fixed a bug that could cause a core dump when making a copy of
   an :ref:`OESubSearch <OEChem_OESubSearch>` instance that contains atom or bond stereo.

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

*  Fixed a segmentation fault when calling either :oe:func:`OEChem::OEIsCommonIsotope`
   or :oe:func:`OEChem::OEGetIsotopicWeight` with both atomic number and atomic mass of
   zero.  If ever :oe:func:`OEChem::OEIsCommonIsotope` is called with a mass of zero (for
   any element) it now returns false, and whenever :oe:func:`OEChem::OEGetIsotopicWeight`
   is called with a mass of zero, it now returns the corresponding isotopically
   averaged atomic weight, *i.e.* via :oe:func:`OEChem::OEGetAverageWeight`.

*  The :ref:`OEMatch <OEChem_OEMatch>` class was missing an explicit assignment
   operator, which could cause memory corruption if one :ref:`OEMatch <OEChem_OEMatch>`
   was ever assigned to another.  This has now been implemented.

*  Improved *OEChem*'s :oe:func:`OEChem::OEDetermineConnectivity` functionality
   to restrict proximity-based bonding of hydrogen atoms preferably to
   their nearest suitable heavy (non-hydrogen) neighbor.  Previously,
   hydrogens only bonded to their nearest neighbor, which for all-atom
   molecules with bad clashes caused the overlapping protons to sublimate
   as molecular hydrogen, leaving their original parents in strange
   charge (or radical) states.

*  The generation of ``@TRIPOS<SUBSTRUCTURE>`` records in Sybyl
   ``.mol2`` files has been rewritten to ensure that ligands, solvent
   molecules and nonstandard amino acids are correctly placed in their
   own Tripos substructure.  Previously, PDB ``HETATM`` s would be
   placed in substructure 1, sharing it with a valid ``RESIDUE``.
   Each :ref:`OEResidue <OEChem_OEResidue>` is now allocated a unique Tripos substructure,
   and nonstandard (or unrecognized) residues are marked as ``GROUP``.

*  The geometry functions :oe:func:`OEChem::OESetAngle` and :oe:func:`OEChem::OESetDistance`
   have both been made more robust to molecules without coordinates (and
   zero bond lengths).

*  A refactoring of the SMILES generation routines in the *OEChem*
   source code means that the non-canonical SMILES created by the
   function  :oe:func:`OEChem::OECreateAbsSmiString` are now identical to those
   created by :oe:func:`OEChem::OECreateSmiString` with just the
   :oe:const:`OEChem::OESMILESFlag::AtomMaps`  and :oe:const:`OEChem::OESMILESFlag::RGroups`
   flags.

*  Tweaks :oe:func:`OEChem::OEDetermineConnectivity` to avoid generating bonds
   between atoms in alternate locations/conformations.  This is only a
   problem for PDB files read with the ``ALL`` input flavor.  There
   are still multiple bonds between invariant *hinge* atoms and the
   multiple copies of its neighbors in alternate conformations.

*  Fixed a potential performance problem in :ref:`OEMolBase <OEChem_OEMolBase>`'s
   `OEChem::OEMolBase::operator+=`, and the equivalent
   :oe:func:`OEChem::OEAddMols` function
   calls, when concatenating large molecules with coordinates.

*  The performance of reading MDL SD files containing a large
   quantity of SD tag data and for PDB files containing a large
   amount of header information (with the ``DATA`` flavor) has
   been improved.  Instead of attaching each data item to the
   molecule as it's encountered, the file format readers now
   accumulate the data first, and then attach it to the molecule
   on encountering the end of the connection table.

*  The performance of handling generic data tags when reading
   OEB files containing large numbers of atoms or bonds has been
   improved.

*  The consistency of file format flavors have been improved.
   The SMILES :oe:const:`OEChem::OEOFlavor::SMI::ExtBonds` flavor that was previously
   only available to the :oe:const:`OEChem::OEFormat::SMI` file format, is now also available
   to the :oe:const:`OEChem::OEFormat::CAN` and :oe:const:`OEChem::OEFormat::ISM` formats.
   Likewise, the flavors available
   to the :oe:const:`OEChem::OEFormat::MOL2` and :oe:const:`OEChem::OEFormat::MOL2H` file formats
   have been synchronized, with  :oe:const:`OEChem::OEFormat::MOL2H` becoming a flavor of
   :oe:const:`OEChem::OEFormat::MOL2`
   (*i.e.* the file extension effectively specifies a different default flavor).

*  The :ref:`OEMCSMaxAtomsCompleteCycles <OEChem_OEMCSMaxAtomsCompleteCycles>` objective function
   requires that ring atoms and bonds of the query molecule have been
   perceived (using :oe:func:`OEChem::OEFindRingAtomsAndBonds`) before the
   corresponding :ref:`OEMCSSearch <OEChem_OEMCSSearch>` instance is constructed.  To
   avoid unexpected behavior, the :ref:`OEMCSSearch <OEChem_OEMCSSearch>` constructors
   now call :oe:func:`OEChem::OEFindRingAtomsAndBonds` themselves if allowed to
   make a copy of the query molecule (the default), or issue a
   warning to :oe:constns:`OESystem::OEThrow` otherwise.

OESystem  1.3.4
================================================================================

New Features
--------------------------------------------------------------------------------^

*  New *OEMath* template functions :oe:func:`OEMath::OEGeom3DGetCenterAndExtents`
   and :oe:func:`OEMath::OEGeom3DGetCenterOfMass` have been added to calculate the
   center, extents and (weighted) center of mass of a set of 3D coordinates.

*  The :ref:`OEInterface <OESystem_OEInterface>` class now has new
   :oe:meth:`OESystem::OEInterface::GetTypedParameter` template member functions.

*  A new function :oe:func:`OEChem::OEGetCenterAndExtents` has been added to
   *OESystem*'s grid handling code, to retrieve the center and extents of
   a grid.

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

*  A complete new implementation of :ref:`OEConcatIter <OESystem_OEConcatIter>` to avoid
   potential problems caused by the fact that appending items to an
   STL ``std::vector`` invalidates iterators over it.  The new
   implementation uses offsets rather than pointers to avoid problems.
   This also fixes a crash of :oe:meth:`OESystem::OEConcatIter::operator++` on an
   empty iterator.

*  Fixed a bug in :oe:meth:`OESystem::OEIter::Push` that caused problems if the
   iterator was previously empty.

*  Fixed a bug in :oe:func:`OESystem::OEFileExtension` that was causing crashes
   when no extension was present.

*  Fixed a bug in :oe:meth:`OESystem::OEInterface::GetParameters` that caused
   parameters in sub sub interfaces to appear multiple times in the
   returned iterator.

*  The :oe:func:`OESystem::OEWriteSettings` function now takes a *const*
   :ref:`OEInterface <OESystem_OEInterface>` reference.

OEPlatform 1.3.4
================================================================================

New Features
--------------------------------------------------------------------------------^

*  New functions :oe:func:`OEPlatform::OEFileDetermineName` and
   :oe:func:`OEPlatform::OEFileDeterminePath`
   to extract the basename and path of a filename respectively.

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

*  Fixed a problem in the :ref:`oeigzstream <OEPlatform_oeigzstream>` constructor, that
   could cause problems determining the size of a file using ``size``,
   as zlib was not being correctly initialized.

*  Fixed a minor bug in :oe:func:`OEPlatform::OEFileCreate` that was failing to
   close the file descriptor for the newly created file.

*  The return type of the :oe:meth:`OEPlatform::OEFile::Size` method and the
   :oe:func:`OEPlatform::OEFileSize` function have been changed from ``size_t``
   to ``oefpos_t`` to allow correct handling of large files on
   32-bit platforms.

*  Fixed some minor bugs in :ref:`oeistream <OEPlatform_oeistream>` and
   :ref:`oeostream <OEPlatform_oeostream>` when these classes are used directly.
