Hi rdkiters, Unfortunately I couldn't make it to the hackaton part of UGM but yesterday I made my own small hackaton. The result is new pull request to rdkit:
https://github.com/rdkit/rdkit/pull/124 This adds new class/file: jsonCanvas and molToJSON method which produces JSON out of molfile. This JSON string can in turn be given as parameter to raphaeljs Paper.add() function and it will produce canvas-based image on the client side. To show you how it works, I've uploaded some examples of canvas-based compound images here: http://mnowotka.github.io/demo/ If you inspect source of each example you will find JSON generated by molToJSON using following code: from rdkit import Chem from rdkit.Chem import AllChem from rdkit.Chem import Draw m = Chem.MolFromSmiles('OC[C@H]1O[C@H](C[C@@H]1O)N2C=C(I)C(=O)NC2=O') AllChem.Compute2DCoords(m) Draw.MolToJSON(m) Additionally, I've implemented new method for generating legend: it is now moved to MolDrawing class so no function in __init__py have to use canvas directly anymore. I also added parameters for legend such as fontFace, fontSize, and margins so they are not hardcoded anymore. If you find those changes useful, please accept my pull request. Kind regards, Michał Nowotka ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss