OEDepict TK 2.2.3¶
- OEPrepareDepictionOptions added to allow finer grained control of the OEPrepareDepiction function.
- OEGetMoleculeCoords and OEGetDisplayCoords functions added that convert 2D points between the molecule and the display coordinate systems.
- OEAddHighlightOverlay added to elegantly highlight overlapping sections of a molecule.
- Added the following functions to OESystem to provide predefined sets of colors:
- Added the following colors to OESystem :
Major bug fixes¶
Fixed Linux thread safety when writing .png files. The Cairo graphics library (http://cairographics.org) used to draw .png images on Linux is not thread safe. OEDepict TK now performs its own mutual exclusion when calling into the Cairo graphics library to ensure thread safety. It is strongly recommended to use the .svg file format when speed and server throughput is a concern. Web browser support for .svg has improved significantly in recent years and it is more effective at representing molecule graphs since they are mostly vector graphics. The only time .png is preferable over .svg is when rendering heavy raster graphics like property maps from Grapheme TK.
Fixed thread safety of creating .svg images.
Increased the default font size of the atom label and atom property label. See the effect of this change in Table: Example of increasing the default font size.
Example of increasing the default font size OEDepict TK 2.2.2 OEDepict TK 2.2.3
The reaction role of hydrogens will no longer be thrown away during the depiction process. Specifically, all information present on explicit hydrogens will be preserved during the depiction process.
OEDepict TK generated .pdf files opened by several PDF viewers would show the file as edited due to an internal representation problem. PDF viewers should no longer modify OEDepict TK generated .pdf files.
OEDepict TK generated .pdf files should no longer cause the following warning messages when read into Adobe Acrobat:
The font 'Arial-Bold' contains a bad /BBox.
The Helvetica font will now be used as the default font in .pdf files. The OEFontFamily.Arial constant will now map to Helvetica as well in .pdf files.
Minor bug fixes¶
Isotope hydrogens are never suppressed by the OEPrepareDepiction function.
.svg and .bsvg image dimensions are now specified by the “viewBox” parameter rather than the “width” and “height” parameters. This allows scaling the images in web applications.
Functions and constructors of classes of Ogham API will now throw warning messages about being deprecated.
Removed unbounded stack allocations.
Fixed the problem when wedge bonds were not highlighted correctly when using the OEHighlightStyle.Color highlighting style. See the effect of this change in Table: Example of highlighting wedge bonds with “Color” style.
Example of highlighting wedge bonds with “Color” style OEDepict TK 2.2.2 OEDepict TK 2.2.3
- Functions and methods that returned a OE2DPoint to Java and C# no longer return a dangling reference that was easy to cause crashes with.
- Updated the Highlighting Overlapped Patterns section and added a new code example that shows how to highlight overlapping matches using the new OEAddHighlightOverlay function.
- Documentation updated to reflect that OE2DMolDisplayOptions.SetAtomPropertyFunctor and OE2DMolDisplayOptions.SetBondPropertyFunctor are preferred over using OE2DAtomDisplay.SetProperty and OE2DBondDisplay.SetProperty directly to ensure molecule scaling fully accounts for the size of the labels.
- All images in this documentation were automatically regenerated to reflect the changes made since the previous release.
- Added the missing documentation for the following OESystem colors:
- The example for a python-based web interface and web service have been moved to our Python Cookbook.