Wednesday, 4 November 2009

In I go with Indigo, the new open source cheminformatics toolkit

SciTouch LLC have just announced the release of a dual licensed (GPL or commercial) cheminformatics toolkit, Indigo. See Depth-First and Rajarshi for some initial reactions.

It's a C++ toolkit, and right now what seems to be available are several .NET wrappers that enable specific uses as well as an Oracle cartridge. Access from Python, etc. is on the to-do list, and hopefully this will also give access to the core Molecule object so that all aspects of the toolkit will be available.

Charlie Zhu has already written an example application using C#. Rather than wait for CPython bindings, I installed IronPython and used it to access Indigo's .NET libraries (Dingo, in this case) to do a SMILES to png conversion:
C:\Tools\Indigo\dingonet-1.0-3669>"C:\Program Files\IronPython 2.6\ipy.exe"
IronPython 2.6 (2.6.10920.0) on .NET 2.0.50727.3603
Type "help", "copyright", "credits" or "license" for more information.
>>> import clr
>>> clr.AddReference("dingonet")
>>> import indigo
>>> dir(indigo)
['Dingo', 'DingoException']
>>> dingo = indigo.Dingo()
>>> dir(dingo)
['Dispose', 'Equals', ......, 'getResult', 'isEmpty', 'loadMolecule', 'loadMolec
uleFromFile', 'loadReaction', 'loadReactionFromFile', 'render', 'renderToBitmap'
, 'renderToMetafile', 'setAAMColor', 'setBackgroundColor', 'setBondLength', 'set
Coloring', 'setHighlightBold', 'setHighlightColor', 'setImageSize', 'setImplicit
HydrogenMode', 'setLabelMode', 'setLoadHighlighting', 'setLogPath', 'setMarginFa
ctor', 'setOutputFile', 'setOutputFormat', 'setOutputHDC', 'setOutputPrintingHDC
', 'setRelativeThickness', 'setStereoOldStyle']
>>> dingo.loadMolecule("CC(=O)Cl")
>>> dingo.setOutputFile("test.png")
>>> dingo.setOutputFormat("png")
>>> dingo.render()
>>> ^Z

5 comments:

  1. So does this mean Cinfony will add a new backend?

    ReplyDelete
  2. I'd like to, but I'm not sure whether the .NET API provided is suitable. It seems like each component, Dingo, etc., just wraps a subset of the functionality of the C++ library. I'd have to look at the code to be sure, but if so, it would be better to wait for direct Python access to the core API.

    ReplyDelete
  3. Noel, thank you for trying Dingo and posting this.

    You are right: Bingo, Dingo, Cano, Deco, and Nucleo wrap their subsets of the functionality of the C++ library, and the subsets overlap. Bingo has only the C interface for Oracle, and other 4 libraries have simple C interfaces for general usage. C# libraries (Dingo, Cano) and Java library (Nucleo) are built on top of C interface.

    We are planning for the future a C interface providing all functionality of the C++ library, and a Python wrapper for it, as well as Java, C#, and Ruby wrappers.

    ReplyDelete
  4. If the picture in your post is the result of rendering by Indigo, than its really cool. Congratulations Dmitry.

    ReplyDelete
  5. @Beda: It is indeed. Like BKChem, it also has SVG support.

    ReplyDelete